Skip to main content
Paul Welty, PhD AI, WORK, AND STAYING HUMAN

Work log: Phantasmagoria — March 25, 2026

What shipped today

Today was about closing the gap between “events that generate” and “events that play well.” The pipeline was already producing render-ready YAML with no manual fixes, but playtesting revealed three categories of mechanical problems: hallucinated tech names, a missing renderer handler, and — most importantly — modifiers that were all identical.

The hallucinated tech problem was that Phase 2 AI invented non-existent Stellaris techs like tech_ancient_databank, tech_physics_research, and tech_star_chart. These caused Stellaris runtime errors. The fix was a VALID_TECHS set in event_assembler.py that catches and replaces invalid techs during Phase 3 assembly — the AI can hallucinate freely but the pipeline catches it before render. The add_tech_progress effect type was also missing from the renderer entirely — events using it were silently commented out in the Clausewitz output. Added the handler.

The modifier problem was the biggest find. Every modifier in the game was rendering as country_unity_produces_mult = 0.08 (+8% unity) regardless of what the AI wrote in the description. The renderer was using keyword matching on the modifier name to guess what stat to apply, and most names didn’t match any keyword. The fix was to have Phase 2 explicitly specify modifier_stat and modifier_value (e.g., country_physics_research_produces_mult = 0.10). The prompt now includes a menu of valid Stellaris modifier stats with guidance on matching stat to narrative. The renderer uses these values directly. The result: modifiers now have varied, contextually appropriate stats — physics research for alien tech analysis, pop happiness debuff for unsettling discoveries, engineering research for studying wreckage.

Also completed a third round of dead code cleanup (-46 lines of unused imports) and fixed a crash in the site generator when a chapter returned None for options.

Completed

  • #242 — Implement add_tech_progress renderer handler
  • #243 — Remove remaining dead imports and functions from generators (round 3, -46 lines)
  • Fix site generator None options crash
  • Fix save_event_yaml re-save creating duplicate _1 files
  • Validate tech names in assembler — reject hallucinated techs
  • Add modifier_stat/modifier_value to Phase 2 prompt and renderer
  • Three full end-to-end generation + render cycles (0 errors on final build)

Carry-over

  • Playtest the latest Windows buildoutput/Phantasmagoria_2603251317_windows/ has 33 events with real modifier stats. This is the first build where modifiers are mechanically varied and contextually appropriate. Needs Stellaris 4.3 testing.
  • Balance review — Paul started reviewing individual events for “obvious best choice” problems. The modifier fix should help significantly (modifiers are now the primary balancing lever) but needs playtest validation.
  • Tech hallucination is frequenttech_physics_research, tech_sensors_2, tech_ancient_databank appear in nearly every generation run. The assembler catches them, but the fallback is always tech_mine_rare_crystals. Should add more valid techs to the pool or improve Phase 2 prompt guidance.

Risks

  • The modifier stat values from Phase 2 are not validated against any range. The AI could theoretically return modifier_value: 0.50 (+50% research) which would be game-breaking. Should add validation bounds.
  • tech_mine_rare_crystals is overrepresented as a fallback for every hallucinated tech. Need a smarter fallback that picks contextually.

Flags and watch-outs

  • The data/allocator.json has been modified by generation runs but not committed. It tracks event ID assignments and should be committed with the generated events.
  • Title diversity improved this run (“The Same Dream”, “Still Orbit”, “Calibration Sequence”, “Favorable Conditions”) — much better than the “Cartographer’s [X]” pattern from previous runs.

Next session

  1. Playtest in Stellaris 4.3 — the modifier fix is the biggest gameplay change. Need to verify modifiers feel meaningful and different across options.
  2. Add modifier value validation — cap modifier_value at ±0.15 in the assembler to prevent game-breaking values.
  3. Improve tech fallback diversity — instead of always falling back to tech_mine_rare_crystals, pick a contextually appropriate tech based on the effect’s neighboring effects or the event’s narrative.

Why customer tools are organized wrong

This article reveals a fundamental flaw in how customer support tools are designed—organizing by interaction type instead of by customer—and explains why this fragmentation wastes time and obscures the full picture you need to help users effectively.

Infrastructure shapes thought

The tools you build determine what kinds of thinking become possible. On infrastructure, friction, and building deliberately for thought rather than just throughput.

Server-side dashboard architecture: Why moving data fetching off the browser changes everything

How choosing server-side rendering solved security, CORS, and credential management problems I didn't know I had.

The work of being available now

A book on AI, judgment, and staying human at work.

The practice of work in progress

Practical essays on how work actually gets done.

Designed to learn, built to ignore

The most dangerous organizational failures don't throw errors. They look fine, return results, and quietly stay frozen at the moment of their creation.

The variable that was never wired in

The gap between having a solution and using a solution is one of the most persistent failure modes in organizations. You see the escaped variable. You see the risk register. You assume the work is done.

Your empty queue isn't a problem

Dropping a column from a production database is the organizational equivalent of admitting you were wrong. Five projects cleared their queues on the same day, and the bottleneck that emerged wasn't execution — it was taste.