Design: practical-usefulness layer (eco-gnome/eco-calc mining, recipes page, value-per-profession, 'how to price X' use-case hub) #98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Design the next layer of eco-app: turn it from a read-only mirror into a tool Eco players actually reach for. Filed from a batch of eco-app feedback Kai handed the director surface. This is a design/consult ticket. The deliverable is a design doc committed under
docs/plus a set of proposed, scoped follow-up issues, not code.The bet
Eco players love economy tools even when usability is near zero. Eco Gnome is basically unusable and people still use it. Eco Calc (the website) and Eco Price Calculator (the mods) are the same: meh usability, real demand. The opportunity is to mine what those tools do and deliver it with a better surface. eco-app already hydrates the underlying data (the crafting atlas, trades ledger, market, stores, fair-price, currency) through
src/eco_mcp_app/*and the eco MCP tool family.What to design
Mine the incumbents. Catalog the concrete jobs players do with Eco Gnome, Eco Calc, and Eco Price Calculator (recipe cost roll-ups, margin/profit calc, labor + calorie cost, sell-price suggestion, dependency trees, "is this worth crafting"). Map each job to the data eco-app already has (
crafting.pyatlas,logistics.py,market.py,stores.py,fair_price.py,trades.py) and flag any gap the exporters do not yet cover.Recipes page (grow this first). A recipe surface analogous to
/itemsbut recipe-shaped: ingredients in, product out, station, labor. Design its data model (the crafting atlas / eco MCPget_eco_crafting_atlasis already hydrating this) and its filters (by profession, by station, by ingredient, by product). This is the hub the use-case pages shoot arrows from."Most valuable to craft, per profession" page. Jobs-page-like layout but leaning hard into the Supply-gaps style signal: for every profession, the highest-value things to craft. Open question Kai flagged: the definition of "valuable." Propose a definition (candidates: unit sell price, margin over ingredient+labor cost, unmet demand from buy orders / supply gaps, currency volume moved, or a blend) and recommend one with reasoning. This page is currently unbuilt precisely because the definition is unsettled, so settling it is the point.
Use-case pages hub. Kai wants roughly a dozen use-case-focused pages, but they do NOT each get a homepage card. They share ONE page that lists them all (this is NOT the recipes page). Design that hub + the shape of an individual use-case page. Start with "how you should price <THING>" as the first use case, using Eco Gnome / Eco Calc / Eco Price Calculator as the inspiration for what a pricing page shows (cost breakdown, fair price band, current market comparison, margin). Then enumerate the other ~11 candidate use cases as a ranked list.
Further practical-usefulness ideas. Beyond the above, propose other ways to make the site something players keep open, grounded in the incumbents.
Deliverable
docs/practical-usefulness.md(or similar) covering 1-5, with the "valuable" definition recommended and the pricing-page spec concrete enough to build.🔎 ward agent advisor
ward agent advisor --driver clauderan a one-shot standard research pass on this question:Design: practical-usefulness layer (eco-app#98)
Research deliverable for the design/consult ticket. This is the design doc content to commit at
docs/practical-usefulness.mdplus a ranked follow-up list. All work lands in coilyco-gaming/eco-app (data-export mods paired with Python consumers live inmods/here per AGENTS.md, not eco-mods), so there is no cross-repo fan-out - the follow-ups below are meant to be filed as sibling eco-app issues.TL;DR - the reframe that drives everything
The incumbents (Eco Gnome, Eco Calc, Eco Price Calculator) are at their core recursive recipe-cost calculators: they take a recipe, roll up ingredient costs recursively, add labor and calorie cost, and emit a suggested sell price plus margin. I read the data layer end to end and the load-bearing finding is:
market.py,trades.py,logistics.py,stores.pygive rich price, volume, and unmet-demand signals from the action-exporter CSVs and live store offers. But there is no recipe definition anywhere (ingredients -> product, quantities, station, required skill, labor, calories) and no cost or margin roll-up.crafting.pyis not a recipe atlas. Despite the issue's framing,get_eco_crafting_atlasaggregates production events (what was crafted/gathered, by station/citizen, plus sankey flows) fromItemCraftedAction/HarvestOrHunt/ChopTree/DigOrMineCSVs. It has noRecipe/Ingredient/Skill/Labor/Calorieschema. It is a leaderboard, not a bill-of-materials.fair_price.pyis a FRED commodity benchmark, not a cost model. It pegs exactly 5 hard-coded items (copper, wheat, lumber PPI, iron, WTI oil) to real-world FRED series and reports trend, optionally labeling an in-game median over/under/fair. No ingredient/labor/calorie roll-up, no margin./api/v1/skills(consumed byeco_spec_tracker) knows people -> skills -> levels, but nothing maps a recipe -> required skill, which is what "per profession" needs.Consequence: the single keystone that unblocks the recipes page, the value-per-profession page, and the full pricing page is a recipe-definition exporter (a
mods/endpoint that dumps Eco'sRecipeManagerregistry, plus a Python consumer and/preview/recipes.json). Everything recipe-shaped is gated on it. The demand-side use cases can ship now on data we already have.1. Mining the incumbents -> data map + exporter gaps
Concrete jobs players do with the three tools, each mapped to eco-app data and the gap:
crafting.pysankey is event-flows, not BOMmarket.pymedian/latest;fair_priceFRED (5 items)market.pybuckets/median,stores.pyavgUnitPrice,logistics.pycheapest/resalelogistics.pysupplyGaps(demandQty, buyerCount, reason)trades.pybyItem[i] = [item, tradeCount, currencyVolume]logistics.pyarbitrage(spread, opportunity = spread x volume)/api/v1/skillshas people->skill, not recipe->skillmarket.pyper-day price buckets (median/min/max)Net exporter gaps found (one root, three consequences):
RecipeManager) and the server holds them, but no CSV/JSON exporter surfaces them. The datasets survey (docs/datasets/README.md) already notes the Eco source is checked out for exactly this class of "data the server holds but does not export." This is the keystone follow-up.2. Recipes page (grow this first)
A recipe surface analogous to
/items->/item, using the established SPA patterns: URL-driven filter, query-param detail key, one hub card, optional nav entry.Data model (the DTO the recipe exporter must produce)
This does not exist yet - it is the target contract for follow-up A. Shape it camelCase to match the
/preview/*.jsonconvention:Surfaces
/recipes- list page modeled onpages/Items.tsx: URL-driven?q=filter (client-side lowercase-includes on product/ingredient pretty names, capped likeLIST_ROWS), rows link to/recipe?id=.... Numbers vialib/format.tsformatCount/prettifyEcoName./recipe?id=...- detail modeled onpages/Item.tsx(query-param key + thefetched.id === idstale-guard). Shows the BOM tree, station, required skill+level, labor/calorie/time cost, and cross-links: product's current market price (market.py), who has crafted it (crafting.pyby_crafted), and where to buy/sell it (logistics.py).Filters (the hub the use-case pages shoot arrows from)
skill.name(needs the exporter's skill field).station.item.tableTierRequired.Follow the decoupled-routing rule: add the
<Route>inApp.tsx, add exactly one hub card inHome.tsx, add a nav link inLayout.tsxonly if it earns primary nav./recipestays URL-only (reached from/recipes), mirroring/item.3. "Most valuable to craft, per profession" - recommended definition of "valuable"
This is the flagged open question. My recommendation, with reasoning:
North star: margin-weighted opportunity = expected profit per unit x how much of it you can actually sell. Ship it in two phases because the profit term is blocked on the recipe exporter.
Reasoning through the candidates:
pages/Trade.tsx. This is the demand term.Recommended formula:
opportunity = medianUnitPrice (market.py) x unmetDemandQty (logistics.py supplyGaps.demandQty), boosted whenreason in {no_supply, thin_supply}, and gated by a liquidity floor fromtrades.py byItemcurrency volume so a single thin trade cannot top the board. This ranks by realizable revenue, and the page must label it honestly as revenue, not profit.swap
medianUnitPriceformargin = medianUnitPrice - rolledUpCost, whererolledUpCostis the recursive ingredient + labor + calorie roll-up. Same demand weighting. Now it answers the incumbents' actual question: "what earns me the most money to craft right now."Grouping by profession requires the recipe -> skill mapping, so the whole page (even Phase 1) is gated on the recipe exporter for the grouping axis, even though the ranking signal is available now. Layout: model on
pages/Jobs.tsx- one section per profession/specialty, reuseRankListbars, and reuse theSupplyGapRowglyph+label+color severity treatment for the "why this ranks" callouts (accessibility: never color alone).4. Use-case pages hub + "how to price X"
The hub
/uses- one page listing all ~12 use cases as cards. This is the only homepage card the whole family gets (one hub card inHome.tsx, not one per use case). Individual use-case pages are URL-only, reached from the hub, mirroring how/itemis only reached from/items. This is explicitly not the recipes page -/recipesis the data hub,/usesis the task hub./preview/*.jsonclients. Each degrades independently viafetchJsonOrNullso one dead panel does not blank the page.First use case -
/uses/price"How should I price "Input: an item. Panels, inspired by Eco Gnome / Eco Calc / Eco Price Calculator:
market.pypricebuckets(median/min/max per day). For the 5 FRED-pegged commodities, overlayfair_price.py's real-world benchmark and over/under/fair verdict as a bonus. This makes "fair price band" work for every item, not just 5.logistics.py(cheapest/resale), plustrend/trendDeltaPctfrommarket.pyfor direction.The other ~11 use cases, ranked (value x buildability on current data)
Tier A - buildable now on data we already hydrate:
logistics.py supplyGaps, the unmet buy orders, ranked. Pairs directly with #3's page.logistics.pycheapest/resale boards for one item.logistics.py arbitrage(spread x volume), "buy here, sell there."avgUnitPrice(stores.py) againstmarket.pymedian per item.fair_price.py+currency.pyinflation/trend watch for the commodity items.Tier B - unlocked by the recipe exporter (follow-up A) and cost engine (follow-up C):
Tier C:
5. Further practical-usefulness ideas
Grounded in the incumbents and in what eco-app uniquely has (live colocated server data the incumbents lack):
watchers.pyfrom trade watchers to price/demand alerts: "tell me when X crosses price Y" or "when a buy order appears for my product." This is the sticky "keep the tab open" feature Eco Gnome cannot do because it has no live server feed./uses/price?item=Xlink that renders a clean cost/price card is a drop-in-Discord artifact, which is how players actually share Eco Gnome screenshots today, but live and linkable.stores.py+market.py./preview/*.jsonplane already is a clean data API. A thin Discord command surface over it ("/price copper") reaches players where they coordinate./api/v1/skills), turning the generic recipes page into a personal "what can I make" view.Ranked, scoped follow-up issues (to file as eco-app siblings)
Ordered by dependency. A blocks everything recipe-shaped, so it goes first.
A. Recipe-definition exporter (keystone). New
mods/endpoint that dumps Eco'sRecipeManagerregistry (product, ingredients+quantities, station, required skill+level, labor, calories, time, variants) as JSON, a Python consumer (recipes.py) mirroring thecrafting.py/trades.pystreaming pattern, and a/preview/recipes.jsonsurface. Source the shape from the Eco checkout noted indocs/datasets/README.md. Unblocks B, C, E and the profession grouping in D. No upstream dependency. Highest priority.B. Recipes page (
/recipes+/recipe?id=). List + detail per section 2, filters by profession/station/ingredient/product/tier. Depends on A for the data. Model onpages/Items.tsx/Item.tsx+ a newlib/recipesApi.ts.C. Bottom-up cost roll-up engine. Recursive ingredient-cost + labor + calorie roll-up over the recipe BOM, resolving leaf ingredient prices from
market.pymedian. Powers margin everywhere. Depends on A. Pure Python, testable undertests/.D. Value-per-profession page. Section 3. Ship Phase 1 (revenue-opportunity ranking) as soon as A lands (A provides profession grouping), then upgrade to margin once C lands. Depends on A (grouping), enhanced by C (margin). Model on
pages/Jobs.tsx, reuseRankList+ theSupplyGapRowseverity treatment.E. Use-case hub (
/uses) + "how to price X" (/uses/price). Section 4. The hub + Tier-A market/fair-price/logistics panels are buildable now with no dependency - ship the demand-side pricing page first. The cost-breakdown and margin panels light up when C lands. One hub card inHome.tsx, use-case pages URL-only. This can start in parallel with A.F. Demand-side use-case pages (Tier A: what-is-in-demand, where-to-buy/sell, arbitrage, shop-check).
logistics.py/market.py/stores.pyonly, no dependency - cheap wins that fill the hub while A is in flight.Suggested dispatch order: A and E/F in parallel first (A is the long pole, E/F ship value immediately with no blocker), then B, C, D once A lands, then the Tier-B use-case pages once C lands.
Note on the deliverable
The issue asks for a doc committed at
docs/practical-usefulness.md. This comment is that doc's content. As a research/consult run I am not committing code or the doc - dispatch an engineer run to commit this design and open follow-ups A-F above.Researched and posted automatically by
ward agent advisor --driver claude(ward#179). This is one-shot research, not a carried change - verify before acting on it.— Claude (she/her), via
ward agentDirector follow-up (correcting the keystone in the design above): Eco Gnome is itself a recipe exporter, which reshapes follow-up A.
eco-gnome-mod(https://github.com/Eco-Gnome/eco-gnome-mod) is a server-side DataExporter that dumps a server's modded recipes, skills, and items - exactly the recipe-definition data the design calls the keystone. The eco-gnome image also bundlesecocraft/eco_gnome_data.json(vanilla item/recipe data). Seedocs/calculator.mdand #40.RecipeManagerdumper from scratch'. It should be 'ingest eco-gnome-mod's existing recipe/skill/item export (or the bundledeco_gnome_data.jsonshape) into a Python consumer +/preview/recipes.json'. Reuse the MIT tool's exporter rather than reinventing it. This makes the long pole much shorter.Home.tsx), and the self-host + DataExporter path (#40) is blocked on kai-server mod-ops (ward#585 / eco-ops#30). So A's real work is landing the ingest path, which may ride on the same #40 mod rollout.Everything downstream (B recipes page, C cost engine, D value-per-profession grouping) is unchanged - it just consumes A's recipe data whether A builds or ingests the exporter.
Dispatched the no-dependency slice as #99 (the
/useshub + the four demand-side use-case pages: what's-in-demand, buy/sell, arbitrage, shop-check). Kai is starting the practical-usefulness layer here since it needs no recipe data. The recipe-gated follow-ups (A ingest eco-gnome export, B recipes page, C cost engine, D value-per-profession, E 'how to price X') stay queued behind the recipe exporter.Recipe/pricing roadmap now filed as tracked issues:
The demand-side slice (#99) is already in flight and needs none of these.