From 770409eb1dcff5ef70a67cfcd361b94a685bc5d5 Mon Sep 17 00:00:00 2001 From: loggger101 Date: Mon, 26 Oct 2026 12:15:52 -0400 Subject: [PATCH] CLAUDE.md takes the pricing rules economicspace kept; README's used-in-space price says PLUS economicspace's CLAUDE.md still held four rules about this package's internals after the split. The ones missing here move in: _UTILITY_FAMILIES, the routed annual_market_kg and how _DEMAND_SHARE_BY_CLASS splits it (bulk classes sum to 1, trace on top), and the Earth-price-PLUS rule that in_space_price_usd_per_kg's docstring records v1.3.0 breaking. README's "How a price is made" described the used-in-space fate as the launch cost times utility, dropping the Earth price the code adds. Fixed to match in_space_price_usd_per_kg. Prose only; no number moves. --- CLAUDE.md | 18 +++++++++++++++--- README.md | 7 ++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 7384bd8..65a5e29 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,9 +17,21 @@ and `spacevalue/quotes/` the recorded metal quotes. Rules: `spacevalue quotes record`. `SHA256SUMS` holds every file, and the CSVs are CRLF by rule (`.gitattributes`), because that is what the sums hash. - **The judgement tables are judgement.** `IN_SPACE_UTILITY` and its overrides - are engineering estimates. Overrides only run downward; `gto` takes `geo`'s - profile by reference (asserted). Every commodity needs a `_COMMODITY_CLASS` - entry (asserted at import), and every in-space destination a demand row. + are engineering estimates. Overrides only run downward; `mars_orbit`'s empty + override is deliberate (README, "The judgement in it"); `gto` takes `geo`'s + profile by reference (asserted). `_UTILITY_FAMILIES` holds each family at + one level at every destination (asserted). Every commodity needs a + `_COMMODITY_CLASS` entry (asserted at import), and every in-space + destination a demand row: a missing row once meant an unbounded market. +- **A price used in space is the Earth price PLUS** `in_space_utility x` the + launch cost avoided, less processing (`in_space_price_usd_per_kg`). Never + replace the Earth price with the launch cost: v1.3.0 did, and threw the + material away. Shipped home it is the Earth price less the downleg, so a + commodity no depot wants is still worth something there. +- **`annual_market_kg` is routed**: world production bounds a commodity flown + home, the depot's import budget one sold there. `_DEMAND_SHARE_BY_CLASS` + splits that budget; its bulk classes sum to 1 (asserted) and `trace` sits on + top of them. - **The library is quiet.** No printing, installing or directory creation at import; progress goes through spacecost's `say()`. Printed strings are ASCII (Windows gives a redirected stdout cp1252). `tests/test_rules.py` holds both. diff --git a/README.md b/README.md index b5b30c8..dde3781 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,10 @@ far more. `tests/test_docs.py` holds this table to the code. At Earth's surface a commodity is worth its market price. Anywhere else it is worth the better of two fates: -- **used there**: the launch cost avoided, times how good a substitute it is - for the same mass launched from Earth (its *in-space utility*, 0 to 1), less - what it costs to process on site; or +- **used there**: its Earth price plus the launch cost it avoids, the launch + cost scaled by how good a substitute it is for the same mass launched from + Earth (its *in-space utility*, 0 to 1), less what it costs to process on + site; or - **shipped home**: its Earth price, less the cost of the trip down. Every row says which fate won (`value_route`) and, at a depot, how much of it