9.4 KiB
E3.M3 — Prototype story backlog (ItemizationAndInventorySchema)
Working backlog for Epic 3 — Slice 1 (items and inventory MVP). Decomposition and contracts: E3.M3 — ItemizationAndInventorySchema.
Labels (Linear): every issue E3.M3; add server / Feature or Story as listed per issue.
Precursor (do not re-scope): gather skill XP on resource_node interact is E3.M1 anchor only (NEO-41) — no GatherResult / inventory yet. This module owns ItemDef, ItemInstance, InventorySlot, and server-authoritative player inventory.
Prototype item spine (frozen in E3M3-01): six rows covering material → intermediate → consumable → utility → quest token → equip stub for the gather→refine→craft loop (items.md, gathering.md, crafting.md).
Linear issues (created): attach docs/plans/NEO-*-implementation-plan.md on the same branch as implementation work.
| Slug | Linear |
|---|---|
| E3M3-01 | NEO-50 |
| E3M3-02 | NEO-51 |
| E3M3-03 | NEO-52 |
| E3M3-04 | NEO-53 |
| E3M3-05 | NEO-54 |
| E3M3-06 | NEO-55 |
| E3M3-07 | NEO-56 |
Dependency graph in Linear: E3M3-02 blocked by E3M3-01. E3M3-03 blocked by E3M3-02. E3M3-04 and E3M3-05 blocked by E3M3-03. E3M3-06 blocked by E3M3-05. E3M3-07 blocked by E3M3-05 (may parallel E3M3-06).
Story order (recommended)
| Order | Slug | Depends on |
|---|---|---|
| 1 | E3M3-01 | None (content spine) |
| 2 | E3M3-02 | E3M3-01 |
| 3 | E3M3-03 | E3M3-02 |
| 4 | E3M3-04 | E3M3-03 |
| 5 | E3M3-05 | E3M3-03 |
| 6 | E3M3-06 | E3M3-05 |
| 7 | E3M3-07 | E3M3-05 |
Downstream (separate modules): E3.M1 Slice 2 gather yields → inventory grants; E3.M2 craft I/O; NEO-42 refine XP hook invokes after craft success.
E3M3-01 — Prototype ItemDef starter set + schemas + CI
Goal: Lock content shape and CI validation for a frozen six-item prototype catalog before any server load.
In scope
content/schemas/item-def.schema.json(or equivalent single-catalog schema).content/items/prototype_items.jsonwith stable ids:scrap_metal_bulk,refined_plate_stock,field_stim_mk0,survey_drone_kit,contract_handoff_token,prototype_armor_shell(names/display may change; ids frozen).scripts/validate_content.py: schema validation, duplicateid, requiredprototypeRolecoverage (one row per archetype), exact six-id allowlist for prototype.- Designer note in E3_M3 +
content/README.md: stack rules, slot kinds (bag vs equip stub), v1 scope (no durability mutation).
Out of scope
- Server loader, inventory store, HTTP, client HUD.
Acceptance criteria
- PR gate validates item JSON against schema.
- Exactly six prototype item ids; duplicate
idfails CI. - Stable id list documented in module doc freeze box.
Landed (NEO-50): content/items/prototype_items.json, item-def.schema.json, CI gates in validate_content.py; plan NEO-50-implementation-plan.md.
E3M3-02 — Server item catalog load (fail-fast)
Goal: Disk → host: startup load of content/items/*.json with CI-parity validation.
In scope
- Loader + registry interface under
server/NeonSprawl.Server/Game/Items/(path TBD in plan). - Fail-fast on malformed files, duplicate ids, unknown enum values.
- Unit tests (AAA) for loader happy path and failure modes.
Out of scope
- Per-player inventory, HTTP.
Acceptance criteria
- Server refuses boot when item catalog invalid (mirror E2.M1 catalog behavior).
- Registry resolves
ItemDefbyid.
E3M3-03 — Item definition registry + DI
Goal: Injectable IItemDefinitionRegistry consumed by inventory and future craft/gather paths.
In scope
ItemDefinitionRegistryimplementation + DI registration.- Unit tests (AAA): lookup, unknown id, prototype row metadata.
Out of scope
- HTTP, persistence, stack mutation.
Acceptance criteria
- Host resolves registry from DI; unknown
itemIddistinguishable from valid ids in tests.
E3M3-04 — GET world item-definitions
Goal: Versioned read-only catalog for client preview, Bruno, and future codegen — mirror NEO-36 skill-definitions pattern.
In scope
GET /game/world/item-definitions+ DTOs + API tests (AAA).- Bruno folder
bruno/neon-sprawl-server/item-definitions/. server/README.mdsection.
Out of scope
- Per-player inventory mutation.
Acceptance criteria
- GET returns all six prototype defs with schema version field.
- Bruno happy path documented.
E3M3-05 — Player inventory store + stack/slot rules engine
Goal: Server-authoritative ItemInstance bags with stack limits and structured deny reasons; persistence (in-memory + Postgres + migration).
In scope
IPlayerInventoryStore, migrationV00X__player_inventory(number in plan).- Inventory operations: add stack, remove stack, slot capacity,
inventory_full/invalid_item/insufficient_quantityreason codes. - Unit + integration tests (AAA); mirror NEO-8/NEO-38 persistence policy.
Out of scope
- HTTP, Bruno, client HUD.
- Craft/gather automatic grants (callers in E3.M1 / E3.M2).
Acceptance criteria
- Add/remove respects
ItemDefstack max from catalog. - Full bag returns stable
reasonCodewithout partial silent loss. - Postgres + in-memory parity tests.
E3M3-06 — Player inventory HTTP + Bruno
Goal: Versioned GET snapshot and POST grant/consume (or add/remove) for manual QA and future client.
In scope
GET /game/players/{id}/inventoryand mutating POST (exact path/shape in implementation plan).- Known-player gate via
IPositionStateStore(NEO-37 pattern). - Bruno
bruno/neon-sprawl-server/inventory/. server/README.md; API tests (AAA).
Out of scope
- Godot HUD — Epic 3 Slice 5 (NEO-72).
- Gather node depletion (E3.M1).
Acceptance criteria
- GET returns instances + slots for seeded player.
- POST add/remove matches engine rules from E3M3-05.
- Bruno exercises happy path + at least one deny (
inventory_fullor unknown item).
E3M3-07 — item_created / transfer-failure telemetry hook sites
Goal: Comment-only hooks on inventory mutation success/deny for future E9.M1 catalog events item_created and transfer failures.
In scope
- Hook placement in inventory engine (and POST path if applicable).
TODO(E9.M1)comments; no production logging.- README + module doc pointer.
Out of scope
- Telemetry ingest, dashboards.
Acceptance criteria
- Hook sites documented in code and
server/README.md. - Matches Epic 3 Slice 1 telemetry vocabulary in epic_03.
After this backlog
- E3.M1 Slice 2 decomposed — E3M1-prototype-backlog.md (NEO-57–NEO-64).
- E3.M2 Slice 3 decomposed — E3M2-prototype-backlog.md (NEO-65–NEO-71).
- Epic 3 Slice 5 (client) — E3S5-client-prototype-backlog.md (NEO-72–NEO-75); inventory HUD is E3S5-01 NEO-72.
- Track delivery in Linear; keep
blockedBylinks synchronized if scope changes. - For each issue kickoff, add
docs/plans/{NEO-XX}-implementation-plan.mdper story-kickoff. - Add
docs/manual-qa/{NEO-XX}.mdwhen HTTP surfaces land (E3M3-06+).
Related docs
- E3_M3_ItemizationAndInventorySchema.md
- epic_03_crafting_economy.md
- items.md
- E2_M1_SkillDefinitionRegistry.md (catalog pattern precedent)