- max_units_at_impact(): walks the LIVE bid book for a genuine, ticker- specific instant-exit liquidity check, replacing a flat 25%-of-flow guess (a price-vs-volume elasticity regression was tried first and abandoned - confounded by demand-driven volume on real data). Surfaced as an [exit-thin] WARNING flag, not a hard cap - a single order-book snapshot is less reliable than the 30-day flow aggregate that still drives n_lim/filtering (using it as a hard cap once silently zeroed out a real recipe from one noisy snapshot). - tref_precise(): real variance of daily traded volume instead of a Poisson unit-independence bound, wired into stage 2 only (bounded candidate set, cached). Also fixed: was averaging only over trading days, overstating flow ~3x for sparse tickers. - n_out(): dropped the demand-coverage term, which penalized thin resting-bid books even though production sells via patient asks taken by walk-up buyers with no resting bid at all. - --sort area: profit/day per tile of TOTAL footprint, now including the single-tier hab area a building's workforce drags along (was building area only). - --deprec/--reclaim-frac: amortizes unreclaimed capex, not full capex - real FIO reclaim data showed 50-86% returned even at near-100% condition, contradicting a 100%->0 decay-curve assumption. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PuGa
A recursively self-improving harness for Claude and humans for the game Prosperous Universe. You ask questions in plain language; Claude answers by running the tools in this repo against live market data and your own company data, instead of guessing - and when it catches itself doing the same ad-hoc work by hand more than once, it builds a tool for it instead, so the harness keeps getting sharper the more it's used.
what should I build next?
is a second smelter still worth it, or is the AL market full?
simulate adding a CHP to Deimos before I spend anything
how long until Nike runs out of RAT?
where do I post 40 BHP so it actually clears today?
Name origin: Plutonium–gallium alloy (Pu–Ga) is a specialized metallic blend of plutonium and gallium primarily used to stabilize the desirable delta (δ) phase of plutonium at room temperature.
What it can do
- Find what to build. Every recipe, but with market depth: how many buildings the market absorbs, what you'd really get for the output, and whether the margin has held for months or is a spike.
- Simulate before you spend. A replica of the PRUNplanner simulator, verified against the real thing. Marginal payback of one more building, and a warning if it overloads your housing.
- Watch your position. Cash, permits, buildings, storage and ships synced from FIO. Runway per material, cash-aware shopping lists, multi-base chains with real freight.
- Trade. Where to post an ask, how to split it, how long it takes to clear, where idle cash can sit meanwhile.
- Talk to PRUNplanner. Reads your plans, writes new ones, picks up edits you make in the web UI. Only touches plans it created.
Every number is an estimate from public and personal game data. Prices move; re-run before acting.
Quick start
git clone <repo-url> PuGa && cd PuGa
python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
cp .env.example .env # FIO and PRUNplanner keys, see docs/usage.md
claude # open Claude Code here and ask
Every tool is also a command: puga scan, puga simulate plan.yaml, puga sell BHP 40. Tool list, setup and layout: docs/usage.md. Verified game mechanics and the market model: docs/.
Your own empire (profile, state, plans, notes) lives in the gitignored empire/ folder, so the repo stays public.
Not affiliated with Prosperous Universe, FIO or PRUNplanner.