# pbl_blueprint 模块技能(自动生成骨架 + 人工补充) ## 定位 PBL 蓝图聚合根与子对象、版本、模板(M1a/M1b) ## 挂载 `from pbl_blueprint.init import load_pbl_blueprint` → `load_pbl_blueprint()`(应用 app/pbls.py init() 中按序调用) ## 数据表(10 张) - `pbl_blueprint`:PBL 蓝图聚合根(第8章 schema 落库) - `pbl_blueprint_learning_goal`:蓝图子对象 - 学习目标 - `pbl_blueprint_role`:蓝图子对象 - PBL 角色 - `pbl_blueprint_mission`:蓝图子对象 - 驱动问题/Mission - `pbl_blueprint_task`:蓝图子对象 - 任务 - `pbl_blueprint_artifact_spec`:蓝图子对象 - 产出物规格 - `pbl_blueprint_evidence_spec`:蓝图子对象 - 证据规格 - `pbl_blueprint_reflection_spec`:蓝图子对象 - 反思规格 - `pbl_blueprint_version`:蓝图版本(change_delta 证明对话式改模型) - `pbl_template`:PBL 模板(含离线兜底槽位) ## 契约接口(13 个,路径 `/pbl_blueprint/api/.dspy`) - `pbl_blueprint_create` - `pbl_blueprint_read` - `pbl_blueprint_update` - `pbl_blueprint_delete` - `pbl_blueprint_list` - `pbl_blueprint_tree` - `pbl_blueprint_fork` - `pbl_blueprint_subobject_save` - `pbl_blueprint_subobject_list` - `pbl_blueprint_version_create` - `pbl_blueprint_version_diff` - `pbl_template_list` - `pbl_template_instantiate` ## 陷阱 - 库名一律 `ServerEnv().get_module_dbname('pbl_blueprint')`,禁止硬编码 DBNAME。 - sqlor 只有 `C/U/D/R/I/sqlExe`;查询走 pbl_common.api 的 q_all/q_one(已适配)。 - 所有读写强制带 `tenant_id`(pbl_common.api.tenant_id()),缺失即 fail-closed 报错。 - 新增契约需同步三处:api.py 定义 + __init__.py 导出 + init.py env 注册 + scripts/load_path.py 路径。