docs(crm): 更新架构快照 + 提炼插件开发 Skill
- CLAUDE.md §12 新增 CRM 插件完成记录和 erp-plugin-crm 模块 - §13 新增动态表 SQL 注入防护和插件权限注册反模式 - §10 scope 表补充 plugin/crm 范围 - §11 设计文档索引补充 CRM 插件设计和实施计划 - 新建 .claude/skills/plugin-development/SKILL.md 可复用插件开发流程
This commit is contained in:
@@ -413,7 +413,8 @@ cargo test -p erp-plugin-prototype # 运行插件集成测试
|
||||
| `message` | erp-message |
|
||||
| `config` | erp-config |
|
||||
| `server` | erp-server |
|
||||
| `plugin` | erp-plugin-prototype / erp-plugin-test-sample |
|
||||
| `plugin` | erp-plugin / erp-plugin-prototype / erp-plugin-test-sample |
|
||||
| `crm` | erp-plugin-crm |
|
||||
| `web` | Web 前端 |
|
||||
| `ui` | React 组件 |
|
||||
| `db` | 数据库迁移 |
|
||||
@@ -439,6 +440,8 @@ chore(docker): 添加 PostgreSQL 健康检查
|
||||
| `docs/superpowers/plans/2026-04-10-erp-platform-base-plan.md` | 平台底座实施计划 |
|
||||
| `docs/superpowers/specs/2026-04-13-wasm-plugin-system-design.md` | WASM 插件系统设计规格 |
|
||||
| `docs/superpowers/plans/2026-04-13-wasm-plugin-system-plan.md` | WASM 插件原型验证计划 |
|
||||
| `docs/superpowers/specs/2026-04-16-crm-plugin-design.md` | CRM 客户管理插件设计规格 |
|
||||
| `docs/superpowers/plans/2026-04-16-crm-plugin-plan.md` | CRM 插件实施计划 |
|
||||
|
||||
所有设计决策以设计规格文档为准。实施计划按阶段拆分,每阶段开始前细化。
|
||||
|
||||
@@ -461,6 +464,7 @@ chore(docker): 添加 PostgreSQL 健康检查
|
||||
| Phase 6 | 整合与打磨 | ✅ 完成 |
|
||||
| - | WASM 插件原型 (V1-V6) | ✅ 验证通过 |
|
||||
| - | 插件系统集成到主服务 | ✅ 已集成 |
|
||||
| - | CRM 插件 (Phase 1-3) | ✅ 完成 |
|
||||
|
||||
### 已实现模块
|
||||
|
||||
@@ -476,6 +480,7 @@ chore(docker): 添加 PostgreSQL 健康检查
|
||||
| erp-plugin | 插件管理 (WASM 运行时/生命周期/动态表/数据CRUD) | ✅ 已集成 |
|
||||
| erp-plugin-prototype | WASM 插件 Host 运行时 (Wasmtime + bindgen + Host API) | ✅ 原型验证 |
|
||||
| erp-plugin-test-sample | WASM 测试插件 (Guest trait + Host API 回调) | ✅ 原型验证 |
|
||||
| erp-plugin-crm | CRM 客户管理插件 (5 实体/9 权限/6 页面) | ✅ 完成 |
|
||||
|
||||
<!-- ARCH-SNAPSHOT-END -->
|
||||
|
||||
@@ -494,6 +499,8 @@ chore(docker): 添加 PostgreSQL 健康检查
|
||||
- ❌ **不要**假设只有单租户 — 从第一天就按多租户设计
|
||||
- ❌ **不要**提前实现远期功能 — 严格按 Phase 计划推进
|
||||
- ❌ **不要**忽略 `version` 字段 — 所有更新操作必须检查乐观锁
|
||||
- ❌ **不要**在动态表 SQL 中拼接用户输入 — 使用 `sanitize_identifier` 防注入
|
||||
- ❌ **不要**在插件 crate 中直接依赖 erp-auth — 权限注册用 raw SQL,保持模块边界
|
||||
|
||||
### 场景化指令
|
||||
|
||||
|
||||
Reference in New Issue
Block a user