docs/library.md: register puga.route and puga.planet in the module map

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 10:43:53 +02:00
co-authored by Claude Sonnet 5
parent 3f8cc91da9
commit 96b4ccbe1d
+9
View File
@@ -45,6 +45,15 @@ EOF
- **`puga.simulate`** — `simulate(plan, recipes, buildings, resources, fertility, price, ...)`: - **`puga.simulate`** — `simulate(plan, recipes, buildings, resources, fertility, price, ...)`:
the PRUNplanner-simulator replica. Reuse this for anything plan-shaped rather than reimplementing the PRUNplanner-simulator replica. Reuse this for anything plan-shaped rather than reimplementing
efficiency/workforce/flows again. efficiency/workforce/flows again.
- **`puga.route`** — `load_graph()`, `resolve_system(query)` (planet/system natural id or name
-> SystemId), `shortest_path(src, dst, graph=None)` (Dijkstra by straight-line ly over FIO's
`/systemstars` jump graph; returns jumps, distance_ly, path). Not a PRUNplanner feature, built
for this project since travel isn't modelled anywhere else. CLI: `tools/route.py`.
- **`puga.planet`** — `candidates(resource_ticker, min_factor=0.0)`: every planet with that
resource, sorted by extraction factor, each with temperature/pressure/gravity/fertility/faction
and `build_requirements` (FIO's own founding-cost materials for that specific planet — real
data, not guessed environment thresholds). CLI: `tools/planet.py`, pass `--from` an existing
base or pure-factor ranking is misleading (best-factor planets are often thousands of ly away).
- **`puga.config`** — `get(key)` reads `.env`; `state_path()` returns the real - **`puga.config`** — `get(key)` reads `.env`; `state_path()` returns the real
`empire/state/company.yaml` if synced, else the tracked example. `empire/state/company.yaml` if synced, else the tracked example.