Delete a large set of outdated documentation (many files under docs/ and .hermes/plans/, including audits, design, prd, technical, planning, assets, and todos). Update and consolidate .hermes content: refresh shared-memory pages (decision-log, development-workflow, document-map, pitfalls, project-overview, team-conventions) and several skills/references under .hermes/skills. Also modify AGENTS.md, README.md, UI_CODING_STANDARD.md, docs/README.md and .encoding-check-ignore. Purpose: clean up stale planning/audit material and keep current hermes documentation and related top-level docs in sync.
1.6 KiB
1.6 KiB
module-runtime-item 运行时宝藏模块说明
日期:2026-04-21
1. package 职责
module-runtime-item 是运行时物品子域 crate,当前已经承接宝藏奖励快照与背包桥接相关的纯领域能力:
TreasureResolveInput / TreasureRecordSnapshot / TreasureInteractionAction- 宝藏奖励物品
RuntimeItemRewardItemSnapshot的字段校验与归一化 build_treasure_record_snapshotbuild_inventory_item_snapshot_from_reward_item- 供
crates/spacetime-module聚合表与 reducer 复用的纯 Rust 规则函数
2. 当前阶段说明
当前 crate 已经提供:
treasure_record首版领域 contract- 运行时奖励物品到
module-inventory::InventoryItemSnapshot的显式映射 helper - 中文错误语义与最小测试
- 供
crates/spacetime-module在resolve_treasure_interaction中把宝藏奖励同步写入inventory_slot的桥接规则
补充说明:
- 当前 crate 仍保持“纯领域规则”定位,不直接依赖 SpacetimeDB reducer context 或 Axum。
spacetime-typesfeature 只用于在spacetime-module中复用这些类型做表字段和 reducer 输入。
3. 边界约束
- 当前 crate 只负责任务奖励/宝藏奖励与 inventory 的字段桥接,不承接 story 编排或前端 DTO。
- 宝藏、任务、交易等不同奖励入口若要写入
inventory_slot,优先复用这里与module-inventory的桥接口径,而不是各自重新拼装物品字段。 - 当前真实工程口径以
docs/【玩法创作】平台入口与玩法链路-2026-05-15.md为准。