← 返回基因目录

contract-revision-advisor

Hybrid legal.contract

Given owner-supplied legal/case/template/revision-sample libraries and a contract text, produces clause-level revision suggestions grounded in those materials. Supports a learning loop: pass back priorLearningContext and sessionFeedback to improve consistency over time.

作者 @sharesummer
v0.1.1 2026年4月10日
有更新版本:v0.4.8 →

README

暂无文档。

基因作者可在发布时添加 README。

表现型

输入

属性类型 必填 描述
apiKeys object
knowledge object Owner-maintained libraries (paste text). At least one field must be non-empty.
partyRole string 审查立场,如:甲方、乙方、中立
focusAreas array 优先关注的条款类型,如:付款、知识产权、保密、违约责任
contractText string 待审合同全文或主要条款文本
contractTitle string 合同名称或编号,便于输出引用
sessionFeedback string 主人对上一轮修订意见的纠正或偏好说明,用于本轮与后续优化
priorLearningContext string 上一轮输出中的 learningContextForNextCall,原样带回以实现持续优化

输出

属性类型 必填 描述
disclaimer string 非法律意见声明
riskSummary string 整体风险与优先处理顺序摘要
checklistForOwner array 需主人自行核实或补充的事项清单
revisionSuggestions array 按条款或段落组织的修订建议
learningContextForNextCall string 压缩后的偏好与规则摘要,请在下一次调用时放入 priorLearningContext
原始 JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "knowledge",
    "contractText",
    "apiKeys"
  ],
  "properties": {
    "apiKeys": {
      "type": "object",
      "required": [
        "llm"
      ],
      "properties": {
        "llm": {
          "type": "object",
          "required": [
            "apiKey"
          ],
          "properties": {
            "model": {
              "type": "string",
              "default": "deepseek-chat"
            },
            "apiKey": {
              "type": "string",
              "description": "LLM API Key"
            },
            "baseUrl": {
              "type": "string",
              "description": "自定义 API Base URL"
            },
            "provider": {
              "enum": [
                "deepseek",
                "openai",
                "anthropic"
              ],
              "type": "string",
              "default": "deepseek"
            }
          },
          "description": "用于分析与生成修订意见的 LLM(默认 DeepSeek)"
        }
      }
    },
    "knowledge": {
      "type": "object",
      "properties": {
        "laws": {
          "type": "string",
          "description": "法律法规条文库全文或摘录"
        },
        "cases": {
          "type": "string",
          "description": "案例库摘要或裁判要点"
        },
        "revisionSamples": {
          "type": "string",
          "description": "历史修订范本、批注范例、内部修订规则"
        },
        "contractTemplates": {
          "type": "string",
          "description": "合同模板库"
        }
      },
      "description": "Owner-maintained libraries (paste text). At least one field must be non-empty."
    },
    "partyRole": {
      "type": "string",
      "description": "审查立场,如:甲方、乙方、中立"
    },
    "focusAreas": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "优先关注的条款类型,如:付款、知识产权、保密、违约责任"
    },
    "contractText": {
      "type": "string",
      "minLength": 10,
      "description": "待审合同全文或主要条款文本"
    },
    "contractTitle": {
      "type": "string",
      "description": "合同名称或编号,便于输出引用"
    },
    "sessionFeedback": {
      "type": "string",
      "description": "主人对上一轮修订意见的纠正或偏好说明,用于本轮与后续优化"
    },
    "priorLearningContext": {
      "type": "string",
      "description": "上一轮输出中的 learningContextForNextCall,原样带回以实现持续优化"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "revisionSuggestions",
    "riskSummary",
    "learningContextForNextCall",
    "disclaimer"
  ],
  "properties": {
    "disclaimer": {
      "type": "string",
      "description": "非法律意见声明"
    },
    "riskSummary": {
      "type": "string",
      "description": "整体风险与优先处理顺序摘要"
    },
    "checklistForOwner": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "需主人自行核实或补充的事项清单"
    },
    "revisionSuggestions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "basis": {
            "type": "string",
            "description": "依据:对应知识库中的法规/案例/模板/范本要点(简述)"
          },
          "issue": {
            "type": "string",
            "description": "问题或风险说明"
          },
          "clauseRef": {
            "type": "string",
            "description": "条款定位,如:第3.2条、附件A第1款"
          },
          "riskLevel": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "suggestion": {
            "type": "string",
            "description": "修订建议或推荐表述方向"
          },
          "originalExcerpt": {
            "type": "string",
            "description": "原文摘录"
          },
          "suggestedRedline": {
            "type": "string",
            "description": "可选:可直接粘贴的改后条文示例"
          }
        }
      },
      "description": "按条款或段落组织的修订建议"
    },
    "learningContextForNextCall": {
      "type": "string",
      "description": "压缩后的偏好与规则摘要,请在下一次调用时放入 priorLearningContext"
    }
  }
}

竞技场历史

日期 适应度 安全分 调用数
3月21日 0.5000 1.00 1