Files
BossAi/seed_elements_2.py
selfreleaseandDevin 7a788bf8dc
CI / 后端测试 (push) Has been cancelled
CI / 前端构建 (push) Has been cancelled
feat: 话题动态化 + 要素化立案 + 知识库增强
话题动态化:
- 新增 POST /topics 端点,AI 根据场景+画像动态生成话题
- 前端3个助手页面改为兜底话题先行,换一批时AI生成
- 去除固化话题列表,支持个性化推荐

要素化立案(对接最高法67类要素表):
- 导入68类要素式起诉状模板到知识库(法〔2025〕82号)
- 覆盖民事/商事/知识产权/行政/刑事自诉/海事/环境/国家赔偿/执行9领域
- ask-analyze 法务场景自动匹配案由模板
- 新增 POST /element-filing 端点,AI填充要素生成要素式起诉状
- ChatPanel 确认事实后可一键生成要素式起诉状,支持复制全文

知识库增强:
- 要素表模板展示全中文化(type/required/标签翻译)
- 知识库页面要素表模板结构化展示(案由/要素清单/诉讼请求)
- 各类型tab显示数量和总数量

画像翻译完善:
- 补充90+个key_facts key中文翻译
- MyProfile多列紧凑布局

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-30 15:12:33 +08:00

649 lines
47 KiB
Python
Raw Permalink 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.
"""最高法67类要素式起诉状模板 - 补充剩余50类。
与 seed_elements.py 合并共67类。
数据来源:最高人民法院、司法部、中华全国律师协会联合印发
《部分案件起诉状答辩状示范文本》(法〔2025〕82号)
"""
import json
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from bossai import KnowledgeStore
# 已导入的17类案由(避免重复)
EXISTING_CAUSES = {
"离婚纠纷", "买卖合同纠纷", "民间借贷纠纷", "劳动争议纠纷",
"机动车交通事故责任纠纷", "房屋买卖合同纠纷", "房屋租赁合同纠纷",
"建设工程施工合同纠纷", "物业服务合同纠纷",
"金融借款合同纠纷", "信用卡纠纷", "融资租赁合同纠纷", "保证保险合同纠纷",
"侵害商标权纠纷", "侵害著作权及邻接权纠纷",
"行政处罚", "强制执行",
}
# 剩余50类
REMAINING_TEMPLATES = [
# ===== 商事类补充(4类) =====
{"title": "证券虚假陈述责任纠纷要素式起诉状", "category": "商事", "cause_of_action": "证券虚假陈述责任纠纷",
"applicable": "上市公司虚假陈述导致投资者损失",
"elements": [
{"key": "stock_name", "label": "股票名称及代码", "type": "text", "required": True},
{"key": "false_statement_date", "label": "虚假陈述实施日", "type": "date", "required": True},
{"key": "exposure_date", "label": "揭露日", "type": "date", "required": True},
{"key": "buy_date", "label": "买入日期", "type": "date", "required": True},
{"key": "buy_price", "label": "买入价格", "type": "number", "required": True},
{"key": "buy_quantity", "label": "买入数量", "type": "number", "required": True},
{"key": "sell_date", "label": "卖出日期(如有)", "type": "date", "required": False},
{"key": "sell_price", "label": "卖出价格(如有)", "type": "number", "required": False},
{"key": "loss_amount", "label": "投资损失金额", "type": "number", "required": True},
{"key": "has_admin_penalty", "label": "是否有行政处罚决定", "type": "boolean", "required": True},
],
"claims": ["赔偿投资损失", "支付利息"]},
{"title": "财产损失保险合同纠纷要素式起诉状", "category": "商事", "cause_of_action": "财产损失保险合同纠纷",
"applicable": "财产保险理赔争议",
"elements": [
{"key": "policy_no", "label": "保单号", "type": "text", "required": True},
{"key": "insured_object", "label": "保险标的", "type": "text", "required": True},
{"key": "coverage_amount", "label": "保险金额", "type": "number", "required": True},
{"key": "incident_date", "label": "事故发生日期", "type": "date", "required": True},
{"key": "incident_desc", "label": "事故经过描述", "type": "textarea", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": True},
{"key": "claim_date", "label": "理赔申请日期", "type": "date", "required": True},
{"key": "insurer_response", "label": "保险公司处理结果", "type": "textarea", "required": True},
],
"claims": ["支付保险赔偿金", "支付逾期理赔利息", "赔偿损失"]},
{"title": "责任保险合同纠纷要素式起诉状", "category": "商事", "cause_of_action": "责任保险合同纠纷",
"applicable": "第三者责任险理赔争议",
"elements": [
{"key": "policy_no", "label": "保单号", "type": "text", "required": True},
{"key": "insurance_type", "label": "险种", "type": "select", "options": ["交强险", "商业三者险", "产品责任险", "雇主责任险", "其他"], "required": True},
{"key": "third_party_claim", "label": "第三者索赔金额", "type": "number", "required": True},
{"key": "incident_date", "label": "事故日期", "type": "date", "required": True},
{"key": "incident_desc", "label": "事故描述", "type": "textarea", "required": True},
{"key": "insurer_response", "label": "保险公司处理结果", "type": "textarea", "required": True},
],
"claims": ["支付保险赔偿金", "承担诉讼费用"]},
{"title": "人身保险合同纠纷要素式起诉状", "category": "商事", "cause_of_action": "人身保险合同纠纷",
"applicable": "人身保险(寿险/意外险/健康险)理赔争议",
"elements": [
{"key": "policy_no", "label": "保单号", "type": "text", "required": True},
{"key": "insurance_type", "label": "险种", "type": "select", "options": ["寿险", "意外伤害险", "健康险", "重疾险", "医疗险"], "required": True},
{"key": "insured_person", "label": "被保险人", "type": "text", "required": True},
{"key": "incident_date", "label": "保险事故日期", "type": "date", "required": True},
{"key": "incident_type", "label": "事故类型", "type": "select", "options": ["身故", "伤残", "疾病", "医疗费用"], "required": True},
{"key": "claim_amount", "label": "理赔金额", "type": "number", "required": True},
{"key": "insurer_response", "label": "保险公司处理结果", "type": "textarea", "required": True},
{"key": "has_dispute_clause", "label": "争议条款", "type": "textarea", "required": False},
],
"claims": ["支付保险金", "支付逾期利息", "恢复保险合同效力"]},
# ===== 知识产权类补充(7类) =====
{"title": "侵害发明专利权纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "侵害发明专利权纠纷",
"applicable": "他人未经许可使用发明专利",
"elements": [
{"key": "patent_name", "label": "专利名称", "type": "text", "required": True},
{"key": "patent_no", "label": "专利号", "type": "text", "required": True},
{"key": "patent_type", "label": "专利类型", "type": "select", "options": ["产品专利", "方法专利", "产品+方法专利"], "required": True},
{"key": "infringement_act", "label": "侵权行为", "type": "select", "options": ["制造", "使用", "许诺销售", "销售", "进口", "其他"], "required": True},
{"key": "infringement_detail", "label": "侵权行为描述", "type": "textarea", "required": True},
{"key": "has_notarization", "label": "是否有公证保全", "type": "boolean", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": False},
],
"claims": ["停止侵权", "赔偿损失", "消除影响"]},
{"title": "侵害外观设计专利权纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "侵害外观设计专利权纠纷",
"applicable": "他人未经许可使用外观设计专利",
"elements": [
{"key": "patent_name", "label": "专利名称", "type": "text", "required": True},
{"key": "patent_no", "label": "专利号", "type": "text", "required": True},
{"key": "product_category", "label": "产品类别", "type": "text", "required": True},
{"key": "infringement_act", "label": "侵权行为", "type": "select", "options": ["制造", "销售", "进口"], "required": True},
{"key": "infringement_detail", "label": "侵权行为描述", "type": "textarea", "required": True},
{"key": "has_notarization", "label": "是否有公证保全", "type": "boolean", "required": True},
],
"claims": ["停止侵权", "赔偿损失", "消除影响"]},
{"title": "侵害植物新品种权纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "侵害植物新品种权纠纷",
"applicable": "他人未经许可使用植物新品种",
"elements": [
{"key": "variety_name", "label": "品种名称", "type": "text", "required": True},
{"key": "variety_right_no", "label": "品种权号", "type": "text", "required": True},
{"key": "infringement_act", "label": "侵权行为", "type": "select", "options": ["生产", "繁殖", "销售", "推广"], "required": True},
{"key": "infringement_detail", "label": "侵权行为描述", "type": "textarea", "required": True},
],
"claims": ["停止侵权", "赔偿损失"]},
{"title": "侵害商业秘密纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "侵害商业秘密纠纷",
"applicable": "他人非法获取、使用或披露商业秘密",
"elements": [
{"key": "secret_name", "label": "商业秘密名称", "type": "text", "required": True},
{"key": "secret_type", "label": "秘密类型", "type": "select", "options": ["技术信息", "经营信息", "客户名单", "其他"], "required": True},
{"key": "confidentiality_measure", "label": "保密措施", "type": "textarea", "required": True},
{"key": "infringement_act", "label": "侵权行为", "type": "select", "options": ["非法获取", "非法披露", "非法使用", "违反保密协议"], "required": True},
{"key": "infringement_detail", "label": "侵权行为描述", "type": "textarea", "required": True},
{"key": "has_confidentiality_agreement", "label": "是否有保密协议", "type": "boolean", "required": True},
],
"claims": ["停止侵权", "赔偿损失", "返还商业秘密载体"]},
{"title": "技术合同纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "技术合同纠纷",
"applicable": "技术开发、转让、咨询、服务合同争议",
"elements": [
{"key": "contract_type", "label": "合同类型", "type": "select", "options": ["技术开发合同", "技术转让合同", "技术咨询合同", "技术服务合同"], "required": True},
{"key": "contract_date", "label": "合同签订日期", "type": "date", "required": True},
{"key": "tech_subject", "label": "技术标的", "type": "text", "required": True},
{"key": "contract_amount", "label": "合同金额", "type": "number", "required": True},
{"key": "paid_amount", "label": "已付金额", "type": "number", "required": True},
{"key": "dispute_type", "label": "争议类型", "type": "select", "options": ["拖欠款项", "技术交付争议", "质量争议", "合同解除"], "required": True},
{"key": "breach_detail", "label": "违约情况", "type": "textarea", "required": True},
],
"claims": ["支付合同款项", "支付违约金", "解除合同", "赔偿损失"]},
{"title": "不正当竞争纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "不正当竞争纠纷",
"applicable": "混淆、虚假宣传、商业诋毁等不正当竞争行为",
"elements": [
{"key": "unfair_act_type", "label": "不正当竞争行为类型", "type": "select", "options": ["混淆行为", "虚假宣传", "商业诋毁", "商业贿赂", "侵犯商业秘密", "不正当有奖销售"], "required": True},
{"key": "act_detail", "label": "行为描述", "type": "textarea", "required": True},
{"key": "act_time", "label": "行为发生时间", "type": "date", "required": True},
{"key": "act_scope", "label": "影响范围", "type": "textarea", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": False},
],
"claims": ["停止不正当竞争行为", "赔偿损失", "消除影响"]},
{"title": "垄断纠纷要素式起诉状", "category": "知识产权", "cause_of_action": "垄断纠纷",
"applicable": "垄断协议、滥用市场支配地位等",
"elements": [
{"key": "monopoly_type", "label": "垄断行为类型", "type": "select", "options": ["垄断协议", "滥用市场支配地位", "经营者集中"], "required": True},
{"key": "relevant_market", "label": "相关市场界定", "type": "textarea", "required": True},
{"key": "act_detail", "label": "行为描述", "type": "textarea", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": False},
],
"claims": ["停止垄断行为", "赔偿损失"]},
# ===== 知识产权行政类(6类) =====
{"title": "商标申请驳回复审纠纷要素式起诉状", "category": "知识产权行政", "cause_of_action": "商标申请驳回复审纠纷",
"applicable": "商标申请被驳回,申请复审后仍不服",
"elements": [
{"key": "trademark_name", "label": "申请商标名称", "type": "text", "required": True},
{"key": "application_no", "label": "申请号", "type": "text", "required": True},
{"key": "rejection_reason", "label": "驳回理由", "type": "textarea", "required": True},
{"key": "review_no", "label": "复审决定书文号", "type": "text", "required": True},
{"key": "review_result", "label": "复审结果", "type": "textarea", "required": True},
],
"claims": ["撤销复审决定", "准予商标注册"]},
{"title": "商标撤销复审行政纠纷要素式起诉状", "category": "知识产权行政", "cause_of_action": "商标撤销复审行政纠纷",
"applicable": "商标被撤销后申请复审不服",
"elements": [
{"key": "trademark_name", "label": "商标名称", "type": "text", "required": True},
{"key": "trademark_no", "label": "商标注册号", "type": "text", "required": True},
{"key": "revocation_reason", "label": "撤销理由", "type": "textarea", "required": True},
{"key": "review_no", "label": "复审决定书文号", "type": "text", "required": True},
],
"claims": ["撤销复审决定", "维持商标注册"]},
{"title": "商标无效行政纠纷要素式起诉状", "category": "知识产权行政", "cause_of_action": "商标无效行政纠纷",
"applicable": "商标被宣告无效后不服",
"elements": [
{"key": "trademark_name", "label": "商标名称", "type": "text", "required": True},
{"key": "trademark_no", "label": "商标注册号", "type": "text", "required": True},
{"key": "invalidation_reason", "label": "无效理由", "type": "textarea", "required": True},
{"key": "ruling_no", "label": "裁定书文号", "type": "text", "required": True},
],
"claims": ["撤销无效宣告", "维持商标注册"]},
{"title": "专利申请驳回复审行政纠纷要素式起诉状", "category": "知识产权行政", "cause_of_action": "专利申请驳回复审行政纠纷",
"applicable": "专利申请被驳回,复审后仍不服",
"elements": [
{"key": "patent_name", "label": "申请专利名称", "type": "text", "required": True},
{"key": "application_no", "label": "申请号", "type": "text", "required": True},
{"key": "rejection_reason", "label": "驳回理由", "type": "textarea", "required": True},
{"key": "review_no", "label": "复审决定书文号", "type": "text", "required": True},
],
"claims": ["撤销复审决定", "准予专利授权"]},
{"title": "专利无效行政纠纷要素式起诉状", "category": "知识产权行政", "cause_of_action": "专利无效行政纠纷",
"applicable": "专利被宣告无效后不服",
"elements": [
{"key": "patent_name", "label": "专利名称", "type": "text", "required": True},
{"key": "patent_no", "label": "专利号", "type": "text", "required": True},
{"key": "invalidation_reason", "label": "无效理由", "type": "textarea", "required": True},
{"key": "ruling_no", "label": "无效宣告请求审查决定书文号", "type": "text", "required": True},
],
"claims": ["撤销无效宣告决定", "维持专利权有效"]},
{"title": "垄断纠纷(行政)要素式起诉状", "category": "知识产权行政", "cause_of_action": "垄断纠纷(行政)",
"applicable": "对反垄断执法机构的行政处罚决定不服",
"elements": [
{"key": "penalty_authority", "label": "执法机构", "type": "text", "required": True},
{"key": "penalty_no", "label": "处罚决定书文号", "type": "text", "required": True},
{"key": "monopoly_type", "label": "垄断行为类型", "type": "select", "options": ["垄断协议", "滥用市场支配地位", "经营者集中"], "required": True},
{"key": "penalty_content", "label": "处罚内容", "type": "textarea", "required": True},
],
"claims": ["撤销行政处罚决定", "变更处罚内容"]},
# ===== 行政类补充(11类) =====
{"title": "行政强制执行纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政强制执行",
"applicable": "对行政机关的行政强制执行行为不服",
"elements": [
{"key": "execution_authority", "label": "执行机关", "type": "text", "required": True},
{"key": "execution_no", "label": "执行决定书文号", "type": "text", "required": True},
{"key": "execution_date", "label": "执行日期", "type": "date", "required": True},
{"key": "execution_measure", "label": "强制执行措施", "type": "select", "options": ["查封", "扣押", "冻结", "划拨", "拍卖", "拆除", "其他"], "required": True},
{"key": "execution_target", "label": "执行标的", "type": "text", "required": True},
{"key": "dispute_reason", "label": "争议理由", "type": "textarea", "required": True},
],
"claims": ["撤销强制执行决定", "返还财产", "赔偿损失"]},
{"title": "行政许可纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政许可",
"applicable": "对行政机关的行政许可决定(不予许可/撤销许可)不服",
"elements": [
{"key": "permit_type", "label": "许可类型", "type": "text", "required": True},
{"key": "application_date", "label": "申请日期", "type": "date", "required": True},
{"key": "authority", "label": "许可机关", "type": "text", "required": True},
{"key": "decision_date", "label": "决定日期", "type": "date", "required": True},
{"key": "decision_content", "label": "决定内容", "type": "select", "options": ["不予许可", "撤销许可", "变更许可", "吊销许可"], "required": True},
{"key": "decision_reason", "label": "决定理由", "type": "textarea", "required": True},
],
"claims": ["撤销行政决定", "判令作出许可", "赔偿损失"]},
{"title": "国有土地上房屋征收决定纠纷要素式起诉状", "category": "行政", "cause_of_action": "国有土地上房屋征收决定",
"applicable": "对政府作出的房屋征收决定不服",
"elements": [
{"key": "property_address", "label": "被征收房屋地址", "type": "text", "required": True},
{"key": "property_area", "label": "房屋面积", "type": "number", "required": True},
{"key": "decision_no", "label": "征收决定书文号", "type": "text", "required": True},
{"key": "decision_date", "label": "征收决定日期", "type": "date", "required": True},
{"key": "authority", "label": "征收主体", "type": "text", "required": True},
{"key": "compensation_plan", "label": "补偿方案", "type": "textarea", "required": True},
{"key": "dispute_reason", "label": "争议理由", "type": "textarea", "required": True},
],
"claims": ["撤销征收决定", "重新作出补偿决定", "提高补偿标准"]},
{"title": "工伤保险资格或待遇认定纠纷要素式起诉状", "category": "行政", "cause_of_action": "工伤保险资格或者待遇认定(行政)",
"applicable": "对工伤保险资格认定或待遇标准不服",
"elements": [
{"key": "injury_date", "label": "受伤日期", "type": "date", "required": True},
{"key": "injury_desc", "label": "受伤经过", "type": "textarea", "required": True},
{"key": "recognition_no", "label": "认定决定书文号", "type": "text", "required": True},
{"key": "recognition_result", "label": "认定结果", "type": "select", "options": ["认定为工伤", "不予认定为工伤", "视同工伤", "不视同工伤"], "required": True},
{"key": "disability_level", "label": "伤残等级(如有)", "type": "text", "required": False},
{"key": "treatment_amount", "label": "待遇金额争议", "type": "number", "required": False},
],
"claims": ["撤销认定决定", "重新作出认定", "支付工伤保险待遇"]},
{"title": "政府信息公开纠纷要素式起诉状", "category": "行政", "cause_of_action": "政府信息公开",
"applicable": "申请政府信息公开被拒绝或逾期未答复",
"elements": [
{"key": "application_date", "label": "申请日期", "type": "date", "required": True},
{"key": "info_content", "label": "申请公开的信息内容", "type": "textarea", "required": True},
{"key": "authority", "label": "被申请机关", "type": "text", "required": True},
{"key": "response", "label": "答复情况", "type": "select", "options": ["逾期未答复", "拒绝公开", "部分公开", "信息不存在"], "required": True},
{"key": "refusal_reason", "label": "拒绝理由(如有)", "type": "textarea", "required": False},
],
"claims": ["判令公开政府信息", "重新作出答复"]},
{"title": "行政复议纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政复议",
"applicable": "对行政复议决定不服",
"elements": [
{"key": "original_decision", "label": "原行政行为", "type": "textarea", "required": True},
{"key": "original_authority", "label": "原行为机关", "type": "text", "required": True},
{"key": "review_authority", "label": "复议机关", "type": "text", "required": True},
{"key": "review_no", "label": "复议决定书文号", "type": "text", "required": True},
{"key": "review_date", "label": "复议决定日期", "type": "date", "required": True},
{"key": "review_result", "label": "复议结果", "type": "select", "options": ["维持", "撤销", "变更", "确认违法", "驳回"], "required": True},
],
"claims": ["撤销复议决定", "撤销原行政行为", "重新作出行政行为"]},
{"title": "行政协议纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政协议",
"applicable": "行政机关不履行行政协议或单方变更解除",
"elements": [
{"key": "agreement_name", "label": "协议名称", "type": "text", "required": True},
{"key": "agreement_date", "label": "签订日期", "type": "date", "required": True},
{"key": "agreement_parties", "label": "协议双方", "type": "text", "required": True},
{"key": "agreement_content", "label": "协议主要内容", "type": "textarea", "required": True},
{"key": "dispute_type", "label": "争议类型", "type": "select", "options": ["不履行", "单方变更", "单方解除", "补偿争议"], "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": False},
],
"claims": ["继续履行协议", "赔偿损失", "补偿"]},
{"title": "行政补偿纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政补偿",
"applicable": "对行政机关的行政补偿决定不服",
"elements": [
{"key": "compensation_reason", "label": "补偿事由", "type": "textarea", "required": True},
{"key": "authority", "label": "补偿机关", "type": "text", "required": True},
{"key": "compensation_offer", "label": "补偿方案", "type": "textarea", "required": True},
{"key": "claim_amount", "label": "诉求补偿金额", "type": "number", "required": True},
{"key": "dispute_reason", "label": "争议理由", "type": "textarea", "required": True},
],
"claims": ["提高补偿标准", "支付补偿款"]},
{"title": "行政赔偿纠纷要素式起诉状", "category": "行政", "cause_of_action": "行政赔偿",
"applicable": "行政机关违法行为造成损失,要求赔偿",
"elements": [
{"key": "illegal_act", "label": "违法行为描述", "type": "textarea", "required": True},
{"key": "authority", "label": "赔偿义务机关", "type": "text", "required": True},
{"key": "act_date", "label": "行为发生日期", "type": "date", "required": True},
{"key": "loss_type", "label": "损失类型", "type": "select", "options": ["财产损失", "人身损害", "精神损害"], "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": True},
{"key": "has_confirmed_illegal", "label": "是否已确认违法", "type": "boolean", "required": True},
],
"claims": ["支付赔偿金", "返还财产", "恢复原状"]},
{"title": "不履行法定职责纠纷要素式起诉状", "category": "行政", "cause_of_action": "不履行法定职责",
"applicable": "行政机关不履行或拖延履行法定职责",
"elements": [
{"key": "duty_type", "label": "法定职责类型", "type": "text", "required": True},
{"key": "application_date", "label": "申请履行日期", "type": "date", "required": True},
{"key": "authority", "label": "被诉行政机关", "type": "text", "required": True},
{"key": "response", "label": "答复情况", "type": "select", "options": ["未答复", "拒绝履行", "拖延履行"], "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": False},
],
"claims": ["判令履行法定职责", "赔偿损失"]},
# ===== 刑事自诉类(4类) =====
{"title": "侮辱案刑事自诉要素式起诉状", "category": "刑事自诉", "cause_of_action": "侮辱案刑事自诉(附带民事)",
"applicable": "他人以暴力或其他方法公然侮辱,情节严重",
"elements": [
{"key": "insult_act", "label": "侮辱行为描述", "type": "textarea", "required": True},
{"key": "act_date", "label": "行为发生日期", "type": "date", "required": True},
{"key": "act_location", "label": "行为发生地点", "type": "text", "required": True},
{"key": "publicity", "label": "是否公然进行", "type": "boolean", "required": True},
{"key": "severity", "label": "情节严重程度", "type": "textarea", "required": True},
{"key": "evidence", "label": "证据清单", "type": "textarea", "required": True},
{"key": "civil_claim", "label": "附带民事诉求", "type": "textarea", "required": False},
],
"claims": ["追究刑事责任", "赔礼道歉", "赔偿精神损害"]},
{"title": "诽谤案刑事自诉要素式起诉状", "category": "刑事自诉", "cause_of_action": "诽谤案刑事自诉(附带民事)",
"applicable": "他人捏造事实诽谤,情节严重",
"elements": [
{"key": "fabrication_detail", "label": "捏造事实描述", "type": "textarea", "required": True},
{"key": "spread_method", "label": "传播方式", "type": "select", "options": ["口头", "文字", "网络", "其他"], "required": True},
{"key": "act_date", "label": "行为发生日期", "type": "date", "required": True},
{"key": "severity", "label": "情节严重程度", "type": "textarea", "required": True},
{"key": "evidence", "label": "证据清单", "type": "textarea", "required": True},
],
"claims": ["追究刑事责任", "赔礼道歉", "赔偿精神损害"]},
{"title": "重婚案刑事自诉要素式起诉状", "category": "刑事自诉", "cause_of_action": "重婚案刑事自诉(附带民事)",
"applicable": "配偶与他人重婚",
"elements": [
{"key": "legal_marriage", "label": "合法婚姻情况", "type": "textarea", "required": True},
{"key": "bigamy_detail", "label": "重婚行为描述", "type": "textarea", "required": True},
{"key": "bigamy_start", "label": "重婚开始时间", "type": "date", "required": True},
{"key": "cohabitation_proof", "label": "以夫妻名义共同生活证据", "type": "textarea", "required": True},
],
"claims": ["追究刑事责任"]},
{"title": "拒不执行判决裁定案刑事自诉要素式起诉状", "category": "刑事自诉", "cause_of_action": "拒不执行判决裁定案刑事自诉(附带民事)",
"applicable": "被执行人拒不执行生效判决裁定,情节严重",
"elements": [
{"key": "effective_doc", "label": "生效判决/裁定文号", "type": "text", "required": True},
{"key": "effective_date", "label": "生效日期", "type": "date", "required": True},
{"key": "obligation", "label": "义务内容", "type": "textarea", "required": True},
{"key": "refusal_act", "label": "拒不执行行为描述", "type": "textarea", "required": True},
{"key": "has_ability", "label": "是否有履行能力", "type": "boolean", "required": True},
{"key": "property_clue", "label": "财产线索", "type": "textarea", "required": False},
],
"claims": ["追究刑事责任"]},
# ===== 海事类(4类) =====
{"title": "船舶碰撞损害责任纠纷要素式起诉状", "category": "海事", "cause_of_action": "船舶碰撞损害责任纠纷",
"applicable": "船舶之间碰撞造成损害",
"elements": [
{"key": "collision_date", "label": "碰撞日期", "type": "date", "required": True},
{"key": "collision_location", "label": "碰撞地点(水域)", "type": "text", "required": True},
{"key": "own_vessel", "label": "己方船舶信息", "type": "text", "required": True},
{"key": "other_vessel", "label": "对方船舶信息", "type": "text", "required": True},
{"key": "responsibility", "label": "责任比例", "type": "text", "required": True},
{"key": "damage_detail", "label": "损害情况", "type": "textarea", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": True},
],
"claims": ["赔偿损失", "支付利息"]},
{"title": "海上人身损害责任纠纷要素式起诉状", "category": "海事", "cause_of_action": "海上通海水域人身损害责任纠纷",
"applicable": "海上或通海水域事故造成人身伤亡",
"elements": [
{"key": "incident_date", "label": "事故日期", "type": "date", "required": True},
{"key": "incident_location", "label": "事故地点", "type": "text", "required": True},
{"key": "victim_info", "label": "受害人信息", "type": "text", "required": True},
{"key": "injury_detail", "label": "伤亡情况", "type": "textarea", "required": True},
{"key": "medical_expense", "label": "医疗费", "type": "number", "required": False},
{"key": "death_compensation", "label": "死亡赔偿金(如适用)", "type": "number", "required": False},
],
"claims": ["赔偿医疗费", "赔偿死亡赔偿金", "赔偿精神损害抚慰金"]},
{"title": "海上货运代理合同纠纷要素式起诉状", "category": "海事", "cause_of_action": "海上通海水域货运代理合同纠纷",
"applicable": "海上/水上货物运输代理合同争议",
"elements": [
{"key": "contract_date", "label": "合同签订日期", "type": "date", "required": True},
{"key": "goods_info", "label": "货物信息", "type": "textarea", "required": True},
{"key": "route", "label": "运输路线", "type": "text", "required": True},
{"key": "freight", "label": "运费金额", "type": "number", "required": True},
{"key": "dispute_type", "label": "争议类型", "type": "select", "options": ["拖欠运费", "货物损坏", "货物灭失", "迟延交付"], "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": True},
],
"claims": ["支付运费", "赔偿货物损失", "支付违约金"]},
{"title": "船员劳务合同纠纷要素式起诉状", "category": "海事", "cause_of_action": "船员劳务合同纠纷",
"applicable": "船员与船东之间的劳务争议",
"elements": [
{"key": "service_start", "label": "上船日期", "type": "date", "required": True},
{"key": "service_end", "label": "下船日期", "type": "date", "required": False},
{"key": "vessel_name", "label": "船舶名称", "type": "text", "required": True},
{"key": "position", "label": "船员职务", "type": "text", "required": True},
{"key": "salary_standard", "label": "工资标准", "type": "number", "required": True},
{"key": "unpaid_salary", "label": "拖欠工资", "type": "number", "required": True},
{"key": "has_injury", "label": "是否有工伤", "type": "boolean", "required": False},
],
"claims": ["支付拖欠工资", "支付经济补偿金", "工伤赔偿"]},
# ===== 环境资源类(3类) =====
{"title": "环境污染民事公益诉讼要素式起诉状", "category": "环境资源", "cause_of_action": "环境污染民事公益诉讼",
"applicable": "污染环境损害社会公共利益",
"elements": [
{"key": "pollution_type", "label": "污染类型", "type": "select", "options": ["大气污染", "水污染", "土壤污染", "噪声污染", "固废污染"], "required": True},
{"key": "polluter", "label": "污染者信息", "type": "text", "required": True},
{"key": "pollution_location", "label": "污染地点", "type": "text", "required": True},
{"key": "pollution_duration", "label": "污染持续时间", "type": "text", "required": True},
{"key": "damage_scope", "label": "损害范围", "type": "textarea", "required": True},
{"key": "remediation_cost", "label": "生态修复费用", "type": "number", "required": False},
],
"claims": ["停止污染", "修复生态环境", "赔偿生态损害", "赔礼道歉"]},
{"title": "生态破坏民事公益诉讼要素式起诉状", "category": "环境资源", "cause_of_action": "生态破坏民事公益诉讼",
"applicable": "破坏生态损害社会公共利益",
"elements": [
{"key": "destruction_type", "label": "破坏类型", "type": "select", "options": ["滥砍滥伐", "非法捕捞", "非法狩猎", "破坏湿地", "破坏草原"], "required": True},
{"key": "destroyer", "label": "破坏者信息", "type": "text", "required": True},
{"key": "destruction_location", "label": "破坏地点", "type": "text", "required": True},
{"key": "damage_scope", "label": "损害范围", "type": "textarea", "required": True},
{"key": "remediation_cost", "label": "生态修复费用", "type": "number", "required": False},
],
"claims": ["停止破坏", "修复生态环境", "赔偿生态损害"]},
{"title": "生态环境损害赔偿诉讼要素式起诉状", "category": "环境资源", "cause_of_action": "生态环境损害赔偿诉讼",
"applicable": "政府作为赔偿权利人提起生态环境损害赔偿",
"elements": [
{"key": "damage_type", "label": "损害类型", "type": "text", "required": True},
{"key": "damager", "label": "损害者信息", "type": "text", "required": True},
{"key": "damage_location", "label": "损害地点", "type": "text", "required": True},
{"key": "damage_scope", "label": "损害范围及程度", "type": "textarea", "required": True},
{"key": "remediation_cost", "label": "修复费用", "type": "number", "required": True},
{"key": "loss_amount", "label": "生态环境损害金额", "type": "number", "required": True},
],
"claims": ["承担修复费用", "赔偿生态环境损害", "停止损害行为"]},
# ===== 国家赔偿类(4类) =====
{"title": "违法刑事拘留赔偿要素式起诉状", "category": "国家赔偿", "cause_of_action": "违法刑事拘留赔偿",
"applicable": "被违法刑事拘留后申请国家赔偿",
"elements": [
{"key": "detention_no", "label": "拘留决定书文号", "type": "text", "required": True},
{"key": "detention_start", "label": "拘留起始日期", "type": "date", "required": True},
{"key": "detention_end", "label": "拘留结束日期", "type": "date", "required": True},
{"key": "detention_days", "label": "拘留天数", "type": "number", "required": True},
{"key": "authority", "label": "作出拘留决定的机关", "type": "text", "required": True},
{"key": "release_reason", "label": "释放原因", "type": "textarea", "required": True},
{"key": "claim_amount", "label": "赔偿请求金额", "type": "number", "required": True},
],
"claims": ["支付人身自由损害赔偿金", "赔礼道歉", "恢复名誉"]},
{"title": "刑事改判无罪赔偿要素式起诉状", "category": "国家赔偿", "cause_of_action": "刑事改判无罪赔偿",
"applicable": "原判有罪后改判无罪,申请国家赔偿",
"elements": [
{"key": "original_judgment", "label": "原判决文号", "type": "text", "required": True},
{"key": "revised_judgment", "label": "改判判决文号", "type": "text", "required": True},
{"key": "detention_period", "label": "被羁押期间", "type": "text", "required": True},
{"key": "detention_days", "label": "羁押天数", "type": "number", "required": True},
{"key": "claim_amount", "label": "赔偿请求金额", "type": "number", "required": True},
],
"claims": ["支付人身自由损害赔偿金", "精神损害抚慰金", "赔礼道歉"]},
{"title": "怠于履行监管职责致伤致死赔偿要素式起诉状", "category": "国家赔偿", "cause_of_action": "怠于履行监管职责致伤致死赔偿",
"applicable": "监管机关怠于履行职责导致被监管人伤亡",
"elements": [
{"key": "supervision_authority", "label": "监管机关", "type": "text", "required": True},
{"key": "victim_info", "label": "被监管人信息", "type": "text", "required": True},
{"key": "incident_date", "label": "事件发生日期", "type": "date", "required": True},
{"key": "incident_detail", "label": "事件经过", "type": "textarea", "required": True},
{"key": "duty_breach", "label": "怠于履职情况", "type": "textarea", "required": True},
{"key": "damage_result", "label": "损害结果", "type": "select", "options": ["受伤", "死亡"], "required": True},
{"key": "claim_amount", "label": "赔偿请求金额", "type": "number", "required": True},
],
"claims": ["支付赔偿金", "追究相关责任"]},
{"title": "错误执行赔偿要素式起诉状", "category": "国家赔偿", "cause_of_action": "错误执行赔偿",
"applicable": "法院错误执行导致损失,申请国家赔偿",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "execution_authority", "label": "执行法院", "type": "text", "required": True},
{"key": "wrong_act", "label": "错误执行行为", "type": "textarea", "required": True},
{"key": "execution_date", "label": "错误执行日期", "type": "date", "required": True},
{"key": "loss_detail", "label": "损失情况", "type": "textarea", "required": True},
{"key": "loss_amount", "label": "损失金额", "type": "number", "required": True},
],
"claims": ["支付赔偿金", "返还财产"]},
# ===== 执行类补充(8类) =====
{"title": "暂时解除限制措施申请书要素式模板", "category": "执行", "cause_of_action": "暂时解除乘坐飞机高铁限制措施",
"applicable": "被限制高消费后申请暂时解除乘坐飞机高铁限制",
"elements": [
{"key": "restriction_no", "label": "限制消费令文号", "type": "text", "required": True},
{"key": "restriction_date", "label": "限制日期", "type": "date", "required": True},
{"key": "reason", "label": "申请解除理由", "type": "select", "options": ["紧急就医", "直系亲属丧葬", "公务出行", "其他紧急情况"], "required": True},
{"key": "travel_plan", "label": "出行计划(日期/航班车次)", "type": "textarea", "required": True},
],
"claims": ["暂时解除乘坐飞机限制", "暂时解除乘坐高铁限制"]},
{"title": "参与分配申请书要素式模板", "category": "执行", "cause_of_action": "参与分配",
"applicable": "被执行人财产不足清偿全部债务,债权人申请参与分配",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "debtor", "label": "被执行人", "type": "text", "required": True},
{"key": "creditor_claim", "label": "申请人债权金额", "type": "number", "required": True},
{"key": "total_debt", "label": "被执行人总债务", "type": "number", "required": False},
{"key": "available_property", "label": "可供分配财产", "type": "textarea", "required": True},
],
"claims": ["参与财产分配"]},
{"title": "执行担保申请书要素式模板", "category": "执行", "cause_of_action": "执行担保",
"applicable": "执行中提供担保暂缓执行",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "guarantor", "label": "担保人信息", "type": "text", "required": True},
{"key": "guarantee_type", "label": "担保方式", "type": "select", "options": ["保证", "抵押", "质押"], "required": True},
{"key": "guarantee_amount", "label": "担保金额", "type": "number", "required": True},
{"key": "guarantee_property", "label": "担保财产", "type": "textarea", "required": True},
],
"claims": ["暂缓执行"]},
{"title": "确认优先购买权申请书要素式模板", "category": "执行", "cause_of_action": "确认优先购买权",
"applicable": "执行拍卖中主张优先购买权",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "auction_target", "label": "拍卖标的", "type": "text", "required": True},
{"key": "priority_basis", "label": "优先购买权依据", "type": "select", "options": ["共有关系", "租赁关系", "公司法规定", "其他"], "required": True},
{"key": "priority_proof", "label": "优先购买权证据", "type": "textarea", "required": True},
],
"claims": ["确认优先购买权"]},
{"title": "执行异议申请书要素式模板", "category": "执行", "cause_of_action": "执行异议",
"applicable": "对执行行为不服提出异议",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "objection_type", "label": "异议类型", "type": "select", "options": ["执行行为异议", "案外人异议"], "required": True},
{"key": "objection_target", "label": "异议标的", "type": "text", "required": True},
{"key": "objection_reason", "label": "异议理由", "type": "textarea", "required": True},
],
"claims": ["撤销执行行为", "中止执行", "解除查封扣押"]},
{"title": "执行复议申请书要素式模板", "category": "执行", "cause_of_action": "执行复议",
"applicable": "对执行异议裁定不服申请复议",
"elements": [
{"key": "ruling_no", "label": "异议裁定书文号", "type": "text", "required": True},
{"key": "ruling_date", "label": "裁定日期", "type": "date", "required": True},
{"key": "ruling_result", "label": "裁定结果", "type": "textarea", "required": True},
{"key": "rejection_reason", "label": "复议理由", "type": "textarea", "required": True},
],
"claims": ["撤销异议裁定", "支持异议请求"]},
{"title": "执行监督申请书要素式模板", "category": "执行", "cause_of_action": "执行监督",
"applicable": "请求上级法院对执行行为进行监督",
"elements": [
{"key": "execution_case", "label": "执行案件文号", "type": "text", "required": True},
{"key": "execution_court", "label": "执行法院", "type": "text", "required": True},
{"key": "supervision_reason", "label": "申请监督理由", "type": "textarea", "required": True},
{"key": "illegal_act", "label": "违法/不当执行行为", "type": "textarea", "required": True},
],
"claims": ["监督执行", "纠正违法执行行为"]},
{"title": "不予执行仲裁裁决申请书要素式模板", "category": "执行", "cause_of_action": "不予执行仲裁裁决调解书或公证债权文书",
"applicable": "申请不予执行仲裁裁决/调解书/公证债权文书",
"elements": [
{"key": "award_no", "label": "仲裁裁决/调解书/公证文书文号", "type": "text", "required": True},
{"key": "award_date", "label": "文书作出日期", "type": "date", "required": True},
{"key": "refusal_reason", "label": "申请不予执行理由", "type": "select", "options": ["没有仲裁协议", "裁决事项超范围", "程序违法", "证据伪造", "隐瞒证据", "仲裁员枉法"], "required": True},
{"key": "reason_detail", "label": "理由详细说明", "type": "textarea", "required": True},
],
"claims": ["不予执行仲裁裁决", "不予执行公证债权文书"]},
# ===== 行政答辩状(1类) =====
{"title": "行政答辩状要素式模板", "category": "行政", "cause_of_action": "行政答辩状",
"applicable": "行政机关作为被告提交答辩状",
"elements": [
{"key": "case_no", "label": "案号", "type": "text", "required": True},
{"key": "plaintiff", "label": "原告信息", "type": "text", "required": True},
{"key": "original_act", "label": "被诉行政行为", "type": "textarea", "required": True},
{"key": "defense_basis", "label": "答辩依据", "type": "textarea", "required": True},
{"key": "evidence", "label": "证据清单", "type": "textarea", "required": True},
],
"claims": ["请求驳回原告诉讼请求"]},
]
def seed_remaining_templates():
"""导入剩余50类要素表模板。"""
store = KnowledgeStore()
count = 0
for tmpl in REMAINING_TEMPLATES:
cause = tmpl["cause_of_action"]
if cause in EXISTING_CAUSES:
continue
content = json.dumps(tmpl, ensure_ascii=False, indent=2)
store.add(
title=tmpl["title"],
content=content,
source="最高法法〔2025〕82号",
doc_type="element_template",
keywords=cause,
)
count += 1
print(f"已补充导入 {count} 类要素表模板")
return count
if __name__ == "__main__":
seed_remaining_templates()