- puga/: cached FIO + PRUNplanner clients, market view with order-book walk, econ formulas ported from PRUNplanner (tested against its suite and live FIO), saturation model v1 (reviewed by Opus) - tools/: scan (depth-aware), price, book, chain, state sync, plan_push (dry run default, [PuGa]-prefixed plans only), legacy prun_scan/prun_cxarb - docs/: mechanics (PRUNplanner is source of truth), roadmap, decisions, saturation design, archived handoff - secrets stay in .env (gitignored); ref/ holds PRUNplanner source (ignored) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4.2 KiB
PuGa: Prosperous Universe advisory toolkit
Agent-first toolkit for advising Dominik (username dodox, company GBI, faction Antares, home CX AI1). He asks questions; you answer by running tools in tools/ against live data. Read this file first, then docs/mechanics.md and state/company.yaml.
How to work with Dominik
- Expert user. Numbers, tables, ROI per day. Short answers, no fluff, no moralising. Semicolons over dashes; no em dashes.
- He plays on browser APEX (free licence) and sends screenshots; read them carefully, they override assumptions.
- Never guess APEX commands or numbers. Pull data (tools, FIO, PRUNplanner) or search. Command list:
docs/apex.md(when written) anddocs/handoff-2026-09-18.md§4. - Label every number: live (tool output), state (company.yaml), or estimate; say which in-game command would confirm an estimate.
- Prices move; re-run tools before quoting. Snapshot prices in the handoff doc are stale.
Source-of-truth rules
- PRUNplanner code wins over our own docs for game mechanics (
ref/frontend/src/features/planning/calculations/,ref/backend/). Ifdocs/handoff-2026-09-18.mdconflicts with it, the handoff is wrong; fixdocs/mechanics.md. - In-game numbers Dominik reports beat both, especially for planet resource factors.
ref/is a gitignored copy of the PRUNplanner repos; refresh withtools/refresh_refs.sh.
Setup
- Python venv at
.venv(.venv/bin/python,.venv/bin/pip). Deps inrequirements.txt. - Secrets in
.env(gitignored; template.env.example): FIO REST key, FIO API key, PRUNplanner key. Never print or commit them; do not ask Dominik to paste keys into chat. - Scope: whole universe supported; default region Antares (exchange AI1,
--cxto change).
Layout
CLAUDE.mdthis file;docs/mechanics, refs, roadmap, decisions, archived handoff.state/company.yamlcompany state (bases, buildings, ships); update when Dominik reports changes.puga/shared library (data layer, market, econ, world);tools/CLIs;data/cache/fetched data;tests/.ref/PRUNplanner source (read-only reference).
Tools (current)
-
tools/state.py sync|showrefreshesstate/company.yamlfrom live FIO (cash, permits, buildings, real production efficiency, storage, ships). Run it before answering anything about his current position. -
tools/plan_push.pybuilds/validates PRUNplanner plans fromplans/*.yaml(dry run by default;--applyonly after Dominik says yes; only[PuGa]-named plans are created/updated;listshows his plans). Specs live inplans/. -
tools/chain.py TICKERmake-vs-buy cost tree plus sourcing depth of inputs. -
tools/book.pyorder-book ladder (price levels, cumulative units) for one material at one CX. -
tools/price.pyprices across CX with VWAP, daily volume, and order-book fill price for a quantity (--qty). Library:puga/market.py,puga/fio.py,puga/prunplanner.py. -
tools/scan.pyDEPTH-AWARE recipe scan (use this): N* buildings the market absorbs, ROI at N=1 and N*, patient prices, ask-walked inputs. Flags: --cx --tier --cogc --skip --hq --budget --min-n --sort roi|total|roi1 --show-thin. Library:puga/saturation.py. -
tools/prun_scan.pylegacy single-step scan at top-of-book prices; overstates thin markets. Baseline only. -
tools/prun_cxarb.pyinter-exchange arbitrage per material. Legacy; overstated profit 7 to 11x on thin routes;tools/arb.pyreplacement is on the roadmap. -
puga/econ.pypure formulas ported from PRUNplanner: efficiency stack, workforce satisfaction/consumption, extraction, production I/O, hab optimizer.tests/test_econ.pyholds the reference values.
Model policy
Sonnet builds; spawn a bigger model (Agent model: opus|fable) for the review points in docs/decisions.md. Roadmap: docs/roadmap.md.
Key analytic rule: depth matters
PRUNplanner's ROI Overview ranks recipes as if the market absorbs unlimited output (e.g. 0.25 day ROI on a recipe whose whole market fits in 2 buildings). Every opportunity we report must include saturation: max buildings the market can absorb on both the output side (demand, traded volume, order-book walk) and the input side (supply). Report ROI at realistic fill prices, not top-of-book, and total absorbable profit/day.