paracosm 0.3.80 → 0.3.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +62 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -164,6 +164,64 @@ Options: `--seed-text`, `--seed-url`, `--no-web-search`, `--max-searches`. Compi
164
164
 
165
165
  Both are included as `paracosm/mars` and `paracosm/lunar` exports. Use them as references for building your own scenarios.
166
166
 
167
+ ## How a Simulation Works
168
+
169
+ ### Turn 0: Promotions
170
+
171
+ The commander evaluates the full agent roster and promotes department heads. Each department (Medical, Engineering, Agriculture, etc.) gets a leader chosen by the commander based on personality fit, specialization, and experience. A high-openness commander picks unconventional candidates. A high-conscientiousness commander picks by-the-book specialists.
172
+
173
+ This matters because promoted agents become the department analysis LLM agents for the rest of the simulation. Their personality colors every analysis they produce, which shapes the information the commander sees, which shapes decisions. The commander never directly analyzes events. They only read department reports and decide.
174
+
175
+ ### Turns 1-N: The Turn Loop
176
+
177
+ Each turn represents a configurable time period (default ~4 years). Every turn follows this pipeline:
178
+
179
+ ```
180
+ 1. EVENT DIRECTOR Reads world state, prior decisions, tool intelligence.
181
+ Generates an event that targets actual weaknesses.
182
+
183
+ 2. KERNEL ADVANCE Deterministic time progression: births, deaths, aging,
184
+ health decay, resource consumption. Seeded PRNG.
185
+
186
+ 3. DEPARTMENT ANALYSIS All active departments analyze the event in parallel.
187
+ Each department head (promoted at turn 0) uses their
188
+ personality and tools. Departments can forge new
189
+ computational tools at runtime (sandboxed V8, LLM-judged).
190
+
191
+ 4. COMMANDER DECISION Reads all department reports. Selects an option.
192
+ Personality shapes risk tolerance and priority weighting.
193
+
194
+ 5. OUTCOME Deterministic kernel classifies the outcome (risky success,
195
+ risky failure, safe success, safe failure) based on the
196
+ option chosen, probability, and colony state.
197
+
198
+ 6. EFFECTS Kernel applies colony deltas (population, morale, food,
199
+ power, etc.) based on outcome and event category.
200
+
201
+ 7. AGENT REACTIONS All alive agents (~100) react in parallel using a cheap
202
+ model. Each reaction is shaped by the agent's personality,
203
+ health, relationships, and accumulated memories.
204
+
205
+ 8. MEMORY Reactions become persistent memories. Short-term memories
206
+ consolidate into long-term beliefs. Stances drift.
207
+ Relationships shift based on shared experiences.
208
+
209
+ 9. PERSONALITY DRIFT HEXACO traits shift through leader pull, role activation,
210
+ and outcome reinforcement.
211
+ ```
212
+
213
+ ### What Department Heads Do
214
+
215
+ Department heads are LLM agents with domain-specific instructions, access to research citations, and the ability to forge computational tools. When a medical crisis hits, the Chief Medical Officer doesn't just say "this is bad." They:
216
+
217
+ - Analyze the event against their department's research knowledge
218
+ - Cite relevant scientific literature (DOI-linked)
219
+ - Forge computational tools (e.g., a radiation dose calculator) in a sandboxed V8 environment
220
+ - An LLM judge reviews each tool for safety and correctness
221
+ - Produce a structured report: summary, risks, recommended actions, proposed colony state changes
222
+
223
+ The commander sees all department reports and makes a decision. Different commanders weight different departments' advice differently based on personality.
224
+
167
225
  ## Architecture
168
226
 
169
227
  ```
@@ -178,10 +236,13 @@ src/
178
236
  orchestrator turn pipeline: director -> kernel -> departments -> commander
179
237
  director emergent event generation from simulation state
180
238
  departments parallel department analysis agents
239
+ agent-reactions parallel agent reactions (100+ cheap LLM calls)
240
+ agent-memory persistent memory, consolidation, stance drift
241
+ chat-agents post-simulation conversational agents
181
242
 
182
243
  cli/ server + dashboard (not exported)
183
244
  serve.ts HTTP + SSE server
184
- dashboard/ React/Vite live visualization
245
+ dashboard/ React/Vite live visualization + cellular automata viz
185
246
  ```
186
247
 
187
248
  **Design principle:** The engine owns the chassis. The scenario owns the domain. The kernel handles state, time, randomness, and invariants. The scenario handles event categories, department instructions, progression hooks, and research citations. The orchestrator connects them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paracosm",
3
- "version": "0.3.80",
3
+ "version": "0.3.82",
4
4
  "description": "AI agent swarm simulation engine with emergent crises, runtime tool forging, HEXACO personality drift, and deterministic kernels. Built on AgentOS.",
5
5
  "type": "module",
6
6
  "main": "dist/engine/index.js",