docs: 架构反思讨论记录 + CLAUDE.md 事件消费者制度约束
Some checks failed
CI / frontend-build (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- 讨论结论:WASM 插件积极使用(评估量表)、积分/透析拆独立 crate、事件驱动制度化
- CLAUDE.md §3.4 新增铁律:每个事件必须有至少一个消费者,否则功能不算完成
This commit is contained in:
iven
2026-04-28 11:46:31 +08:00
parent e03a2be1b6
commit 10755cde0e
2 changed files with 92 additions and 0 deletions

View File

@@ -158,6 +158,7 @@
- 事件必须持久化到 `domain_events` 表outbox 模式)
- 事件处理失败记录到 dead-letter 存储
- 事件类型命名:`{模块}.{动作}` 如 `user.created`, `workflow.task.completed`
- **铁律:每个事件必须有至少一个消费者,否则功能不算完成。** 新增事件发布时必须同步实现消费者和对应测试。详见 `docs/discussions/2026-04-28-architecture-retrospective.md` §4。
### 3.5 Rust 代码规范