Initial PuGa toolkit: data layer, econ, depth-aware scan, state sync, plan push

- 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>
This commit is contained in:
2026-09-18 23:00:21 +02:00
co-authored by Claude Sonnet 5
commit 7a538cb300
35 changed files with 1692 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# 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.
- 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.
- 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.
## Model and review policy
- Default: Sonnet 5 does the building (API plumbing, CLIs, ports, tests).
- Bigger model (Agent tool `model: opus` or `fable`, fresh context, brief with files and question) is allowed and expected at these points:
1. Saturation model design, before building it, and again on real output.
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.
- Routine tool building is not reviewed by a bigger model.