Add legal content planning assets

This commit is contained in:
2026-05-04 02:44:20 -04:00
parent d969d8c1c0
commit 34d7526caa
12 changed files with 1373 additions and 0 deletions
@@ -0,0 +1,828 @@
# AI 法务平台内容智力升级方案 v1
## 1. 目标
当前平台功能主干已基本完成,但系统“智力层”明显不足:
- 法规资料不全
- 合同模板库薄弱
- 条款库/审查规则库几乎空白
- 行业资料覆盖不足
- 训练/导入导出框架存在,但缺少高质量内容资产
本方案目标不是再做一套新功能,而是把平台从“会点按钮的法务工具”升级为“具备中国法律体系、合同实务、行业差异、审查逻辑、生成逻辑”的高智力法务平台。
核心目标:
1. 建立可持续扩充的内容底座
2. 建立标准化合同模板体系
3. 建立法规/司法解释/案例/条款/规则之间的结构化关系
4. 建立首批高价值内容资产包
5. 让现有训练/导入/展示框架成为内容升级的承载器
## 2. 基于当前仓库的真实现状
我已检查当前仓库,结论如下:
### 2.1 已有可复用能力
1. Training Case 导入导出框架已经存在
- `src/services/training/case_import_export.py`
- `src/services/training/training_case_service.py`
- `src/repositories/training_case_repository.py`
- `scripts/run_training_case_package.py`
- `tests/fixtures/training_case_package_m6.json`
这说明系统已经有一套“内容包 -> 校验 -> 导入 -> 导出 -> 前台展示”的基础管道。
2. Dashboard 已经有 Training 区域
- `src/web/index.html`
- `src/web/app.js`
页面已经具备:
- Import / Export
- Case list
- Case detail
- Progress
- Attempt / Annotation / Submit
这意味着平台已经不是从零开始,已经有“内容对象承载界面”。
3. 当前 package 数据结构具有很强可复用性
`training_case_package_m6.json``case_import_export.py` 看,已有这些稳定结构:
- `version`
- `metadata`
- `items[]`
- `title`
- `scenario`
- `skill_tags`
- `difficulty`
- `rubric`
- `tasks`
- `status`
- `external_id`
- `meta/metadata`
这套结构可以平移为法务内容对象,例如:
- 法规解读案例
- 合同模板包
- 审查规则训练样本
- 行业合规资料包
- 条款风险识别训练集
### 2.2 当前不足
当前仓库没有看到成体系的:
- 法规库模块
- 司法解释库模块
- 案例库模块
- 合同模板库模块
- 条款库模块
- 审查规则库模块
- 行业法务资料库模块
也就是说:
- 功能壳子已有
- 内容中台没有真正建立
- 当前最大瓶颈不是页面、接口,而是“高质量结构化内容资产”
### 2.3 结论
现阶段最正确的方向不是继续堆功能,而是建设“法务内容中台”。
## 3. 目标知识架构
建议把平台知识分成 7 层。
### 3.1 法源层
承载权威法律依据:
- 宪法相关基础制度
- 民法典
- 公司法
- 劳动法、劳动合同法
- 仲裁法、民事诉讼法
- 数据安全法、个人信息保护法、网络安全法
- 电子签名法
- 反不正当竞争法
- 消费者权益保护法
- 招标投标法
- 建筑法
- 著作权法、商标法、专利法
- 最高法司法解释
- 国务院行政法规
- 部委规章
- 地方性法规(按需)
字段建议:
- law_id
- title
- level(法律/行政法规/司法解释/部门规章/地方性法规)
- issuing_body
- effective_date
- status
- chapter/article
- article_text
- keywords
- industry_tags
- source_url
- version_note
### 3.2 裁判与实务层
承载裁判规则与实务导向:
- 指导性案例
- 公报案例
- 典型案例
- 高院裁判规则
- 仲裁案例摘要
- 监管问答/窗口指导摘要
字段建议:
- case_id
- title
- court_or_body
- date
- dispute_type
- key_issue
- holding
- rule_summary
- cited_laws
- applicable_scenarios
- risk_tags
### 3.3 条款知识层
承载合同条款本体:
- 定义条款
- 标的条款
- 价款条款
- 交付条款
- 验收条款
- 保密条款
- 知识产权条款
- 数据合规条款
- 违约责任条款
- 争议解决条款
- 不可抗力条款
- 解约条款
字段建议:
- clause_id
- clause_type
- clause_title
- clause_text
- plain_explanation
- risk_level
- common_risks
- negotiation_points
- applicable_contract_types
- prohibited_patterns
- recommended_variants
- linked_laws
### 3.4 审查规则层
这是平台智力的核心层。
每条规则至少要表达:
- 审什么
- 为什么审
- 依据是什么
- 什么情况触发风险
- 给什么修改建议
- 哪些行业/交易要加强
字段建议:
- rule_id
- rule_name
- contract_type
- clause_scope
- trigger_pattern
- risk_description
- severity
- review_question
- suggested_fix
- legal_basis
- fallback_clause_ids
- industry_scope
- version
### 3.5 模板层
模板不能只是一份 docx,而要是“结构化模板系统”:
- 主模板
- 必选条款
- 可选条款包
- 替代条款版本
- 行业增强条款包
- 客户偏好条款包
- 问卷变量
字段建议:
- template_id
- template_name
- contract_type
- industry
- scenario
- jurisdiction
- template_version
- clauses[]
- variables[]
- generation_questions[]
- review_rules[]
- fallback_templates[]
### 3.6 行业知识层
按行业建立增强包:
- 电商
- SaaS/软件开发
- AI/数据服务
- 劳务派遣/人力资源
- 制造与供应链
- 建工/装修
- 医疗器械/医药
- 教培
- MCN/直播/广告
- 跨境贸易
每个行业包应包含:
- 常见合同类型
- 监管关注点
- 常见争议点
- 必审条款
- 高风险表达
- 行业特有术语
- 行业必备附件清单
### 3.7 训练与反馈层
把实际使用中发现的问题回流为:
- 审查误判样本
- 漏判样本
- 优秀审查案例
- 高质量生成结果
- 用户修改痕迹
- 业务行业新增需求
这层用于持续把平台从“博士入门”推进到“博士后”。
## 4. 内容来源矩阵
以下是建议的来源体系。
### 4.1 法规与司法解释
1. 国家法律法规数据库
- 权威性:最高
- 内容:法律、行政法规、司法解释、监察法规等
- 自动化可行性:中
- 风险:需注意抓取频率、使用方式、展示引用规范
- 更新频率:高
2. 中国政府网 / 国务院 / 部委官网
- 权威性:高
- 内容:行政法规、部门规章、政策文件
- 自动化可行性:中
- 风险:站点结构不稳定
- 更新频率:中高
3. 最高人民法院官网
- 权威性:高
- 内容:司法解释、典型案例、指导性案例、会议纪要等公开材料
- 自动化可行性:中
- 风险:页面结构差异大
- 更新频率:中
### 4.2 案例与实务
4. 中国裁判文书相关公开渠道/官方案例公开栏目
- 权威性:高
- 内容:案例、裁判要旨
- 自动化可行性:低到中
- 风险:版权、平台规则、数据可得性、公开范围限制
- 更新频率:高
5. 高院/仲裁委/监管机构官网公开案例与问答
- 权威性:高
- 自动化可行性:中低
- 风险:来源分散
### 4.3 模板与实务资料
6. 政府示范文本、协会示范合同
- 权威性:中高
- 自动化可行性:中
- 风险:版本差异、行业适用性有限
7. 自建模板体系
- 权威性:依赖内部质量
- 自动化可行性:高
- 风险:必须建立法审与版本治理,否则容易失控
8. 用户上传真实合同脱敏沉淀
- 权威性:高价值实务数据
- 自动化可行性:中
- 风险:隐私、商业秘密、授权边界极高
- 必须:脱敏、分级、授权、审计
### 4.4 结论
内容来源必须分三类治理:
1. 权威法源类:优先建设,做平台根基
2. 公开实务类:精选建设,做平台判断力
3. 私有沉淀类:严格治理,做平台竞争壁垒
## 5. 合同模板体系设计
建议采用“四维分类法”。
### 5.1 第一维:法律关系
- 买卖
- 服务
- 技术开发
- 技术服务
- 技术许可
- 劳动/劳务
- 委托/代理
- 租赁
- 借款
- 保证/担保
- 股权投资/股权转让
- 保密/NDA
- 数据处理/数据合作
- 知识产权授权
### 5.2 第二维:业务场景
- B2B 采购
- SaaS 销售
- 定制开发
- AI 模型服务
- 电商代运营
- MCN/达人合作
- 品牌广告投放
- 人力外包
- 工程施工
- 装修服务
- 跨境贸易
- 医疗器械采购
### 5.3 第三维:文档角色
- 主合同
- 补充协议
- 附件
- 订单
- SLA
- DPA/数据处理附件
- 验收单
- 保密协议
- 授权书
- 对账确认单
### 5.4 第四维:版本属性
- 平台标准版
- 平台审慎版
- 平台偏甲方版
- 平台偏乙方版
- 行业增强版
- 客户定制版
## 6. 首批 100 个高优先级内容资产建议
下面不是“100 部法律全文”,而是“最值得优先落库的 100 类资产”。
### A. 法规/司法解释基础包(20)
1. 民法典总则与合同编核心条文
2. 民法典侵权责任编中与合同履行相关规则
3. 公司法
4. 劳动合同法
5. 劳动法
6. 社会保险法中用工关键条文
7. 仲裁法
8. 民事诉讼法中管辖、证据、保全、执行相关条文
9. 电子签名法
10. 消费者权益保护法
11. 反不正当竞争法
12. 著作权法
13. 商标法
14. 专利法
15. 网络安全法
16. 数据安全法
17. 个人信息保护法
18. 招标投标法
19. 建筑法
20. 与合同效力、违约责任、保证、格式条款相关的最高法司法解释合集
### B. 高优先级合同模板包(25)
21. 通用买卖合同
22. 采购框架协议
23. 销售框架协议
24. 供货合同
25. 服务合同
26. 技术服务合同
27. 技术开发合同
28. 软件开发合同
29. SaaS 服务协议
30. 数据处理委托协议
31. 数据合作协议
32. 保密协议 NDA
33. 劳动合同(标准员工)
34. 劳务合同
35. 兼职顾问协议
36. 委托代理合同
37. 渠道合作协议
38. 品牌推广/广告投放合同
39. MCN 达人合作协议
40. 电商代运营协议
41. 房屋租赁合同(商用)
42. 借款合同
43. 保证合同
44. 股权转让协议
45. 投资意向书/Term Sheet 基础版
### C. 条款库优先建设(20
46. 合同目的与定义条款
47. 标的描述条款
48. 交付方式条款
49. 验收标准条款
50. 付款条件条款
51. 发票条款
52. 违约责任条款
53. 赔偿范围限制条款
54. 保密条款
55. 知识产权归属条款
56. 知识产权侵权担保条款
57. 数据处理与数据安全条款
58. 个人信息保护条款
59. 竞业限制/不招揽条款
60. 期限与续约条款
61. 解除与终止条款
62. 不可抗力条款
63. 通知送达条款
64. 争议解决条款
65. 法律适用与管辖条款
### D. 审查规则优先包(20
66. 主体资格审查规则
67. 签约权限审查规则
68. 合同名称与交易实质不一致规则
69. 标的不明确规则
70. 付款条件不清规则
71. 验收标准缺失规则
72. 自动续约风险规则
73. 单方免责/责任失衡规则
74. 违约责任过轻/过重规则
75. 赔偿上限缺失规则
76. 知识产权归属不清规则
77. 数据合规条款缺失规则
78. 个人信息处理合法性规则
79. 保密范围过宽/过窄规则
80. 解约条件失衡规则
81. 管辖约定不利规则
82. 附件与主合同冲突规则
83. 印章/签字页完整性规则
84. 生效条件不明规则
85. 行业许可/资质前置条件缺失规则
### E. 问答知识包(10
86. 甲方最常问的付款风险问答
87. 乙方最常问的验收风险问答
88. 劳动用工高频问答
89. SaaS/软件开发合同高频问答
90. 数据合规高频问答
91. 保密协议高频问答
92. 广告投放/代运营争议问答
93. 股权转让常见陷阱问答
94. 租赁合同常见争议问答
95. 借款与担保高频风险问答
### F. 行业资料包(5
96. SaaS/软件行业法务包
97. AI/数据服务行业法务包
98. 电商/代运营行业法务包
99. 建工/装修行业法务包
100. 人力资源/劳务外包行业法务包
## 7. 仓库内建议新增的目录与数据结构
建议在当前仓库中新增一个独立内容中台目录,而不是把所有内容散落在 docs 里。
建议结构:
```text
legal_content/
laws/
national/
regulations/
judicial_interpretations/
local/
cases/
guiding/
typical/
court_rules/
arbitration/
templates/
by_contract_type/
by_industry/
clause_modules/
questionnaires/
rules/
general_review/
industry_review/
generation_rules/
knowledge/
faq/
playbooks/
industry_guides/
seeds/
laws/
templates/
clauses/
rules/
faq/
manifests/
content_packages/
release_index/
```
### 7.1 建议文件格式
1. 法规:JSON 或 JSONL
2. 模板:JSON + Markdown 双格式
3. 条款:JSON
4. FAQMarkdown + frontmatter
5. 行业资料:Markdown / JSON
6. 训练包:沿用当前 training package 结构扩展
### 7.2 建议的种子对象格式
法规种子:
- id
- title
- source
- level
- effective_date
- articles[]
- tags[]
模板种子:
- template_id
- template_name
- contract_type
- industry
- version
- variables[]
- clauses[]
- required_rules[]
规则种子:
- rule_id
- rule_name
- trigger
- severity
- legal_basis[]
- suggestion
### 7.3 与现有 training package 的关系
当前 training package 可用于三类内容:
1. 合同审查训练样本
2. 条款识别训练样本
3. 法规适用判断训练样本
建议不要废弃现有 training 框架,而是把它升级为“内容验证与训练入口”。
## 8. 分阶段执行路线图
### 第一阶段:2 周
目标:搭建内容底座骨架,先把“空脑子”变成“有骨架的大脑”。
产出:
1. 内容分类法定稿
2. legal_content 目录落地
3. 首批法规清单定稿
4. 首批模板清单定稿
5. 首批审查规则清单定稿
6. 内容包 schema 定稿
7. 建立内容编制规范
8. 先做 20-30 个高优先级资产样板
第一阶段不要贪多,重点是:
- 格式统一
- 命名统一
- 版本统一
- 来源统一
- 引用统一
### 第二阶段:6 周
目标:形成“可用的法务专家底座”。
产出:
1. 20 个法规基础包
2. 25 个主模板初版
3. 20 个核心条款模块
4. 20 条通用审查规则
5. 10 组高频问答
6. 5 个行业资料包
7. 训练样本开始与模板/规则联动
到这一步,平台应具备:
- 常见合同可生成
- 常见合同可审查
- 常见问题可回答
- 高频行业有基本覆盖
### 第三阶段:12 周
目标:把平台从“可用”推进到“专业且可扩张”。
产出:
1. 行业增强模板批量扩展
2. 地方性规则与行业监管资料增强
3. 审查规则扩展到 100+ 条
4. 条款替代版本与甲乙方立场版本
5. 用户脱敏合同沉淀流程
6. 内容更新与发布机制
7. 质量评分机制
## 9. 主要风险与治理建议
### 9.1 版权与授权风险
- 法律法规原文通常可合理引用,但仍需明确来源与更新时间
- 商业模板、第三方数据库内容不可直接无授权复制
- 真实客户合同必须做授权、脱敏、审计
### 9.2 内容过时风险
- 法律更新频繁
- 司法解释、监管口径变化快
- 必须设置版本号、更新时间、失效标记
### 9.3 幻觉式法务风险
如果只堆大模型,不做规则与法源绑定,系统会“说得像律师,但不一定对”。
必须坚持:
- 每条关键审查建议要有法源依据
- 每个高风险结论要有规则链路
- 每个模板要有适用范围声明
### 9.4 行业覆盖失衡风险
一开始不要追求“所有行业一网打尽”。
建议优先行业:
1. 通用买卖/服务
2. 软件/SaaS/AI
3. 电商/代运营/广告
4. 劳动/劳务/顾问
5. 租赁/借款/担保
### 9.5 治理机制建议
建立四道治理:
1. 来源治理:来源、日期、链接、授权说明
2. 结构治理:统一 schema
3. 审校治理:法务审校 + 产品审校 + 技术校验
4. 发布治理:版本化发布,不允许内容野生上线
## 10. 我建议的下一步实际动作
如果你同意,我建议立刻把这条主线拆成 4 个并行子任务:
A. 内容架构与 schema 线
- 定义 laws/templates/clauses/rules/faq 的统一 schema
B. 法规与司法解释采集线
- 先做首批 20 个法规基础包
C. 模板与条款线
- 先做首批 25 个主模板 + 20 个条款模块
D. 审查规则线
- 先做首批 20 条通用规则 + 5 个行业包规则
## 11. 需要你协助的关键事项
为了把这项工作真正推进成产出,而不是停留在方案层面,我需要你给我 4 个决策支持:
1. 确认首批优先行业
建议默认:
- 软件/SaaS/AI
- 电商/代运营/广告
- 劳动/劳务/顾问
- 通用买卖/服务
- 租赁/借款/担保
2. 确认是否允许建立“内部标准模板”
也就是不完全依赖网上现成模板,而是由我们自建平台模板体系。
3. 确认是否允许把客户真实合同做脱敏沉淀
如果允许,需要建立授权与脱敏规则。
4. 确认内容交付形式
我建议:
- 仓库内结构化种子文件
- 配套管理清单
- 后续再接入前台后台
## 12. Codex 并行研究补充结论
Codex 并行研究完成后,补充了几个非常关键、适合直接纳入实施路线的结论:
### 12.1 包命名与发布单元建议
建议内容包命名遵循统一风格,便于版本化、导入导出、审校与灰度发布,例如:
- `laws_cn_core_v1.json`
- `judicial_interpretations_cn_contract_v1.json`
- `contract_templates_cn_official_v1.json`
- `review_rules_cn_contract_v1.json`
建议未来所有内容资产都按“主题 + 范围 + 版本”命名,而不是自由命名。
### 12.2 分阶段演进补充
在原有 2 周 / 6 周 / 12 周规划基础上,可以继续扩成更完整的 5 阶段:
1. Phase 12-4 周)
- 建立 source registry(来源注册表)
- 建立 taxonomy(内容分类法)
- 建立首批 100 个内容资产
- 只使用权威公开来源 + 明确归属的内部原创内容
- 先让平台具备 laws + judicial interpretations + official templates 的检索能力
2. Phase 24-8 周)
- 建立 clause library(条款库)
- 建立 rule engine 基础层
- 覆盖前 20 个最常见合同审查问题
- 要求每条规则都绑定:法源依据 + 至少 1 个案例
3. Phase 38-12 周)
- 建立行业增强包
- 首批重点行业:互联网/SaaS、劳动用工、电商/平台、建工/不动产
- 开始客户模板接入,但必须做 tenant isolation(租户隔离)
4. Phase 412-20 周)
- 如预算允许,引入 1 个商业法律数据库作为编辑检索与历史补全工具
- 扩大参考案例和历史版本覆盖
5. Phase 5(专家级)
- 让系统具备 time-aware(时间生效意识)与 source-aware(来源意识)能力
- 每一个结论、每一条红线建议,都应尽量展示:
`authority -> interpretation -> case -> clause -> suggestion`
- 同时支持:
- 生效日期过滤
- 历史版本识别
- 客户级政策覆盖
### 12.3 一个非常重要的架构原则
真正的专家级法务系统,不是“只会吐答案”,而是要会给出证据链。
也就是说,最终平台应尽量做到:
- 不是只说“这条合同有风险”
- 而是能说清楚:
- 法律依据是什么
- 司法解释怎么说
- 哪类案例支持这个判断
- 对应条款为何有问题
- 建议替换成什么表达
这才是平台从“会回答”升级到“可信可用”的关键。
### 12.4 Codex 提醒的 5 个核心风险
1. Authority risk(权威性风险)
- 官方公开文本具有权威性,但“可公开查看”不等于“可无限制商业再分发”
- 因此必须设计来源、引用、展示与授权边界
2. Versioning risk(版本风险)
- 法律、行政法规、司法解释经常修订
- 如果没有时间与版本字段,系统极易给出过时结论
3. Product-liability risk(产品责任风险)
- 审查规则、清单、风控建议是价值最高的一层
- 同时也是最容易因编辑错误带来责任的一层
- 必须有审校与发布治理
4. Confidentiality risk(保密风险)
- 客户模板、客户规则、客户知识卡片必须租户隔离
- 默认不得进入公共导出包
5. Coverage risk(覆盖风险)
- 官方示范文本对消费、公用、部分监管行业很强
- 但对现代 B2B、SaaS、AI、平台型业务支持不够
- 因此内部原创模板与规则体系几乎不可避免
## 13. 当前结论
这件事非常值得做,而且现在正是做的时机。
因为:
- 功能壳子已经差不多了
- 内容智力才是真正决定平台上限的核心
- 一旦内容中台建立起来,后续 PDF 审查、合同生成、问答、训练、行业扩展都会一起被拉升
- Codex 的并行研究进一步证明:真正拉开差距的,不是页面数量,而是“可追溯证据链 + 可版本化内容包 + 可治理的规则系统”
一句话总结:
接下来平台最重要的研发,不是“再多做一个按钮”,而是“建立一个可持续扩充、可审校、可版本化、可追溯证据链的中国法务知识与模板中台”。
## 14. 推荐的立即执行顺序
如果现在就进入实做,我建议顺序固定为:
1. 先定内容 taxonomy 与 schema
2. 再建 source registry(来源注册表)
3. 再做首批 100 个资产清单与命名规范
4. 再开始填充 laws / interpretations / templates / rules 四大主包
5. 最后把这些内容挂到现有 training / import-export / dashboard 承载链路上
这样做的好处是:先把脑子骨架搭对,再往里装知识,不会越做越乱。
## 15. 你最需要提供的协助
为了让我和 Codex 真正开始“填内容”,而不只是停留在方案阶段,你最重要的协助是 4 个授权/决策:
1. 确认首批优先行业
2. 确认是否允许建立内部标准模板体系
3. 确认是否允许脱敏沉淀客户真实合同
4. 确认是否愿意后续采购商业法律数据库作为编辑检索/历史回溯增强源(不是现在必须买,但要提前定方向)
一旦这 4 个点明确,我就可以正式进入内容底座建设执行阶段。
+100
View File
@@ -0,0 +1,100 @@
# Legal Content Workspace
本目录用于承载 AI Exchange 的法务内容中台资产。
目标:
- 让法规、司法解释、模板、条款、审查规则、FAQ、行业资料进入统一结构
- 让内容可版本化、可导入导出、可审校、可追溯来源
- 与现有 Training package / import-export / dashboard 风格保持兼容,而不是另起一套完全不同的资产体系
## 目录结构
```text
legal_content/
README.md
schemas/
laws.schema.json
templates.schema.json
clauses.schema.json
rules.schema.json
faq.schema.json
sources.schema.json
package_manifest.schema.json
manifests/
package_release_index_v1.json
first_100_assets_v1.json
sources/
source_registry_v1.json
seeds/
laws/
templates/
clauses/
rules/
faq/
working/
drafts/
review/
approved/
```
## 设计原则
1. 来源优先
- 每个正式资产都必须能回溯来源
- 来源分为:官方公开、公开实务、内部原创、客户授权脱敏
2. 版本优先
- 每个包、每个资产都必须有版本字段
- 法规与司法解释必须保留生效时间、失效/修订状态
3. 证据链优先
- 目标不是只给结论,而是支持:
authority -> interpretation -> case -> clause -> suggestion
4. 公私分离
- public seeds/exports 不得混入客户私有内容
- 客户模板、客户规则、客户知识卡默认不进入公共导出包
5. 尽量贴合现有 training package 风格
- 沿用 package + metadata + items 的公共包结构
- 便于未来接入离线 CLI、API import/export、dashboard
## 包命名规范
建议统一命名:
- laws_cn_core_v1.json
- judicial_interpretations_cn_contract_v1.json
- contract_templates_cn_official_v1.json
- clause_library_cn_general_v1.json
- review_rules_cn_contract_v1.json
- faq_cn_employment_v1.json
格式:
`<domain>_<scope>_<focus>_v<major>.json`
示例:
- domain: laws / templates / clauses / rules / faq / sources
- scope: cn / tenant / industry
- focus: core / contract / employment / saas / ecommerce
## 与现有 Training Package 的关系
当前仓库已有 Training Case Engine
- version
- metadata
- items[]
- 公共导入导出
- dashboard 承载
新的法务内容包优先复用这一套公共包设计:
- 顶层统一使用 `version``metadata``items`
- 每类内容对象在 `items[]` 中按各自 schema 校验
- 后续可新增 package runner,实现法律内容包的离线 smoke 与导入导出
## 推荐落地顺序
1. 先定 schema
2. 再定 source registry
3. 再定首批 100 资产清单
4. 再填充四大主包:laws / interpretations / templates / rules
5. 最后挂到现有 import-export / training / dashboard
@@ -0,0 +1,71 @@
{
"version": 1,
"metadata": {
"package_name": "legal_content_first_100_assets_v1",
"domain": "sources",
"jurisdiction": "CN",
"content_version": "v1",
"source_type": "internal_authored",
"maintainer": "qishu",
"review_status": "draft",
"notes": "Prioritized first 100 content assets grouped by domain for legal content build-out."
},
"items": [
{
"group": "laws_and_interpretations",
"count": 20,
"assets": [
"民法典合同编核心条文", "公司法", "劳动合同法", "劳动法", "社会保险法用工关键条文",
"仲裁法", "民事诉讼法合同争议关键条文", "电子签名法", "消费者权益保护法", "反不正当竞争法",
"著作权法", "商标法", "专利法", "网络安全法", "数据安全法",
"个人信息保护法", "招标投标法", "建筑法", "最高法合同效力相关司法解释", "最高法担保与违约责任相关司法解释"
]
},
{
"group": "templates",
"count": 25,
"assets": [
"通用买卖合同", "采购框架协议", "销售框架协议", "供货合同", "服务合同",
"技术服务合同", "技术开发合同", "软件开发合同", "SaaS服务协议", "数据处理委托协议",
"数据合作协议", "保密协议NDA", "劳动合同", "劳务合同", "兼职顾问协议",
"委托代理合同", "渠道合作协议", "品牌推广/广告投放合同", "MCN达人合作协议", "电商代运营协议",
"商用房屋租赁合同", "借款合同", "保证合同", "股权转让协议", "投资意向书基础版"
]
},
{
"group": "clauses",
"count": 20,
"assets": [
"定义条款", "标的条款", "交付条款", "验收条款", "付款条件条款",
"发票条款", "违约责任条款", "赔偿范围限制条款", "保密条款", "知识产权归属条款",
"知识产权侵权担保条款", "数据处理与数据安全条款", "个人信息保护条款", "竞业限制/不招揽条款", "期限与续约条款",
"解除与终止条款", "不可抗力条款", "通知送达条款", "争议解决条款", "法律适用与管辖条款"
]
},
{
"group": "review_rules",
"count": 20,
"assets": [
"主体资格审查规则", "签约权限审查规则", "合同名称与交易实质不一致规则", "标的不明确规则", "付款条件不清规则",
"验收标准缺失规则", "自动续约风险规则", "单方免责/责任失衡规则", "违约责任过轻/过重规则", "赔偿上限缺失规则",
"知识产权归属不清规则", "数据合规条款缺失规则", "个人信息处理合法性规则", "保密范围过宽/过窄规则", "解约条件失衡规则",
"管辖约定不利规则", "附件与主合同冲突规则", "印章/签字页完整性规则", "生效条件不明规则", "行业许可/资质前置条件缺失规则"
]
},
{
"group": "faq",
"count": 10,
"assets": [
"付款风险高频问答", "验收风险高频问答", "劳动用工高频问答", "SaaS/软件开发合同高频问答", "数据合规高频问答",
"保密协议高频问答", "广告投放/代运营争议问答", "股权转让常见陷阱问答", "租赁合同常见争议问答", "借款与担保风险问答"
]
},
{
"group": "industry_packs",
"count": 5,
"assets": [
"SaaS/软件行业法务包", "AI/数据服务行业法务包", "电商/代运营行业法务包", "建工/装修行业法务包", "人力资源/劳务外包行业法务包"
]
}
]
}
@@ -0,0 +1,22 @@
{
"version": 1,
"metadata": {
"package_name": "legal_content_release_index_v1",
"domain": "sources",
"jurisdiction": "CN",
"content_version": "v1",
"source_type": "internal_authored",
"maintainer": "qishu",
"review_status": "draft",
"notes": "Initial release index for the legal content workspace."
},
"items": [
{"package_name": "laws_cn_core_v1.json", "domain": "laws", "status": "planned", "priority": 1},
{"package_name": "judicial_interpretations_cn_contract_v1.json", "domain": "laws", "status": "planned", "priority": 2},
{"package_name": "contract_templates_cn_official_v1.json", "domain": "templates", "status": "planned", "priority": 3},
{"package_name": "contract_templates_cn_saas_v1.json", "domain": "templates", "status": "planned", "priority": 4},
{"package_name": "clause_library_cn_general_v1.json", "domain": "clauses", "status": "planned", "priority": 5},
{"package_name": "review_rules_cn_contract_v1.json", "domain": "rules", "status": "planned", "priority": 6},
{"package_name": "faq_cn_contract_review_v1.json", "domain": "faq", "status": "planned", "priority": 7}
]
}
+33
View File
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/clauses.schema.json",
"title": "Clause Library Asset",
"type": "object",
"additionalProperties": false,
"required": ["clause_id", "clause_type", "title", "text", "risk_level", "applicable_contract_types", "source"],
"properties": {
"clause_id": {"type": "string", "minLength": 1},
"clause_type": {"type": "string", "minLength": 1},
"title": {"type": "string", "minLength": 1},
"text": {"type": "string", "minLength": 1},
"plain_explanation": {"type": "string"},
"risk_level": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
"common_risks": {"type": "array", "items": {"type": "string"}},
"negotiation_points": {"type": "array", "items": {"type": "string"}},
"applicable_contract_types": {"type": "array", "minItems": 1, "items": {"type": "string"}},
"industry_tags": {"type": "array", "items": {"type": "string"}},
"linked_law_refs": {"type": "array", "items": {"type": "string"}},
"recommended_variants": {"type": "array", "items": {"type": "string"}},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_type"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"source_url": {"type": "string"},
"license_note": {"type": "string"}
}
}
}
}
+29
View File
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/faq.schema.json",
"title": "Legal FAQ Asset",
"type": "object",
"additionalProperties": false,
"required": ["faq_id", "question", "short_answer", "long_answer", "topic_tags", "source"],
"properties": {
"faq_id": {"type": "string", "minLength": 1},
"question": {"type": "string", "minLength": 1},
"short_answer": {"type": "string", "minLength": 1},
"long_answer": {"type": "string", "minLength": 1},
"topic_tags": {"type": "array", "minItems": 1, "items": {"type": "string"}},
"industry_tags": {"type": "array", "items": {"type": "string"}},
"linked_rule_ids": {"type": "array", "items": {"type": "string"}},
"linked_law_refs": {"type": "array", "items": {"type": "string"}},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_type"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"source_url": {"type": "string"},
"license_note": {"type": "string"}
}
}
}
}
+58
View File
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/laws.schema.json",
"title": "Law Article Asset",
"type": "object",
"additionalProperties": false,
"required": ["law_id", "title", "document_type", "issuing_body", "status", "effective_date", "articles", "source"],
"properties": {
"law_id": {"type": "string", "minLength": 1},
"title": {"type": "string", "minLength": 1},
"document_type": {"type": "string", "enum": ["law", "administrative_regulation", "judicial_interpretation", "department_rule", "local_regulation", "policy_guidance"]},
"issuing_body": {"type": "string", "minLength": 1},
"status": {"type": "string", "enum": ["effective", "amended", "repealed", "superseded", "draft"]},
"effective_date": {"type": "string", "format": "date"},
"expiry_date": {"type": ["string", "null"], "format": "date"},
"keywords": {"type": "array", "items": {"type": "string"}},
"industry_tags": {"type": "array", "items": {"type": "string"}},
"articles": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["article_ref", "article_text"],
"properties": {
"article_ref": {"type": "string", "minLength": 1},
"article_title": {"type": "string"},
"article_text": {"type": "string", "minLength": 1},
"topic_tags": {"type": "array", "items": {"type": "string"}}
}
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_url", "accessed_at"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_url": {"type": "string", "minLength": 1},
"accessed_at": {"type": "string", "format": "date-time"},
"license_note": {"type": "string"}
}
},
"history": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["version_label", "effective_date", "change_note"],
"properties": {
"version_label": {"type": "string", "minLength": 1},
"effective_date": {"type": "string", "format": "date"},
"change_note": {"type": "string", "minLength": 1}
}
}
}
}
}
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/package_manifest.schema.json",
"title": "Legal Content Package Manifest",
"type": "object",
"additionalProperties": false,
"required": ["version", "metadata", "items"],
"properties": {
"version": {"type": "integer", "minimum": 1},
"metadata": {
"type": "object",
"additionalProperties": true,
"required": ["package_name", "domain", "jurisdiction", "content_version", "source_type", "maintainer", "review_status"],
"properties": {
"package_name": {"type": "string", "minLength": 1},
"domain": {"type": "string", "enum": ["laws", "templates", "clauses", "rules", "faq", "sources"]},
"jurisdiction": {"type": "string", "minLength": 1},
"content_version": {"type": "string", "pattern": "^v[0-9]+(\\.[0-9]+)?$"},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"maintainer": {"type": "string", "minLength": 1},
"review_status": {"type": "string", "enum": ["draft", "review", "approved", "published", "deprecated"]},
"created_at": {"type": "string", "format": "date-time"},
"updated_at": {"type": "string", "format": "date-time"},
"notes": {"type": "string"}
}
},
"items": {
"type": "array",
"minItems": 1,
"items": {"type": "object"}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/rules.schema.json",
"title": "Contract Review Rule Asset",
"type": "object",
"additionalProperties": false,
"required": ["rule_id", "rule_name", "contract_scope", "severity", "risk_description", "review_question", "suggested_fix", "legal_basis", "source"],
"properties": {
"rule_id": {"type": "string", "minLength": 1},
"rule_name": {"type": "string", "minLength": 1},
"contract_scope": {"type": "array", "minItems": 1, "items": {"type": "string"}},
"clause_scope": {"type": "array", "items": {"type": "string"}},
"industry_scope": {"type": "array", "items": {"type": "string"}},
"severity": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
"trigger_pattern": {"type": "array", "items": {"type": "string"}},
"risk_description": {"type": "string", "minLength": 1},
"review_question": {"type": "string", "minLength": 1},
"suggested_fix": {"type": "string", "minLength": 1},
"legal_basis": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["law_ref", "reason"],
"properties": {
"law_ref": {"type": "string", "minLength": 1},
"reason": {"type": "string", "minLength": 1}
}
}
},
"case_refs": {"type": "array", "items": {"type": "string"}},
"fallback_clause_ids": {"type": "array", "items": {"type": "string"}},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_type"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"source_url": {"type": "string"},
"license_note": {"type": "string"}
}
}
}
}
+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/sources.schema.json",
"title": "Legal Content Source Registry Entry",
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "name", "source_type", "authority_level", "jurisdiction", "access_mode", "license_risk", "update_frequency"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"name": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized", "commercial_licensed"]},
"authority_level": {"type": "string", "enum": ["primary", "secondary", "editorial", "customer_private"]},
"jurisdiction": {"type": "string", "minLength": 1},
"access_mode": {"type": "string", "enum": ["manual", "crawler", "api", "upload", "licensed_portal"]},
"license_risk": {"type": "string", "enum": ["low", "medium", "high"]},
"update_frequency": {"type": "string", "enum": ["daily", "weekly", "monthly", "event_driven", "ad_hoc"]},
"homepage_url": {"type": "string"},
"notes": {"type": "string"},
"allowed_use": {"type": "array", "items": {"type": "string"}},
"blocked_use": {"type": "array", "items": {"type": "string"}}
}
}
@@ -0,0 +1,61 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/templates.schema.json",
"title": "Contract Template Asset",
"type": "object",
"additionalProperties": false,
"required": ["template_id", "template_name", "contract_type", "industry", "jurisdiction", "version", "clauses", "variables", "source"],
"properties": {
"template_id": {"type": "string", "minLength": 1},
"template_name": {"type": "string", "minLength": 1},
"contract_type": {"type": "string", "minLength": 1},
"industry": {"type": "string", "minLength": 1},
"scenario": {"type": "string"},
"jurisdiction": {"type": "string", "minLength": 1},
"version": {"type": "string", "pattern": "^v[0-9]+(\\.[0-9]+)?$"},
"stance": {"type": "string", "enum": ["neutral", "buyer_favored", "seller_favored", "employer_favored", "employee_favored", "platform_standard"]},
"clauses": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["clause_id", "required"],
"properties": {
"clause_id": {"type": "string", "minLength": 1},
"required": {"type": "boolean"},
"variant": {"type": "string"},
"notes": {"type": "string"}
}
}
},
"variables": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "type", "required"],
"properties": {
"name": {"type": "string", "minLength": 1},
"type": {"type": "string", "enum": ["string", "number", "boolean", "date", "enum"]},
"required": {"type": "boolean"},
"description": {"type": "string"},
"enum_values": {"type": "array", "items": {"type": "string"}}
}
}
},
"generation_questions": {"type": "array", "items": {"type": "string"}},
"review_rule_ids": {"type": "array", "items": {"type": "string"}},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_type"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"source_url": {"type": "string"},
"license_note": {"type": "string"}
}
}
}
}
@@ -0,0 +1,70 @@
{
"version": 1,
"metadata": {
"package_name": "sources_cn_registry_v1",
"domain": "sources",
"jurisdiction": "CN",
"content_version": "v1",
"source_type": "internal_authored",
"maintainer": "qishu",
"review_status": "draft",
"notes": "Initial registry of priority legal content sources for the China legal-content workspace."
},
"items": [
{
"registry_id": "src_cn_npc_lawdb",
"name": "国家法律法规数据库",
"source_type": "official_public",
"authority_level": "primary",
"jurisdiction": "CN",
"access_mode": "manual",
"license_risk": "medium",
"update_frequency": "event_driven",
"homepage_url": "https://flk.npc.gov.cn/",
"allowed_use": ["authority_reference", "editorial_extraction", "citation"],
"blocked_use": ["assume_unlimited_redistribution_without_review"],
"notes": "Primary source for national laws and some core normative documents."
},
{
"registry_id": "src_cn_spc",
"name": "最高人民法院官网",
"source_type": "official_public",
"authority_level": "primary",
"jurisdiction": "CN",
"access_mode": "manual",
"license_risk": "medium",
"update_frequency": "event_driven",
"homepage_url": "https://www.court.gov.cn/",
"allowed_use": ["judicial_interpretation_reference", "guiding_case_reference", "citation"],
"blocked_use": ["bulk_redistribution_without_review"],
"notes": "Priority source for judicial interpretations and selected public cases."
},
{
"registry_id": "src_cn_gov",
"name": "中国政府网",
"source_type": "official_public",
"authority_level": "primary",
"jurisdiction": "CN",
"access_mode": "manual",
"license_risk": "medium",
"update_frequency": "event_driven",
"homepage_url": "https://www.gov.cn/",
"allowed_use": ["administrative_regulation_reference", "policy_reference"],
"blocked_use": ["bulk_redistribution_without_review"],
"notes": "Priority source for State Council regulations and ministry-level policy materials."
},
{
"registry_id": "src_internal_authored",
"name": "Internal authored legal content",
"source_type": "internal_authored",
"authority_level": "editorial",
"jurisdiction": "CN",
"access_mode": "manual",
"license_risk": "low",
"update_frequency": "ad_hoc",
"allowed_use": ["template_authoring", "rule_authoring", "faq_authoring"],
"blocked_use": [],
"notes": "Used for platform-authored templates, clause variants, review rules, and FAQ summaries."
}
]
}