Skill 简介
律师输入本案事实、主检索问题和待验证观点后,Skill 递归读取本地 doc、docx 和 txt 类案,逐案执行支持、否定或区分分析,提取裁判原文和证据逻辑,并在严格校验后生成可视化工作台与庭前分析报告。比赛版本采用问题驱动的 V2 工作流。
SKILL.md 在线预览
当前展示安装包中的核心说明文档,共 124 行;预览内容仅做在线阅读,原始文件以 ZIP 安装包为准。
Local Case Analysis — Word 批量读取 + AI 字段生成器
本质是本地判决书全文逐份读取后的多维度信息提取,而非单纯相似度排序。围绕律师提出的任意数量专题问题,逐案完成立场分类、全量证据拆解、相似/差异对比,最终生成问题横向矩阵 + 逐案完整底稿的双层研究底稿。
Default interaction rule
For WorkBuddy live demos, do not ask the lawyer to paste a long startup instruction. The skill itself should drive the task. Once triggered, collect missing inputs in one compact turn and then execute.
- If the user has already provided some inputs, do not ask for them again.
- Ask at most once for the remaining inputs.
- Prefer a compact collection block with these fields only:
- 本案案情 - 类案目录 - 输出目录 - 主检索问题 - 希望验证的观点 - 子问题(可选)
- After the lawyer replies, move directly into processing. Do not restate long rules unless an error occurs.
Confirm inputs first
Before running any script, ask the lawyer for:
- Current case facts in natural language. Let the lawyer describe the current dispute, claims, defenses, evidence, and the point that needs verification directly in WorkBuddy. Do not require a current-case Word file in the default flow.
- Cases directory.
- Output directory.
- One primary research question.
- One target position to test. Define "support" and "oppose" relative to this sentence.
- Zero or more topic questions. There is no upper limit — the lawyer may supply any number of research angles. Each additional question must be answered with case-specific analysis and quotes in every case result.
Do not infer the target position from party identity. If the inputs are complete, do not delay execution with extra confirmations.
Non-negotiable batch rule
Recursively read every .doc, .docx, and .txt file individually. Never sample, stop after the first N files, merge files, or infer content from filenames. Preserve one work item and one case card per supported file.
WorkBuddy workflow
- Prepare all files, passing the confirmed question inputs:
python scripts/run_pipeline.py --case-text "<current case facts>" --cases-dir <cases-dir> --output <output-dir> --query "<primary question>" --position "<target position>" --subquery "<optional question>" --stage prepare
- Open
processing_manifest.json. Verifysupported_file_countequals the number ofcase_work_items. - Read
work_items/current_case.txtin full and createmodel_results/current_case.jsonusing model-protocol.md (references/model-protocol.md). - Iterate through every
case_work_itemin manifest order. For each item:
- Read its complete text_path. - Compare it with the current case, primary question, target position, and subquestions. - Create exactly one model_results/cases/<source_id>.json using the protocol. - Copy exact court passages from that case text. Do not paraphrase quotations. Provide as many verbatim quotes as needed to ground every finding.
- After every case result exists, create
model_results/synthesis.json. For every lawyer question, provide a complete cross-case answer with a direct conclusion, legal basis found in the judgments, shared judicial views, typical exceptions, evidentiary boundaries, and supporting case IDs. Group cases by their structured primary position; do not reclassify them in synthesis. - Finalize in strict formal mode:
python scripts/run_pipeline.py --case-text "<current case facts>" --cases-dir <cases-dir> --output <output-dir> --query "<primary question>" --position "<target position>" --subquery "<optional question>" --stage finalize --model-results-dir <output-dir>/model_results
- If finalization reports missing fields, invalid quotes, missing cases, or invalid synthesis references, fix only the listed model JSON files and rerun. Never bypass strict validation for a formal report. If a required model result is missing, the pipeline must fail instead of generating placeholder conclusions.
- Return the five core outputs plus the manifest:
current_case_analysis.jsoncase_cards.jsonsimilar_cases.jsonlegal_strategy_dashboard.htmllegal_strategy_report.docxprocessing_manifest.json
- In a live demo, the preferred visible behavior is:
- One concise intake question if inputs are missing. - Then direct execution. - Then concise reporting of outputs or blocking errors. - Never expose internal fallback ideas, placeholder strategies, or long methodology speeches to the end user unless asked.
Analysis standard
For each case, state:
- Court, case number, year, judgment result, and core holding.
- Primary position:
support,oppose,distinguish, ornot_addressed. - Relevance:
high,medium, orlow; keep numeric score in JSON only. - Specific similarities and differences. Each item must show the current-case point, precedent point, source quote, and impact on transferability.
- All material evidence mentioned in the judgment. For every evidence item, extract: submitting party, purpose offered, court position (accepted/rejected/partially_accepted/unclear), court reason, and exact source quote. Never skip evidence items mentioned in the judgment. Use
unclearwhen the judgment does not state an acceptance decision. - Concrete favorable insights and adverse risks tied to the case facts and reasoning.
- Answers to every optional subquestion with supporting quotes.
Use 未识别 or 待人工核对 instead of invention. Distinguish allegations, facts found, and court reasoning.
Reports
Show all successfully parsed cases in both HTML and Word. Both are internal legal research drafts — completeness takes priority; do not truncate content to fit a page limit. Use a two-layer structure:
Layer 1 — Topic horizontal matrix: For every lawyer question (primary + all subquestions), compare all courts' answers side by side. Lead with a substantive cross-case conclusion, then legal basis, shared judicial views, and typical exceptions. Follow with a matrix table showing each case's position, answer, and source quote.
Layer 2 — Per-case full draft: For every case, display the complete record: facts (party claims, defenses, court-found facts), dispute focus, court viewpoint and reasoning, all evidence findings (table of submitting party / purpose / court position / reason / source quote), exact quotations, similarities, differences, favorable insights, adverse risks, and subquestion responses. Include the court in every summary and detail section. Generate trends, evidence suggestions, and strategy only from synthesis.json; never use domain-specific hardcoded prose.
Formal-only rule
This skill is formal-only for the competition build. Never generate placeholder conclusions, placeholder evidence findings, or placeholder synthesis text. If WorkBuddy has not produced the required per-case model JSON files, stop and report the missing artifacts instead of fabricating a report.
When reporting a block, use short production-style wording such as:
缺少 current_case.json,已停止生成正式报告。缺少 3 份类案分析结果,已停止生成正式报告。原文校验未通过,已停止生成正式报告。
Do not use wording such as 演示模式、占位、fallback、流程验证.
Environment
- Require Python 3.9+,
python-docx, local file read, and code execution. .doc优先使用 macOStextutil预转.txt;若失败再尝试 LibreOffice/soffice。两者都不可用时,应提示先手动预转为.txt/.docx。- Do not require network for the local pipeline; WorkBuddy model availability follows platform configuration.
- Do not process PDF, OCR, CSV, XLSX, or vector databases in this version.
--case-fileremains only as a legacy compatibility path; the competition flow should use--case-text.
For competition-facing wording, read competition-spec.md (references/competition-spec.md).
适用场景
分析本地判决中法院对某类合同解除条件的裁判路径。
围绕举证责任争点生成逐案卡片和庭前综合报告。
输入材料
- 已脱敏的业务材料
- 案件或项目背景说明
- 律师整理的事实摘要
- 需要重点核验的问题清单
输出结果
将输入材料整理为便于复核的条目。
标记需要律师人工确认的信息。
提示使用中需要谨慎处理的内容。
使用说明
- 1
提供本案事实、主检索问题、待验证观点和本地类案目录。
- 2
检查处理清单,确认所有支持格式文件均已逐份读取。
- 3
核验裁判原文、来源文件及综合报告中的支持、否定和区分结论。
使用步骤
- 01
下载并解压 Skill 文件。
- 02
导入支持 Skill 的 AI 工具。
- 03
上传已脱敏的业务材料或粘贴文本。
- 04
运行 Skill 并检查结构化输出。
- 05
由律师复核事实、期限和法律依据。
注意事项
- 涉及客户、案件、身份、财务、医疗或商业秘密的材料,应先脱敏,并优先在受控的本地环境中处理。
- Skill 输出仅作为律师办案辅助;事实、证据、法律依据、期限、金额及对外文书必须由执业律师复核。
版本记录
首届深圳法律 AI Skills 创新应用大赛入围提交版本。
