Skip to content

Subsystem 6a: Item Database + /item /recycle /craft /research calculators + refresh tool#28

Merged
HandyS11 merged 14 commits into
developfrom
feat/item-database
Jun 26, 2026
Merged

Subsystem 6a: Item Database + /item /recycle /craft /research calculators + refresh tool#28
HandyS11 merged 14 commits into
developfrom
feat/item-database

Conversation

@HandyS11

Copy link
Copy Markdown
Owner

Subsystem 6a — Item Database, core calculators & refresh tool

First slice of subsystem 6. Adds an offline, versioned Rust item dataset behind one lookup seam, four calculators exposed both in-game and as slash commands, and a maintainer generator tool so the bundled data can be refreshed instead of silently rotting.

What's new

RustPlusBot.Features.ItemData (new leaf project)

  • Embedded, versioned item-data.json (1205 items) deserialized into a typed schema (ItemDataset / ItemRecord / …), with per-section provenance dates.
  • IItemDatabase + singleton EmbeddedItemDatabase (FrozenDictionary, dup-id last-wins, SchemaVersion fail-fast).
  • Pure ItemLookupItemMatch (Found / Ambiguous / NotFound): numeric-or-name resolution, exact-beats-substring, deterministic ranked "did you mean", exact-name collisions surface as Ambiguous.
  • Supersedes 4c's name-only IItemNameResolver (StorageMonitors re-pointed onto the shared resolver; its private items.json deleted — one source of truth).

Calculators (in RustPlusBot.Features.Commands)

  • In-game !item / !recycle / !craft / !research (terse, EN/FR, work while disconnected — static data).
  • Slash /item / /recycle / /craft / /research (ephemeral embeds with a "data as of <date>" footer).
  • Name-or-id argument; all four appear in /help under a new Item Database group.

Generator tool (tools/RustPlusBot.ItemData.Generator, not shipped in the bot)

  • Transforms the rustplusplus static JSON into our schema, validates loudly, and refuses to overwrite a good bundle on shape drift. See its README.

Notes

  • No new EF entities/migrations/events/options/background services — read-only static data.
  • Deferred to a later slice: /decay, /upkeep, /durability, /smelting, /cctv; safe-zone/shredder recycle variants; a live-scrape source adapter; slash autocomplete.
  • The calculator data (recycle/craft/research) is sourced from rustlabs and currently dates to 2024-09-07 — surfaced honestly via the per-result "data as of" footer; the generator tool refreshes it.

Verification

  • Build 0/0 under -warnaserror; dotnet jb cleanupcode … --profile=ReformatAndReorder idempotent-clean.
  • Full suite 586 tests / 16 assemblies green (baseline 551 + 35: ItemData 21, Generator 4, Commands +10). StorageMonitors unchanged (re-point is behavior-preserving).
  • Built subagent-driven (per-task TDD + spec/quality reviews) with a final whole-branch review.

🤖 Generated with Claude Code

HandyS11 and others added 14 commits June 26, 2026 22:42
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ivate items.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ources

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d/craft-validator tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HandyS11 HandyS11 merged commit 6270b4e into develop Jun 26, 2026
3 checks passed
@HandyS11 HandyS11 deleted the feat/item-database branch June 26, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant