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.4 KiB
1.4 KiB
module-runtime-story
module-runtime-story 承接 RPG runtime story 的纯领域规则、应用用例、事件和错误模型,不依赖 HTTP / AppState / SpacetimeDB。
当前已经迁入的历史快照态纯逻辑会继续收口为 session scoped 新主链;顶层 DDD 物理拆分已经完成:
src/domain.rs承载 action 结算结果结构、NPC 委托上下文、functionId / 队伍上限常量。src/commands.rs承载 action 文本解析 helper。src/application.rs承载 action response 组装参数、status patch 和 world type helper。src/events.rs承载 runtime story 领域事件。src/errors.rs承载 runtime story 纯规则错误。src/lib.rs只保留模块声明、公开导出和子模块 re-export。
bootstrap.rs 需要组装较深的运行时初始 game_state JSON 模板,crate 级 recursion_limit = "512" 仅用于支撑 serde_json::json! 宏展开,不承载额外领域规则。
当前 WP-RS 写链路已经通过 POST /api/story/sessions/runtime 和 POST /api/story/sessions/{storySessionId}/actions/resolve 收口到 session scoped 新接口。后续只按 battle / forge / NPC / quest / presentation 的顺序增强领域规则和投影,并在 WP-DEL 中删除运行代码不再需要的旧入口命名。