Add simulator replica, persistence, planet scan, README; split empire state out of the repo

- tools/simulate.py + puga/simulate.py: replica of PRUNplanner's simulator (flows and
  efficiency verified against screenshots), reports real new capex (planned minus built)
- tools/scan.py: staffing variants, freight, HQ/experts, --planet mode, demolish-later,
  --min-n as a pure market-size filter, --json output
- tools/history.py, tools/persistence.py: margin history and short-horizon payback checks
- tools/plan_push.py: guarded delete; tools/state.py: syncs to empire/
- README with features and setup; CLAUDE.md made generic
- Own-empire material (profile, state, plans, notes) moved to gitignored empire/;
  generic examples in plans/examples and state/company.example.yaml

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 00:11:02 +02:00
co-authored by Claude Sonnet 5
parent 7a538cb300
commit 3bbf524ebb
26 changed files with 778 additions and 259 deletions
+4 -4
View File
@@ -1,11 +1,11 @@
# Decisions log
## 2026-09-18 Project plan and working agreements
- Goal: agent-first toolkit; Dominik asks, the agent answers by running tools against live data. Not an end-user app.
- Goal: agent-first toolkit; the player asks, the agent answers by running tools against live data. Not an end-user app.
- PRUNplanner source (`ref/`) is the source of truth for mechanics; conflicts with the old handoff resolved in its favour (`docs/mechanics.md`).
- Scope: whole universe, default region Antares (CX AI1). Python in `.venv`, secrets in `.env`, git branch `master`. No commits without Dominik asking.
- Scope: whole universe, default region Antares (CX AI1). Python in `.venv`, secrets in `.env`, git branch `master`. No commits unless the player asks.
- Every reported opportunity must include market saturation (buildings the market can absorb, fill-price ROI, absorbable profit/day). Reason: PRUNplanner's ROI Overview ranks recipes with no depth awareness (e.g. 0.25 day ROI on recipes 2 buildings saturate).
- PRUNplanner integration: API key auth (`Authorization: Api-Key <key>`); plans can be created/updated via `/planning/plan/`. Writes only create/update plans prefixed `[PuGa]`; never touch Dominik's other plans; show payload and get a yes before each write.
- PRUNplanner integration: API key auth (`Authorization: Api-Key <key>`); plans can be created/updated via `/planning/plan/`. Writes only create/update/delete plans prefixed `[PuGa]` (enforced in `tools/plan_push.py`); never touch the player's other plans. Deleting is allowed only on request (or for throwaway test plans the tool itself made). When the player explicitly asks for a plan, creating it directly is fine; show the dry run in the reply.
## Model and review policy
- Default: Sonnet 5 does the building (API plumbing, CLIs, ports, tests).
@@ -14,5 +14,5 @@
2. Econ formula port (efficiency stack, workforce, hab LP, extraction) checked against PRUNplanner numbers.
3. `plan_push` payload handling and the own-plans-only guard.
4. Big-money recommendations (e.g. BHP go/no-go, roughly 100k AIC): independent second opinion on the numbers.
- If a bigger-model spawn is refused, tell Dominik and ask him to run the review.
- If a bigger-model spawn is refused, tell the player and ask them to run the review.
- Routine tool building is not reviewed by a bigger model.
-96
View File
@@ -1,96 +0,0 @@
> ARCHIVE. Superseded where it conflicts with docs/mechanics.md (PRUNplanner model). Its measured smelter times (14h55, 12h26) were taken before coffee was supplied and are dropped; use base times / efficiency model.
# Prosperous Universe: handoff for advising Dominik (company GBI)
Snapshot date: 2026-09-18. Prices move; re-pull from FIO before quoting numbers.
## 0. How to work with Dominik
- Expert user, wants numbers, tables, ROI per day, no fluff, no moralising. Short answers. Semicolons over dashes; no em dashes.
- He plays on browser APEX (free licence). Sends screenshots; read them carefully, they override my assumptions.
- When unsure, pull FIO data or search; do not guess commands (mistakes made: NOTS is notifications not notes; CO needs a company code; REP and FLTP do not exist; flight planning is SFC <ship>).
- Always state which numbers are estimates and what in-game command would replace them.
## 1. Company status (as of 2026-09-18)
- Company: greenish-blue Industries, ticker **GBI**. Username dodox. Faction Antares Initiative (AI). Exchange AI1 (Antares Station, ANT, in Antares I / ZV-307). Currency AIC.
- Licence: FREE. Consequences: no Local Market ads or player contracts (browse only), max 2 ships in flight, no screen variables, HQ max level 5. One month of PRO converts permanently to BASIC (can accept LM ads and shipping jobs, not post).
- Base: **Deimos (ZV-759c, Antares II)**. Metallurgy COGC programme (Antares Metallurgy bonus applies). ~200 of 500 area used. Environment normal: only MCG surcharge (4 MCG per area).
- Buildings: 2 EXT (ALO), 5 SME, 4 HB1 (400 beds), pioneers 370/400 required/capacity. Possibly more since; ask.
- Smelters run flux recipe: 6 ALO + 1 FLX + 1 C + 1 O -> 4 AL, 14h55 (his measured time). Non-flux: 6 ALO + C + O -> 3 AL, 12h26.
- Extractor (SUPERSEDED, see docs/mechanics.md): actual is 28 ALO/day/EXT (factor 0.4 x 70); the 'concentration 28' here was the daily-extraction chip.
- Burn (his table): 11.5 batches/day -> ~46 AL/day, uses 69 ALO/day; own ore ~40/day; buys ~29 ALO/day (~6.2k AIC/day). C, O, FLX 11.5/day each. DW, RAT 14.8/day. COF 1.9, PWO 0.7.
- Daily inputs ~26k AIC (C ~13.7k is the big one), AL revenue ~56k, margin ~30k/day.
- Ships: 2 starter ships, 500 t / 500 m3 cargo, empty mass 828 t. Ship 2 mostly idle.
- Fuel measured: ANT -> Deimos one way, nearly empty: 109 SF + 18 FF = 3,241 AIC. FTL is per jump (18 FF), STL scales with mass. Loaded round trip est. 8.5 to 10k AIC.
- Cash: ~6k at last report; wealth is in AL stock and daily output.
- Base permits: 2, one used (Deimos). Faction sent "expansion package" contract offer (arrives in CONTS, accept manually; deadline starts on accept; core module materials supplied, environment materials not).
- Second base decision: **Nike** (ZV-194a, Antares III), parked; see plan.
## 2. Current plan (agreed 2026-09-18)
### Thesis: Basic Hull Plates (BHP) on Deimos
- Recipe: 12 AL + 1 STL + 1 HE -> 4 BHP, 7.2 h, Hull Weld Plant (HWP: 25 area, 40 settlers + 10 technicians, Metallurgy expertise; cost 4 BBH, 6 BDE, 6 BSE, 2 LTA, 4 TRU + 100 MCG ~72k).
- Why: technician gate keeps producers few; AI1 supply fell ~3,300 -> ~800 units/month over the year; steel fell 2,700 -> 1,850; BHP rose 4,000 (Mar 2026) -> 6,490 (Sep) at all exchanges (NC1 4,300 bid/5,780 ask, CI1 5,000/6,500). Own AL costs ~565 to make vs 1,210 bid; plant adds ~500 to 675 AIC per AL on top.
- Margin history (per batch, AI1 monthly avg): positive 11 of last 14 months; negative Jan to Apr 2026 (steel spike). 12-month avg BHP ~4,700.
- Run without technicians: efficiency is proportional to headcount present, not tier-weighted (handbook FAQ confirms; example 20 settlers of 20+30 -> 40%). HWP with 40/50 -> ~80%: ~2.67 batches/day, ~11 BHP, ~32 AL/day.
- Net/day at 80%: ~19k at BHP 6,000, ~13.5k at 5,500, ~10k at 5,000. Capex HWP + HB2 ~105k -> 12 to 17%/day. HB3 (~155k, lightweight prefabs) adds only ~25% output -> 3 to 4%/day; conditional.
- Market risk: AI1 trades ~40 BHP/day; his 11/day is ~40% of that, so plan to sell at 5,500 to 6,000 with patient asks; CI1/NC1 as outlets. Cluster-wide ~6,000 BHP/month trade.
- Exit: sell AL as AL; sunk cost ~105k.
- Go/no-go before buying: BHP bid > 5,500 and STL ask < 2,300 (CXOB BHP.AI1, CXOB STL.AI1).
### Deimos TODO (ordered)
1. HWP + HB2 (~105k) + 3 days imports (~23k). Needs ~106 AL sold. Time completion near the weekly POPR so 40 settlers arrive (reserve pool may fill immediately). Deimos idle settlers ~17k, technicians ~1.3k.
- Buy: HWP 4 BBH, 6 BDE, 6 BSE, 2 LTA, 4 TRU, 100 MCG; HB2 2 BBH, 2 BDE, 2 BSE, 2 BTA, 2 TRU, 48 MCG; 8 STL, 8 HE; settler goods 3 days for 40: 6 DW, 7 RAT, 1 KOM, 1 EXO, 1 PT, 1 REP.
- Ongoing extra imports at 80%: 2.7 STL, 2.7 HE, 2.0 DW, 2.4 RAT, 0.4 KOM, 0.2 EXO, 0.2 PT, 0.08 REP per day (~7.6k AIC, ~22 t). Ship gets lighter overall (86 t/day less AL outbound).
2. FP for DW (~47k: 4 BBH, 4 BDE, 6 BSE, 48 MCG; 40 pioneers, 12 area). 10 H2O -> 7 DW, 2.4 h; buy water at ANT (0.2 t/unit, ~57 AIC), ~3.6k/day net, ~7.8%/day; margin positive every month for a year (1k to 3.5k/day range). FP is Food Industries expertise, no bonus on Deimos.
3. HB1 + EXT (~80k: 140 MCG, 18 BSE, 4 BBH, 2 BDE, 1 BTA). Ends the 29 ALO/day purchase; ~6%/day (18% only if smelters were idling).
4. HB3 (~155k: 4 LBH, 4 LDE, 4 LSE, 8 LTA, 56 MCG) only if PROD shows HWP ~80% and BHP > 5,500. Technician goods per 100/day: 7.5 DW, 7 RAT, 1 ALE, 0.5 MED, 0.5 HMS, 0.1 SCN, 0.1 SC.
5. Grow AL: EXT + 2 SME + HB1 per step (~180k, ~3.6%/day); second HWP when AL > 80/day and BHP still pays.
6. HQ level 1 (~56k: 12 MCG, 4 TRU, 6 BBH, 4 BDE, 4 BSE, 2 BTA) for a permit to expand Deimos to 750 area.
### Second base (parked): Nike, ZV-194a, Antares III
- 1 jump from Antares II; 2 jumps to ANT (via Antares II). Construction COGC. LST 58 (very rich), BOR 4. Env: 0.62 g, 0.04 bar (needs SEA, 1 per area, ~200 AIC each), 30 C. Fertility -1. LM + warehouse exist. Population: ~7k idle pioneers, ~15k idle settlers, ~3.8k idle technicians.
- Phase 0: found (25 SEA for core) + HB1 + EXT (~92k) -> ~42 LST/day (estimate, scaled by concentration) sold at ~159 -> ~5.3k/day, ~5.8%/day.
- Phase 1: PP1 + HB1 (~76k). PP1 pioneer-only, Construction expertise (bonus). BTA from 1 FE + 50 PE (3.6 h), BSE from 2 LST + 1 FE (6 h), BBH from 1 LST + 2 FE (7.9 h).
- Phase 2: BMP + HB1 (~79k). 4 LST + 2 SIO -> 50 MCG, 6 h (Manufacturing expertise, no bonus).
- Phase 3 optional: CHP + HB2 (~73k). 1 LST -> 10 FLX, 12 h (20 pio + 60 settlers, Chemistry, no bonus).
- Alternatives evaluated and rejected: Harmonia (ZV-896b, Antares IV; fertility -0.10, water 37, Agriculture; carbon via FRM 2 H2O -> 4 HCP then INC 4 HCP -> 4 C; ~268k for ~7.4k/day; better later for food when workforce > 600), Vulcan (FEO 35 but HSE per building, 1.1%/day), Black Mesa (-225 C, 4.6 bar, INS + HSE ~66k per building, TIO 12; 0.5 to 1%/day), Antares II a (85 C, TSH 40k per building), Phobos (Antares I, mild, water 15, SIO 30; fine as a later hub/bottling site), Norwick (YK-649b, Food Industries bonus, 2 jumps).
- Expansion contract: accept only when carrying the SEA; found base with BSC ZV-194a.
## 3. Game mechanics learned (verified unless marked est.)
- Profession only sets starter buildings; faction only sets start planets and community. COLIQ resets company (cooldown). One base per planet per company. Permits: 2 at start; HQ levels add permits; a permit can expand a base 500 -> 750 area; demolishing a core module (no HQ, no buildings, empty storage, ship present) refunds the permit.
- Demolition refunds materials: 100% within 1 h, then linear decay with age since last repair; ~0 at 60 days. BSL shows "Reclaimable materials". Repair around 90 days.
- MCG per building = 4 x area on normal rocky planets. Environment extras per building: TSH (>75 C, ~40k each), INS (cold, 10 per area, ~200 each), HSE (>2 bar, ~17k each), SEA (<0.25 bar, 1 per area, ~200 each), MGC (low g, ~39k), AEF + BL (gaseous). Core module: 4 LSE, 4 LDE, 4 LTA, 12 PSL, 8 TRU + 100 MCG + env extras. Planet BuildRequirements in FIO list exact extras.
- Workforce: efficiency multiplier = workers present / required, headcount-proportional across tiers (handbook). Missing luxuries: PWO alone ~87%, COF alone ~91% (FAQ). Weekly distribution at POPR; reserve pool fills immediately if available; bases keep 75% of workforce between reports. Idle workers still consume.
- Consumption per 100 per day: Pioneers 4 DW, 4 RAT, 0.5 OVE, 0.5 COF (lux), 0.2 PWO (lux). Settlers 5 DW, 6 RAT, 0.5 EXO, 0.5 PT, 1 KOM (lux), 0.2 REP (lux). Technicians 7.5 DW, 7 RAT, 0.5 MED, 0.5 HMS, 0.1 SCN, 1 ALE (lux), 0.1 SC (lux). Wages at AI1 asks: pioneer ~23, settler ~39, technician ~71, engineer ~249, scientist ~541 AIC/day.
- Housing: HB1 100 pioneers, 10 area (4 BBH, 2 BDE, 2 BSE, 1 BTA + 40 MCG ~33k). HB2 75 settlers, 12 area (~32k). HB3 75 technicians, 14 area (4 LBH, 4 LDE, 4 LSE, 8 LTA ~155k).
- Buildings (area, workforce, base cost ex MCG): EXT 25, 60 pio, 16 BSE. SME 17, 50 pio, 4 BBH 4 BDE 6 BSE. FP 12, 40 pio. FRM 30, 50 pio. INC 10, 40 pio. COL 15, 50 pio. RIG 10, 30 pio. BMP 12, 100 pio. PP1 19, 80 pio. WEL 70 pio. PP2 25, 25 pio + 25 sett. CHP 18, 20 pio + 60 sett. GF 27, 80 sett. HWP 25, 40 sett + 10 tech. FS 25, 50 sett. STO 15, no workforce.
- Extractor rate est.: scale his Deimos number (20 ALO/day at concentration 28) linearly by concentration; RIG/COL for liquids/gases assumed ~0.7x (unverified). Real rate shows only after building on that planet.
- Fertility: farm speed roughly x(1 + fertility); range about -33% to +33%. Deimos -0.34, Harmonia -0.10, Promitor +0.40. COGC programme bonus assumed ~25% for matching expertise (unverified; read PROD batch time vs BUI base time).
- Weights (t/unit): H2O 0.2, DW 0.1, RAT 0.21, C 2.25, O 1.14, FLX 0.25, ALO 1.35, AL 2.7, LST 2.73, MCG 0.24, BSE 0.3, SEA 0.15, STL 7.85.
- Carbon comes only from INC burning crops (HCP, GRN, MAI). FLX from CHP (1 LST -> 10). GL from GF (2 SIO + NA [+FLX] -> 10 to 12). STL from SME (2 FE + 8 O -> 2 STL) at about its market price.
- Markets: player-driven, thin; inter-exchange spreads of 5 to 15% persist because hauling is slow and capital-heavy; MM (market maker) sets floors/caps on some goods (e.g. SDR 100k bid). Prices trend over months, not days. Antares imports worker goods (SC, HMS, ALE, DDT) at a premium.
- Fuel: FTL fixed per jump (18 FF starter ship), STL scales with total mass. Jumps: Antares II is hub, 1 jump each to Antares I (ANT station), III (Nike), IV (Harmonia). Exchanges by distance from ZV-759 (FIO units): ANT 47, HRT 391, BEN 423, ARC 492, MOR 642, HUB 1414. Exchange codes: AI1 ANT, NC1 MOR, CI1 BEN, IC1 HRT, NC2 HUB, CI2 ARC.
- Shipping ads: 5 AIC/t cross-faction is a lowball; a starter ship needs fee > 2x SFC cost. Free licence cannot accept ads anyway.
- Naming planets is a paid support-tier perk, not tied to bases.
## 4. APEX commands that matter
BS <base> base overview; BSC <planet> found/construct; BSL buildings list + demolish; WF <base> workforce; PROD <base> production lines (efficiency shown); BUI <ticker> building info (generic, no planet extras); PLI <planet> planet info; POPR <planet> population report; SYSI <system>; CX <ex>; CXOB <MAT.EX> order book; CXPC <MAT.EX> chart; CXPO place order; CXOS own orders; LM <planet/station> local market; CONTS contracts; CO <company code> company info incl. rating and faction reputation; USR <name> user profile; SFC <ship> flight planning (fuel and cost); FLT fleet; INV; SCRN screens, ADD; COMG chat; NOTS notifications (not notes). Notes need Refined PrUn (XIT NOTE, XIT TODO). Screen variables exist (June 2026) but PRO only. Commands are case-insensitive.
## 5. FIO API (rest.fnar.net), public, no auth
- /exchange/all: all materials x exchanges with Bid, Ask, Supply, Demand, MMBuy, MMSell (book totals only, no order list). /exchange/{MAT}.{EX}: single, includes BuyingOrders/SellingOrders lists. /exchange/cxpc/{MAT}.{EX}: OHLCV history (filter Interval == DAY_ONE).
- /exchange/station: stations with SystemId and ComexCode.
- /material/allmaterials: Ticker, Name, Weight, Volume, CategoryName, MaterialId.
- /recipes/allrecipes: BuildingTicker, Inputs, Outputs (Ticker, Amount), TimeMs.
- /building/allbuildings and /building/{TICKER}: AreaCost, Pioneers..Scientists, BuildingCosts (excludes MCG and env extras), Expertise.
- /planet/allplanets/full and /planet/{id}: Gravity, Pressure, Temperature, Fertility, Resources (MaterialId, Factor, ResourceType), COGCPrograms (ProgramType, Start/EndEpochMs), BuildRequirements (incl. MCG and env extras with amounts), HasLocalMarket, HasWarehouse, FactionCode, SystemId. Some fields may be None; guard.
- /systemstars: SystemId, NaturalId, Name, PositionX/Y/Z, Connections (jump graph; BFS for routes).
- /global/workforceneeds: consumption per 100 per tier.
- Private data (his inventory, production, ships) needs the FIO Client extension installed and a username / API key; not set up yet.
- Note: some planet resource Factor values differ from in-game display (Deimos H2O shows 20 in FIO vs 14 in UI); prefer in-game numbers when they conflict.
## 6. Analysis scripts (delivered as files)
- prun_scan.py: scans every recipe; buys inputs at ask, sells outputs at bid at one exchange; subtracts wages; capex = building + housing (MCG 4x area, no env extras, no COGC, no fuel); filters by days of open demand. Flags: --cx, --tier P|S|T|E|Sc, --depth, --sort roi|net|area, --top, --mcg, --understaff (drops tiers, efficiency = staffed share ** --penalty), --cross (buy cheapest CX, sell best CX; not a real trade route).
- prun_cxarb.py: pure inter-exchange arbitrage per material; spread per unit / ton / m3; depth proxy min(supply src, demand dst). Flags --from, --to, --minqty, --sort, --top.
- Findings 2026-09-18 (AI1): HWP BHP 24% ROI/day (25% without technicians); then settler tier ~8 to 9% (POL DEC, CLF HMS, FS AFR); pioneer tier: PP1 BTA 8.1%, FP DW 7.8%, FRM GRN 6.9%, WEL GV 6.6%, FP RAT ~6%, SME SI 5.9%. Raw-extraction bases galaxy-wide: Nike LST is #2 (5.8%) behind a Moria gold-ore planet. Last-step assembly with MM bids (e.g. surgical drones, 94k in / 100k out) is near-zero after wages.
## 7. Price snapshot 2026-09-18 (AI1 ask unless noted)
AL bid 1,210 / ask 1,250; ALO 215; C 1,140 (1y avg 1,066; 890 a year ago, ~1,200 since Feb); O 116; FLX 298 (bid 260); STL 2,000 (bid 1,600); HE 247; BHP bid 6,490; DW 151 (bid 150); RAT 232; H2O 59; COF 994; PWO 445; MCG 49; BBH 3,990; BDE 3,690; BSE 2,600; BTA 2,790; TRU 650; LTA 5,400; LBH 6,850; LDE 13,700; LSE 12,800; PSL 5,670; SEA 200; INS 197; HSE 16,900; TSH 39,900; LST 167 (bid 159); SIO 105 to 119; GL 411 to 470; HCP 469; FE 1,000 (bid 975); FEO 116; TI bid 2,110; TIO 338; SF 24.5 (bid 23.8); FF 35 (bid 28.6). Prefabs (BTA, BSE, BBH) are at 1-year highs (+35 to 55% vs annual average).
## 8. Open items / things to verify in-game
- HWP: expertise line in BUI HWP (FIO says Metallurgy); actual efficiency without technicians on PROD; real BHP fill prices.
- Extractor LST rate on Nike (after building). SEA count per building on Nike BSC.
- COGC bonus size: compare PROD batch time to BUI base time.
- Loaded-ship fuel: SFC with full hold.
- Whether faction expansion contract has a founding deadline and what it supplies.
- Population report timing on Deimos (last one ~2026-09-16).
+15 -6
View File
@@ -23,7 +23,7 @@ Faction bonus table: ANTARES electronics 5%; BENTEN manufacturing 5%; HORTUS agr
## Extraction (`extractionCalculations.ts`)
- Cycle times: EXT (mineral) 12 h, COL (gas) 6 h, RIG (liquid) 4.8 h.
- Amount per cycle = ceil(daily_extraction x cycle/24h); time scaled so daily rate stays daily_extraction.
- Daily extraction = factor x 70 (MINERAL, LIQUID) or x 60 (GASEOUS), factor = concentration as a fraction (backend `gamedata/fio/importers.py`). VERIFIED live: Deimos ALO factor 0.4 -> 28/day per EXT (FIO order 14 ALO / 12.008 h), O 0.3 x 60 = 18, H2O 0.2 x 70 = 14: exactly the resource chips APEX and PRUNplanner show (the chip number IS daily extraction, not concentration). The old handoff note 'FIO H2O 20 vs UI 14' was factor x 100 vs x 70. Efficiency then scales it. PRUNplanner quirk: ceil() on a float 28.0000004 shows 15 per 12h51m instead of 14 per 12h; the daily rate (28) is the same.
- Daily extraction = factor x 70 (MINERAL, LIQUID) or x 60 (GASEOUS), factor = concentration as a fraction (backend `gamedata/fio/importers.py`). VERIFIED live: an ALO factor of 0.4 -> 28/day per EXT (FIO order 14 ALO / 12.008 h), O 0.3 x 60 = 18, H2O 0.2 x 70 = 14: exactly the resource chips APEX and PRUNplanner show (the chip number IS daily extraction, not concentration). An old note 'FIO H2O 20 vs UI 14' was factor x 100 vs x 70. Efficiency then scales it. PRUNplanner quirk: ceil() on a float 28.0000004 shows 15 per 12h51m instead of 14 per 12h; the daily rate (28) is the same.
## Production time
- Recipe time in a building = time_ms x repeats / efficiency (efficiency shortens time). Batches/day = 24h x buildings / sum(times) (`usePlanCalculation.ts`, `buildingCalculations.ts`).
@@ -34,15 +34,24 @@ Faction bonus table: ANTARES electronics 5%; BENTEN manufacturing 5%; HORTUS agr
- Optimizer is an LP (min cost, else min area if it does not fit). Reimplement in `puga/econ.py`.
## Conflicts with the old handoff (resolved in favour of PRUNplanner)
1. Handoff says "Antares Metallurgy bonus applies" on Deimos. PRUNplanner: Antares faction bonus is electronics only; metallurgy is Moria. The Deimos benefit is the COGC x1.25, not a faction bonus. Verify in-game via PROD batch time.
2. Handoff treats COGC ~25% as unverified; PRUNplanner models it as x1.25 efficiency for matching expertise.
3. Impact on BHP thesis: HWP is Metallurgy and Deimos runs an active Metallurgy COGC, so with both luxuries supplied SME/HWP run at about 125% workforce-weighted; HWP at 40/50 headcount is about 0.8 x 1.25 = 100% before expert and HQ. The handoff's 80% output figure ignores COGC.
1. A common assumption is that the Antares faction gives a Metallurgy bonus. PRUNplanner: the Antares faction bonus is electronics only; metallurgy is Moria. A Metallurgy benefit on an Antares base comes from the COGC x1.25, not a faction bonus.
2. COGC ~25% was once treated as unverified; PRUNplanner models it as x1.25 efficiency for matching expertise (confirmed against live FIO efficiency, see below).
3. Consequence: HWP is a Metallurgy building, so on a base with an active Metallurgy COGC, with both luxuries supplied, HWP at 40/50 headcount runs at about 0.8 x 1.25 = 100% before expert and HQ bonuses; do not assume 80%.
4. Fertility slope is 10/33 (about 0.30 per fertility point), not 1.0.
## Base recipe times (FIO, confirmed in APEX)
- SME AL: non-flux 12h0m (6 ALO + C + O -> 3 AL), flux 14h24m (6 ALO + FLX + C + O -> 4 AL). Actual times = base / efficiency; use the efficiency model, not old hand measurements.
## Verified against live FIO (2026-09-18)
- FIO `/production/{user}` lines carry `Efficiency` (ground truth per building type) and `Condition`. Deimos smelters: 1.3361. Model: COGC 1.25 x expert(2) 1.0696 x condition 0.99936 = 1.33614, i.e. within 0.004%. So PRUNplanner's factor stack is right in-game; add a CONDITION factor (building wear) that PRUNplanner's list omits. Extractors: 0.9993 = condition only (no COGC on resource extraction).
- Company cash lives at `/company/code/{ticker}` Balances (AIC 21,950 on 2026-09-18). Permits: `/sites` InvestedPermits 1, MaximumPermits 3 (not 2).
- FIO `/production/{user}` lines carry `Efficiency` (ground truth per building type) and `Condition`. a live smelter with 2 experts: 1.3361. Model: COGC 1.25 x expert(2) 1.0696 x condition 0.99936 = 1.33614, i.e. within 0.004%. So PRUNplanner's factor stack is right in-game; add a CONDITION factor (building wear) that PRUNplanner's list omits. Extractors: 0.9993 = condition only (no COGC on resource extraction).
- Company cash lives at `/company/code/{ticker}` Balances. Permits: `/sites` InvestedPermits and MaximumPermits (the game maximum can exceed what a planner empire setting says).
- Use `tools/state.py sync` to refresh `state/company.yaml`; it needs the FIO extension to have uploaded recently.
## PRUNplanner plans always include the core module (CM)
`usePlanCalculation.ts` (calculateConstructionMaterials) hard-codes CM x1 into every plan's construction list, so Plan Cost, Area (+25) and the payback ('ROI ... d') always include a core module (~202k at universe prices), even if the base already has one. Plan Construction Cart subtracts what is already built, but the Plan Cost overview does not. Degradation is production buildings only / 180 (CM and habs excluded). For an add-on buildout, judge payback on new capex only (buildings + habs you actually need to construct), not the simulator's ROI line. `tools/simulate.py` reproduces this and prints area, cost and degradation the same way.
## Workforce arrival: how and when do new workers appear? UNVERIFIED
- Claim carried from an old handoff: workers are distributed weekly at the population report (POPR), a reserve pool fills immediately if available, bases keep 75% of workforce between reports. Nothing in PRUNplanner's code, FIO or the APEX POPR screen confirms or refutes it; earlier answers repeated it too confidently.
- Verified facts: reports are WEEKLY (POPR chart points 7 days apart; #289 was Wed 16 Sep ~08:00Z, so next ~Wed 23 Sep ~08:00Z). FIO `/workforce/{user}/{planet}` gives per-tier Population, Reserve, Capacity, Required, Satisfaction, but no report time (LastWorkforceUpdateTime null).
- One base's data is consistent with both readings: the last HB1 + SME finished Wed 16 Sep 07:00Z, about an hour before report #289, and 370 pioneers are present now.
- TEST: build the HB2 (needed anyway) and poll FIO `/workforce/{user}/{planet}` (SETTLER Population/Reserve/Capacity). If settler Population rises well before Wed 23 Sep, workers arrive continuously and the report timing does not matter. Record the result here.
+3 -1
View File
@@ -16,7 +16,9 @@ Legend: [ ] todo, [x] done. Build order matters; each step is usable on its own.
10. [x] `tools/state.py sync` (sites, production efficiency, storage, ships, cash, permits): inventory, production, ships into `state/`.
11. [ ] Docs to fill: `docs/apex.md`, `docs/fio.md`, `docs/playbook.md` (question type -> tool), `docs/decisions.md`.
12. [ ] `tools/portfolio.py`: choose the set of 1-building opportunities for one base that maximises total profit given shared whole-building housing (HB1/HB2/...), capex, permits and (for demolish-later) 60-day value decay. Persistence check exists (`tools/persistence.py`); wire it into the ranking.
## Open questions
- PRUNplanner auth is known (`Authorization: Api-Key <key>`). FIO REST and FIO API are separate services with separate keys (Dominik; possibly separate accounts; my earlier "one API" reading was wrong). Keys are in `.env`. Verified 2026-09-18: FIO_REST_KEY works on rest.fnar.net as `Authorization: <key>` (own /sites, /storage etc. readable); FIO_API_KEY gives 401 there, host unknown. PRUNplanner key works (plans 0, empires 1, cx prefs 1 on his account). Still unknown: the OpenAPI spec at https://doc.fnar.net/api.json has no securitySchemes. Probe with read-only calls.
- PRUNplanner auth is known (`Authorization: Api-Key <key>`). FIO REST and FIO API are separate services with separate keys (separate services with separate keys; an earlier "one API" reading was wrong). Keys are in `.env`. Verified 2026-09-18: FIO_REST_KEY works on rest.fnar.net as `Authorization: <key>` (own /sites, /storage etc. readable); FIO_API_KEY gives 401 there, host unknown. PRUNplanner key works (plans 0, empires 1, cx prefs 1 on his account). Still unknown: the OpenAPI spec at https://doc.fnar.net/api.json has no securitySchemes. Probe with read-only calls.
- (resolved) PRUNplanner `exchanges/` has vwap_daily/7d/30d and traded volume; merged into `puga/market.py`. Trend history via cxpc still todo.
- Extraction: concentration to daily rate formula.