pbl_evidence/skill/SKILL.md

27 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pbl_evidence 模块技能(自动生成骨架 + 人工补充)
## 定位
产出物与证据幂等采集(M5a/M5b)
## 挂载
`from pbl_evidence.init import load_pbl_evidence` → `load_pbl_evidence()`(应用 app/pbls.py init() 中按序调用)
## 数据表(2 张)
- `pbl_artifact`:学生产出物(版本内联 version_no)
- `pbl_evidence`:学习证据(幂等采集,唯一索引防重)
## 契约接口(7 个,路径 `/pbl_evidence/api/<name>.dspy`)
- `pbl_artifact_create`
- `pbl_artifact_read`
- `pbl_artifact_update`
- `pbl_artifact_delete`
- `pbl_artifact_list`
- `pbl_evidence_collect`
- `pbl_evidence_list`
## 陷阱
- 库名一律 `ServerEnv().get_module_dbname('pbl_evidence')`,禁止硬编码 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 路径。