Crafting Activity Atlas #17
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?
Originally filed by @coilysiren on 2026-05-02T23:10:05Z
Task 7 — Crafting Activity Atlas
Prereq: read
todo/README.mdfirst.Goal
Build an MCP tool
get_eco_crafting_atlasrendering a card of live crafting activity reconstructed from event logs.Data sources (admin,
X-API-Keyfrom SSM/eco-mcp-app/api-admin-token, regionus-east-1)GET http://eco.coilysiren.me:3001/api/v1/exporter/actionlistresp.text.splitlines().GET http://eco.coilysiren.me:3001/api/v1/exporter/actions?actionName=ItemCraftedActionActionLocation,WorldObjectItem,Citizen,ItemUsed,OverrideHierarchyActionsToConsumer,Count,Timecsv.readeron the response iterator), aggregate in a single pass, and never.textthe whole body into memory.ChopTree,HarvestOrHunt,DigOrMine,ConstructOrDeconstructfor a full production picture. Same streaming discipline.Before implementing: check whether
/api/v1/exporter/actionsaccepts a date or time-range query param that would let the server filter. If it does, use it to cap input size. If it doesn't, stream-aggregate on the client.Analyses to render
Countgrouped byItemUsed(the output item).WorldObjectItem(e.g.CampfireItem,WorkbenchItem,CarpentryTableItem). Rank hot → cold.WorldObjectItem → ItemUsed, thickness = sum ofCount. Used3-sankey— bundle it into the HTML, don't load from CDN at runtime (CSP).Countacross all craft-like action types.Dead-end (do not attempt)
Static parsing of mod C# source for recipe definitions. Recipes-as-definitions aren't exposed over HTTP. This tool is observed events only — which is strictly better because mod items (BunWulf, Nid, vanilla) all appear naturally where they're actually used.
Implementation notes
~/.cache/eco-mcp-app/crafting.sqliteso repeat calls don't re-stream the full CSV. Invalidate on a 5-minute TTL.src/eco_mcp_app/server.py.src/eco_mcp_app/templates/partials/.Acceptance
inv smokepasses.Migrated from coilyco-flight-deck/eco-mcp-app#9 during the eco repo consolidation (coilysiren/inbox#100).
🔒 Reserved by
ward agent --driver claude— containerengineer-claude-eco-app-17on hostKAI-DESKTOP-TOWERis carrying this issue (reserved 2026-07-05T04:37:05Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
— Claude (she/her), via
ward agentWARD-OUTCOME: done - docs/crafting.md walkthrough + FEATURES.md entry completing the crafting atlas; tool, SPA page, and tests were already green on main.
Honest retrospective: the surprise up front was that the whole atlas was already implemented and merged to main before I arrived -
crafting.py, theget_eco_crafting_atlastool, the/craftingSPA page, the static-SVG sankey card, and 396 green tests including the synthetic ~24 MB stream-memory check. My branch was byte-identical to main. So rather than re-implement (or fabricate a diff), I looked for the genuine gap: the atlas was the one sibling of the trades ledger with nodocs/<feature>.mdwalkthrough and no dedicated FEATURES bullet, which the repo's docs-trifecta convention calls for. That's what I wrote and landed.What fought back: nothing technical - the ward gate refused repo verbs until the branch had an upstream, which was a one-line fix. The one judgement call worth flagging is that the shipped sankey deviates from this issue's
d3-sankey-bundled ask: it renders a static server-side SVG instead. It hits the same acceptance outcome (minimal crossings, CSP-clean, zero JS) and I documented the tradeoff honestly rather than papering over it.Confidence is high on the doc accuracy (read the source, template, and frontend to write it; lint + full precommit suite green). The rougher edge is that I could only verify against fixtures and the stream test, not a live late-cycle 20 MB CSV - the row-cap valve is defensive but untested against real end-cycle data. Possible follow-up: revisit the top-30 sankey edge cap once a full cycle's production graph exists, since a very wide graph could hide long-tail stations.