Skill 简介
将律师办理民商事诉讼和仲裁案件的关键动作拆分为可执行节点,围绕材料、请求权基础、法源、证据、文书与流程形成四包分离和多轮质量检查。支持离线基础、法源核验和完整交付等模式,适合复杂材料、团队协作和诉讼立案全流程管理。
SKILL.md 在线预览
当前展示安装包中的核心说明文档,共 1425 行;预览内容仅做在线阅读,原始文件以 ZIP 安装包为准。
Lawyer Case Workflow
Overview
Use this skill to turn a folder of client-provided civil or commercial case materials into structured lawyer work products. The workflow follows Chen Xuanlin's five-layer litigation case handling model and reuses a local template library.
Path Configuration
This skill uses two configurable paths. Set them at the start of a session:
- TEMPLATE_ROOT: the local template library directory. Default:
~/Desktop/GPT/05_办案模板库. Override by setting theLAWYER_TEMPLATE_ROOTenvironment variable or telling the agent the path. - OUTPUT_ROOT: the base directory for generated files. Default:
~/Desktop/GPT. Override by setting theLAWYER_OUTPUT_ROOTenvironment variable or telling the agent the path.
When the skill runs, it resolves these paths in order: environment variable → user-provided path → default. All paths in references/template-index.md are relative to TEMPLATE_ROOT.
Save all generated files under OUTPUT_ROOT, preferably in a case-specific output folder.
Competition-grade mode: when the user asks for a contest-ready workflow, first-place optimization, repeatable demo, source-backed review, or full-package delivery, run the work as a source-verified loop workflow: material scan -> legal-source verification -> internal gates -> four-package drafting -> deterministic final checks -> loop review log.
This is a general civil/commercial litigation/arbitration workflow skill. It must not default to private lending merely because a prior case involved a loan. For every new matter, first identify the dispute category, claim basis, procedural posture, and evidence structure, then select the appropriate document package. Apply it to disputes including but not limited to:
- private lending, financial lending, guarantee, factoring, and debt recovery;
- sales, service, lease, contract termination, payment recovery, and damages;
- construction, renovation, property service, property damage, water leakage, and repair-cost disputes;
- tort, personal/property damage, unjust enrichment, and restitution;
- partnership, investment cooperation, equity transfer, shareholder disputes, company-control disputes, and profit distribution;
- labor/personnel disputes when civil-litigation style analysis or filing materials are needed;
- enforcement, preservation, investigation order, arbitration, and post-judgment recovery work.
Before Drafting
- Inspect the user-provided case folder and list available materials by type: contracts, chat records, payment records, identity documents, photos, audio transcripts, litigation documents, prior correspondence, and client notes.
- Identify the case type, parties, target court or forum, claim amount, current stage, urgent deadlines, and missing materials.
- Read
references/template-index.mdbefore choosing templates. - If the output includes litigation strategy, read
references/litigation-strategy-standard.md. - If the output includes statutes, judicial interpretations, local rules, legal research, or source-backed conclusions, read
references/legal-source-verification.mdbefore drafting. - If the output is a complete package, filing package, contest demo, or final delivery, read
references/internal-gates.mdandreferences/loop-review-protocol.md. - If facts are incomplete, draft with clearly marked placeholders instead of inventing facts.
- For the first-layer engagement package, use the local Guangdong Zhiheng template files as the document bases. Do not rewrite the contract, authorization letter, or firm letter from scratch.
Universal Civil/Commercial Intake Triage
Before deciding outputs, classify the case along these axes and let the classification drive the documents:
- Case posture: plaintiff/claimant, defendant/respondent, third party, preservation-only, enforcement, settlement, pre-litigation negotiation, appeal/retrial, or arbitration.
- Dispute type: contract payment, contract termination, lending/debt, property damage, tort damages, labor, company/equity, partnership/investment, guarantee/security, enforcement, or other.
- Relief goal: payment, return of property, delivery/performance, termination/rescission, confirmation of rights, damages, injunction/cessation, removal of obstruction, preservation, investigation, enforcement pressure, negotiation leverage, or defense.
- Forum and procedure: court litigation, arbitration, labor arbitration, enforcement, pre-litigation preservation, litigation preservation, small claims, summary procedure, ordinary procedure, or special proceeding.
- Evidence pattern: written contract, oral agreement, electronic chat, payment flow, invoice/delivery/receipt, appraisal, photos/videos, witness, corporate records, official registration, court documents, or enforcement clues.
Then choose the output package:
- Filing-first: when the client needs to sue or apply for preservation immediately.
- Strategy-first: when jurisdiction, defendant selection, claim basis, or evidence sufficiency is uncertain.
- Defense-first: when representing a defendant or respondent; generate defense strategy, evidence rebuttal, jurisdiction objection, answer outline, and settlement plan before a complaint.
- Evidence-first: when materials are chaotic; first produce evidence inventory, page-numbered bundle, evidence gap list, and fact timeline.
- Client-conversion/engagement-first: when the user needs a proposal, quotation, or signing package.
- Source-verified review: when legal basis, local rules, similar-case rules, or contest-grade credibility matters; first build a source plan, run PKULaw or other authoritative retrieval when available, and create a source-audit table.
Do not force every case into a plaintiff filing package. If the user says "we represent defendant", "被告", "答辩", "反诉", or "抗辩", adapt the workflow to defense outputs.
/plan Planning Mode
If the user types /plan, asks for a plan, or appears to be setting up a complex case workflow before drafting, produce a concrete办案计划 first instead of immediately generating final documents.
The /plan output must include:
- 案件识别: case type, posture, client side, opponent, forum/court, current stage, urgent deadlines.
- 材料盘点计划: what folders/files to inspect and how to classify them.
- 证据材料计划: proposed
证据一,证据二,证据三structure, expected proof purpose, whether PDF/image/Word files can be merged, and what needs original-carrier verification. - 法律与策略计划: requested relief, claim basis, jurisdiction, limitation period, burden of proof, likely defenses, preservation/enforcement pressure.
- 法源与审查计划: whether PKULaw/source URLs are needed, which legal issues require source verification, and which loop/gate checks will run.
- 输出文件清单: exact documents to generate, grouped by filing, evidence, strategy, process management, and client communication.
- 补证清单预判: likely missing materials and who should provide them.
- 执行顺序: which work should be done first, second, third; identify blockers such as jurisdiction or missing identity materials.
After giving the plan, if the user asks to proceed or the request already authorizes execution, continue to produce the planned documents.
Non-Negotiable Case Handling Rules
Use these rules whenever generating litigation filing, strategy, or process-management outputs.
Cause-of-action and claim-basis first
For every civil/commercial matter, start from the legal relationship and requested relief, not from a fixed private-lending template.
- Identify the likely cause of action and any alternative cause of action.
- Identify the claim basis: contract claim, tort claim, restitution/unjust enrichment, property right claim, company-law claim, labor/personnel claim, guarantee/security claim, enforcement claim, arbitration claim, or mixed basis.
- Break the claim basis into legal elements and burden of proof.
- Map each element to facts, evidence, and missing materials.
- Only after this mapping, draft the complaint, arbitration application, defense, evidence catalog, preservation application, strategy report, or client communication file.
Do not mechanically reuse loan-case language such as principal, repayment, lending relationship, LPR, or creditor/debtor unless the identified dispute type actually requires it.
Complete package by default
When a user asks for filing materials, "立案材料", "一套材料", "完整办案材料", or similar language, do not stop at complaint/evidence/preservation documents. Unless the user clearly limits the scope, generate an integrated package covering:
- Filing submission package: complaint, evidence catalog, evidence bundle, subject materials list, filing checklist, service-address confirmation, preservation application, property clues, and pending submission notes.
- Process-management package: case timeline, case facts memo, materials review log, evidence gap list, pending fact list, task tracker, and client-facing progress report.
- Litigation-strategy package: litigation strategy report, dispute focus list, claim-basis table, evidence-to-elements table, defense prediction, countermeasure plan, risk matrix, and next action list.
- If the user mentions a court or region, adapt the checklist and document names to that court or region and clearly flag any jurisdiction or local-filing issue.
Mandatory output separation
For any full case package, filing package, or multi-document output, separate work products by use case before drafting. Do not mix court-facing materials with internal lawyer analysis.
Default folder structure:
01_法院提交包
- Only court-facing filing documents: complaint/application, evidence catalog, evidence bundle, filing checklist, subject materials, authorization, firm letter, service-address documents, preservation/investigation documents. - Use restrained black-and-white court style. Do not include risk matrices, judge-negative-review language, red flags, or internal strategy comments.
02_内部审查包
- Lawyer-only quality-control documents: judge-perspective nine-step review, complaint/evidence final review, facts-law-evidence-claims matrix, element proof table, risk matrix, opponent defense prediction, evidence gaps, pending facts. - May use tables, risk grades, red/problem markings, and candid negative review.
03_策略研究包
- Legal research report, similar-case report, litigation strategy report, preservation/enforcement strategy, negotiation plan, trial outline, cross-examination memo.
04_流程管理包
- Case timeline, facts memo, material receiving log, task tracker, litigation calendar, client progress report, communication notes.
If the user only asks for one layer, create only that layer. If the user asks for "完整", "全套", "不要偷懒", or authorizes the complete workflow, create all applicable folders. File names must clearly show whether a document is 法院提交格式, 内部审查, 策略分析, or 流程管理.
Execution gate before drafting
Before generating multiple files, first produce an execution plan unless the user explicitly says to execute directly. The plan must include:
本次拟生成文件清单grouped by01_法院提交包,02_内部审查包,03_策略研究包, and04_流程管理包.本次不会生成的文件with reasons, such as no asset clues, no preservation request, no legal research requested, or missing templates.需要用户确认的关键事项: court/forum, client side, preservation, claim amount, whether to use Shenzhen/local format, whether to generate final or pending-submission drafts.重大风险提示: cause of action uncertainty, jurisdiction risk, amount inconsistency, party identity gaps, evidence insufficiency, electronic evidence authenticity, limitation period, arbitration/labor prerequisite.执行顺序: scan materials, choose templates, draft court package, build evidence bundle, draft internal review, draft strategy/process files, run final checks.
If the user says "直接执行", proceed without waiting, but still create an internal plan and stop only for blockers that make drafting unsafe, such as impossible court selection, missing core party identity for a filing version, or contradictory claim amount.
Source-verified loop workflow
Use this enhanced workflow when the user requests contest optimization, first-place quality, source-backed analysis, "loop审查", "北大法宝", "源地址审查", or internal quality control.
- Run material triage and determine whether the matter should be filing-first, strategy-first, defense-first, evidence-first, engagement-first, or source-verified review.
- Build a legal-source plan before writing legal conclusions. Use
mcp__pkulaw.search_articleandmcp__pkulaw.get_articlewhen available; otherwise use official/source URLs and mark unavailable retrievals. - Create or update
法源与引用核验表with source title, article number, original excerpt, timeliness, issuing authority, source URL, retrieval date, issue mapped, and whether it supports the conclusion. - Apply the four internal gates in
references/internal-gates.md: material gate, legal gate, evidence gate, delivery gate. - Run the three-pass loop in
references/loop-review-protocol.md: structure review, legal/source review, submission review. - Keep the court-facing package clean. Source doubts, judge-negative review, risk grades, and internal corrections belong in
02_内部审查包, not in01_法院提交包.
Complaint and claims must be professional
Every complaint must have clear, court-ready, enforceable claims. Do not write overly simple claims such as only "判令被告还款", "判令被告赔偿", or "判令被告承担责任".
Before drafting claims:
- Identify all potentially available forms of relief for the specific dispute: payment, return, delivery, performance, termination/rescission, confirmation, damages, repair/restoration, removal of obstruction, apology/cessation where applicable, registration change, accounting, access to records, preservation, litigation costs, attorney fees, appraisal fees, insurance premiums, and other recoverable items.
- State each claim separately, with the responsible party, beneficiary, amount or act, calculation basis, performance deadline, and continuing calculation rule where applicable.
- For monetary claims, distinguish principal/price/refund/rent/wages/investment/payment balance/damages/repair cost/appraisal fee/late-payment loss/interest/liquidated damages. Do not collapse different money items into a single vague number.
- If interest, late-payment loss, capital occupation loss, or liquidated damages are requested, produce a calculation note or table. Use the contract rate or statutory basis where valid; if no rate or uncertain basis exists, identify the legally arguable fallback and mark risk. Use LPR only when it fits the claim type and legal basis.
- Include a temporary total as of the drafting date when useful, and state whether continuing losses, interest, rent, occupation fee, or liquidated damages are calculated to actual performance/payment.
- Avoid unsupported claims. If attorney fees, preservation insurance fees, appraisal fees, realization-of-rights costs, or similar expenses are claimed, confirm a contractual/legal basis or mark
[待补充:费用依据及票据]. - The facts and reasons must explain the claim formula and legal elements, not merely repeat evidence names.
Adapt claims to the dispute type:
- Payment/debt/lending: principal, interest, overdue interest or capital occupation loss, repayment already credited, continuing interest, costs.
- Sales/service/contract payment: contract price, delivered/performed work, unpaid amount, late-payment loss, invoices/acceptance/delivery, continued performance or termination.
- Contract termination/rescission: termination/rescission request, return of property, refund, damages, possession return, invoice handling, post-termination obligations.
- Damages/tort/property damage: liability confirmation if needed, repair cost, appraisal fee, mitigation cost, replacement cost, loss of use, interest, emotional/personal injury items only when legally applicable.
- Lease/property: rent, occupation fee, management fee, liquidated damages, return of premises, restoration, deposit, utilities, removal of obstruction.
- Company/equity/shareholder: confirmation of shareholder/equity rights, registration change, equity transfer price, capital contribution, profit distribution, access to books, resolution validity, company cooperation obligations.
- Partnership/investment cooperation: settlement/accounting, return of investment, profit/loss distribution, dissolution/liquidation, fiduciary or contractual liability.
- Labor/personnel: wages, overtime, severance/compensation, social insurance-related claims where procedurally proper, reinstatement or confirmation, arbitration prerequisites.
- Defense/defendant work: do not write plaintiff-style claims unless counterclaiming. Generate answer points, jurisdiction objection, limitation defense, performance/setoff/payment defense, evidence rebuttal, counterclaim feasibility, and settlement range.
Evidence package and page numbering
When filing materials include evidence:
- Organize evidence as
证据一,证据二,证据三rather than loose folders only. - Each evidence item must include evidence name, source/form, proof purpose, page range, and any authenticity/original-carrier note.
- If generating a PDF evidence bundle, add continuous page numbers and make the evidence catalog match the actual PDF page ranges.
- For electronic evidence such as WeChat records, screenshots, payment vouchers, and electronic signatures, flag original-carrier requirements: original phone, platform export, electronic-signature verification file, timestamp, notarization, or other preservation method as needed.
- If payment records are numerous, create a payment/repayment extraction table and a balance-calculation note. Do not rely only on scattered vouchers.
Evidence materials are a standalone work product, not merely an attachment to the complaint. For every litigation/arbitration filing package, generate or plan these evidence outputs unless the user expressly excludes them:
证据材料整理方案.docx
- proposed evidence grouping; - proof purpose for each group; - evidence source folder; - original/copy/electronic-data status; - merging/page-numbering feasibility; - authenticity and supplementation issues.
证据目录及说明_已编页码版.docx证据材料汇编_证据一至证据N_已编页码.pdfwhen files can be merged.证据补充清单.docx电子证据原始载体及核验清单.docxwhen evidence includes WeChat, Alipay, WeCom, email, electronic signatures, audio/video, platform exports, or screenshots.
Evidence grouping should normally follow the adjudication logic:
- subject qualification and service information;
- contract/legal relationship formation;
- performance/delivery/payment/contribution;
- breach/tort/damage/default facts;
- amount calculation and loss basis;
- notice, demand, negotiation, limitation interruption;
- preservation/property clues;
- other supporting or rebuttal evidence.
For defendant-side work, group evidence by defenses instead: jurisdiction, subject objection, contract invalidity/non-formation, performance, payment, setoff, limitation period, causation, damage amount, and procedural objections.
Jurisdiction and local filing standards
Always perform a jurisdiction screen before finalizing filing documents:
- Identify contractual jurisdiction clauses, defendant domicile, plaintiff domicile where relevant, contract performance place, tort place, property location, and any local connection.
- If the user specifies Shenzhen, Guangzhou, or another court, verify whether the facts support that court. If not, mark the issue as a high-risk filing obstacle and list the exact missing jurisdiction evidence.
- Do not silently write a court name that conflicts with the facts. Use
[待确认:有管辖权法院]or state the jurisdiction risk in the filing checklist and strategy report.
Local court format routing
When a user specifies a court, region, or filing platform, route the court-facing package to that local format. Never assume Shenzhen format for non-Shenzhen cases, and never write a Shenzhen court package without a Shenzhen jurisdiction screen.
Default local routing rules:
- Shenzhen court
- First generate a Shenzhen jurisdiction screen: defendant domicile/registration, contract performance place, tort place, property location, contractual jurisdiction, plaintiff domicile only when legally relevant, and any Shenzhen connection. - If Shenzhen jurisdiction is unsupported or uncertain, title court-facing documents as 深圳管辖待核实版 or use [待确认:有管辖权法院]; do not present them as final. - Court package must include 深圳法院立案材料提交说明_融合版.docx, 深圳法院立案材料清单及提交状态.docx, evidence catalog matching actual page ranges, service-address documents, and refund/account information if required by the court checklist.
- Guangzhou / Guangdong courts
- Apply the same jurisdiction screen and use Guangdong court filing checklist names where facts support the forum.
- Other courts
- Use the actual named court only if facts support jurisdiction. Otherwise keep court name pending and explain the issue in the filing checklist and internal review.
- Arbitration / labor arbitration
- Do not generate a court complaint package until the arbitration clause, arbitration institution, labor-arbitration prerequisite, or forum basis is checked.
Judge-perspective nine-step review
When the task asks for strategy, review, litigation quality control, or uses language such as "法官角度", "九步法", "审判要事", "不要偷懒", include a judge-perspective review using:
- 定主体
- 定请求
- 定案由
- 定管辖
- 定事实
- 定争点
- 定证据
- 定规则
- 定裁判/策略
For each step, state whether it is可行, partially可行, or problematic; identify the issue; explain the consequence; and give a补正/反制 plan. If the user requests visual warnings in a Word file, mark problem text in red.
Quality-control matrices
For any substantive civil/commercial strategy or filing package, include or internally complete these checks:
- Facts-to-law-to-evidence-to-claim matrix: each requested relief must map to facts, legal basis, evidence, and missing proof.
- Element proof table: for the main claim or defense, list each legal element, burden of proof, available evidence, proof strength, and gaps.
- Risk matrix: grade risks as high/medium/low and explain source, consequence, and mitigation.
- Opponent route prediction: strongest defenses or claims, not straw-man defenses.
- Procedural route check: jurisdiction, limitation period, arbitration/labor arbitration prerequisite, preservation timing, necessary parties, service risks, and enforcement feasibility.
- Client action list: what the client must supplement, what the lawyer must draft/search/file, and deadlines.
If these checks reveal that filing immediately is unsafe, say so directly and recommend a strategy-first or evidence-first path.
Mandatory final review for complaints and evidence catalogs
When generating a complaint, arbitration application, evidence catalog, or filing package, do not stop after drafting. Perform a mandatory final review and generate an internal checklist named like 起诉状及证据目录复核表.docx or include the same table in the filing submission note.
The final review must cover:
- Claim-basis review: each claim maps to a legal relationship, legal basis, fact basis, and evidence group.
- Claim completeness review: check whether principal, interest, penalty/liquidated damages, damages, return/restoration, performance, confirmation, preservation fee, litigation fee, attorney fee, appraisal fee, insurance premium, and other recoverable items are applicable. State why an item is included or excluded.
- Amount consistency review: principal, interest, repayment credits, damages, temporary total, preservation amount, and filing amount must match across complaint, preservation application, evidence catalog, calculation tables, and filing checklist.
- Enforceability review: each claim must be specific enough to enforce: who pays/performs, to whom, how much, what act, what deadline, what interest rate, what start/end date.
- Evidence-to-claim review: every claim must have supporting evidence; every core evidence item must have a proof purpose. Evidence catalog page ranges must match the evidence bundle.
- Judge-perspective negative review: identify whether a judge may question jurisdiction, subject qualification, cause of action, limitation period, claim clarity, interest/legal basis, necessary parties, electronic evidence authenticity, or proof sufficiency.
- Opponent defense reverse review: identify the strongest expected defense or procedural objection and whether the complaint/evidence package already neutralizes it.
- Formatting and filing review: court name, party names, ID numbers, addresses, phone numbers, cause of action, signature blocks, dates, service address confirmation, authorization documents, and placeholders must be checked.
The review result must be practical:
- mark each item as
通过,需补强, or高风险; - list exact fixes, not generic warnings;
- if a critical issue remains unresolved, state that the document is a pre-submission draft rather than final.
Never hide uncertainty by making the complaint look final. If key facts or evidence are missing, keep visible placeholders and list them in the review table.
Mandatory final delivery checks
Before final delivery of any filing package or complete package, run deterministic checks when the local environment supports them. Create 00_最终交付检查报告.docx or include the same results in a final delivery note.
Required checks:
- Run
scripts/quality_check_package.pyon the output package and review unresolved placeholders, inconsistent court names, PDF openability, and evidence catalog/bundle pairing. - Run
scripts/final_review_check.pyafter the complaint/application, evidence catalog, and filing package exist. - Verify evidence PDF page count and evidence catalog page ranges match.
- Verify the evidence bundle has continuous page numbers when a bundle is generated.
- Verify Word files contain real Word tables where tables are expected, not Markdown pipe-table text.
- Verify court-facing documents do not include internal-only risk language, strategy commentary, red-flag notes, or judge-review matrices.
- Verify internal review documents are not placed in
01_法院提交包. - Run
scripts/source_audit.pywhen legal research, statutes, judicial interpretations, local rules, similar cases, or source-backed claims are included. - Generate or include
loop_review_log.csvfor complete packages, contest demos, and source-verified workflows.
If a check cannot be run, state why and list the manual replacement check. If checks find unresolved critical issues, mark the package as 提交前待补版.
Case-type routing rules
After intake classification and before drafting, route the case to the correct issue checklist. Use these as minimum checks; adapt them to the facts.
- Sales / service / contract payment: formation, validity, performance, delivery/acceptance, price/fee calculation, invoice effect, reconciliation, payment condition, overdue loss, setoff, limitation period, jurisdiction.
- Private lending / debt: lending intent, payment delivery, borrower identity, third-party receipt authorization, repayments, interest agreement, maturity/call for repayment, limitation period, company/guarantor responsibility if any.
- Lease / property use: lease object, term, rent, deposit, delivery/return, occupation fee, utilities/management fees, restoration, termination notice, possession return, enforcement feasibility.
- Tort / property damage: duty of care, tort act, fault or presumption, causation, damage scope, appraisal/repair necessity, mitigation costs, responsible parties, insurance or property manager role.
- Construction / renovation: contract formation, project scope, completion/acceptance, settlement, defects, quality appraisal, repair cost, payment condition, contractor qualification where relevant.
- Company / equity / shareholder: shareholder qualification, contribution, register/filing records, articles of association, resolutions, company as necessary party, accounting/access to records, fiduciary duties, registration change.
- Partnership / investment cooperation: legal characterization, contribution proof, management authority, accounting/liquidation, profit/loss sharing, withdrawal/termination, entrusted management, fiduciary or contractual liability.
- Labor / personnel: arbitration prerequisite, employment relationship, wage base, working time, social insurance where procedurally proper, termination reason, claim periods, evidence burden.
- Enforcement / preservation: enforceable title or pending claim, asset clues, urgency/necessity, guarantee, forum, debtor property discovery, refusal-to-enforce or enforcement-objection risks.
Do not force the filing cause of action to match the folder name. If folder name, existing draft, and evidence point to different legal relationships, flag the conflict and choose the strongest route only after mapping facts, law, evidence, and claims.
Five Layers
1. Engagement Layer
Use when the task involves client intake, quotation, engagement, agency authority, or signing materials.
Typical outputs:
- Client intake summary
- Case facts preliminary summary
- Legal service proposal and quotation
- Engagement contract
- Authorization letter
- Supplementary materials list
Template guidance:
- The engagement layer is normally the first output layer. Generate it before timeline, case facts memo, strategy, or filing documents unless the user clearly asks otherwise.
- Prefer fixed-fee civil legal service contract for standard civil litigation.
- Use risk-fee contract only if the user clearly asks for contingency or risk agency.
- Use litigation authorization letter for court litigation.
- Use legal analysis and quotation proposal when the user wants conversion, pricing, or client-facing service plan.
- Strictly apply the original Guangdong Zhiheng templates in the template library for the legal service contract, authorization letter, and firm letter. Copy the original template as the base and only fill existing fields or necessary case-specific blanks.
- Preserve the template layout and firm branding. Use black-and-white style and FangSong size 4 when generating or adjusting first-layer files unless the original template requires otherwise.
- If court, client phone number, client address, ID number, second agent, lawyer phone number, defendant identity, or case amount is missing, do not silently omit it. Mark it as
[缺失,待补充]in the document when needed and list it in the engagement signing checklist. - If an identity document already exists, treat it as received. Only flag the different issue that still needs proof, for example whether a defendant is the owner, occupant, renovator, or actual responsible party for the relevant property.
2. Legal Research Layer
Use when the task requires statutes, regulations, local rules, judicial interpretations, similar cases, or裁判规则.
Typical outputs:
- Legal research report
- Similar-case search report
- Cause-of-action and claim-basis analysis
- Limitation period, jurisdiction, and burden-of-proof analysis
- Key legal-risk memo
Default output for this layer should be one integrated communication-ready report, not several fragmented documents, unless the user asks for separate files. Name it like 法律检索报告_融合沟通版.docx. It should be suitable both for lawyer team discussion and client communication.
When using external legal databases such as 北大法宝 MCP, cite retrieval source, document name, issuing authority, effective status, and date when available.
For source-backed work, use references/legal-source-verification.md. Prefer PKULaw retrieval for statutes, judicial interpretations, and authoritative legal rules when the connector is available. Each material legal conclusion must map to at least one verified source or be marked [法源待核验]. Do not cite statutes, local rules, or similar cases without a source title and source URL when source-backed mode is requested.
Legal research reports must use a formal law-firm style, preferably red-circle-firm style: conclusion first, clear hierarchy, detailed analysis, black-and-white formatting, and FangSong size 4 when creating Word files unless the user provides another firm template. Do not provide only a short summary.
Before writing the legal research report, always perform a case-specific research design:
- Identify the case type, such as property damage from water leakage, sales contract, private lending, equity transfer, property service contract, labor dispute, administrative inaction, criminal complaint, enforcement, or another specific category.
- Identify the litigation objective, such as compensation, contract termination, payment recovery, confirmation of rights, cessation of infringement, removal of obstruction, performance, defense, revocation of administrative act, or pressure for settlement.
- Design tailored research directions for that case type and objective. Do not mechanically apply the same search topics to every case.
- Make the research serve litigation strategy: whom to sue, whether to add parties, whether to send a lawyer letter first, whether to apply for appraisal or investigation order, which claims are strong or weak, and which evidence gaps block filing.
For common civil/commercial disputes, tailor the research direction:
- Contract payment: contract formation, performance/acceptance, payment conditions, late-payment loss, invoice effect, setoff, limitation period.
- Contract termination/rescission: termination right source, notice validity, restoration after termination, damages, continued performance feasibility.
- Property damage/tort: duty of care, causation, fault/presumption, appraisal, repair necessity, loss scope, responsible parties.
- Company/equity: shareholder qualification, register effect, capital contribution, resolution validity, fiduciary duties, appraisal/accounting, company as party.
- Partnership/investment: legal characterization, accounting/liquidation, profit/loss sharing, entrusted management, evidence of contribution and withdrawal.
- Labor/personnel: arbitration prerequisite, employment relationship, wage/overtime proof, termination legality, compensation standards.
- Enforcement/preservation: asset clues, preservation necessity,担保, enforcement forum, debtor property discovery, refusal-to-enforce risks.
Default legal research report structure:
- 报告用途
- 先给结论
- 本案检索方向
- 检索来源
- 请求权基础
- 举证责任
- 争议焦点
- 程序路径
- 后续补证清单
- 律师团队建议
Within "本案检索方向", keep the four-layer analysis: - 第一层:确定请求权基础。 - 第二层:确定法律依据和举证责任。 - 第三层:确定本案争议焦点。 - 第四层:确定管辖、程序路径和后续待补充举证。
Use tables, but every table should have plain-language explanation before or after it. Avoid producing table-only reports. The writing style should be formal enough for a law firm work product but understandable to a client.
Only include a dedicated "赔偿项目" section when the case type requires damages analysis, such as tort, contract damages, construction repair costs, personal injury, property damage, or enforcement recovery. For cases that do not require damages analysis, omit that section and focus on claim basis, legal elements, disputed issues, jurisdiction, procedure, and evidence.
If the first-layer engagement package lacks the target court, client phone number, or other basic information, repeat the missing information in the legal research report's risk or next-step section so downstream filing documents do not silently inherit omissions.
3. Litigation Filing Layer
Use when the task involves filing or court submission.
Typical outputs:
- Complaint or arbitration application
- Evidence catalog and evidence explanation
- A4 evidence material bundle
- Subject qualification materials checklist
- Filing material checklist
- Preservation application or investigation order request if needed
Evidence catalogs should follow the simple official format in the template library unless the user requests a more detailed court version.
Court-facing filing documents must use court-submission formatting, not internal review formatting:
- Complaint/application
- Use the local template library or the user's existing draft as the style base when available. - Use a restrained black-and-white court format; no colored risk tables, no internal notes, no strategy commentary. - Use formal headings such as 民事起诉状, 原告, 被告, 诉讼请求, 事实与理由, 此致, court name, signature/date. - Keep placeholders visible for missing party identity, service address, phone number, court name, amount basis, or fee evidence.
- Evidence catalog
- Use the official simple five-column style where suitable: 序号, 证据名称, 证明内容, 页码, 备注. - The catalog must match the actual evidence PDF page ranges. - Do not put internal risk analysis into the court-facing evidence catalog. Put authenticity/original-carrier notes in 备注 only in court-appropriate language.
- Filing checklist / submission note
- Use court-facing checklist language: submitted/not submitted, original/copy, number of copies, pending item. - Do not use internal terms such as 高风险, 抗辩路径, 法官否定审查 in court-facing files.
- Evidence bundle
- Merge PDFs/images in evidence order where possible. - Add continuous page numbers. - Verify page count and catalog consistency before final delivery.
- Internal review separation
- Put nine-step review, risk matrix, claim-basis matrix, defense prediction, and final-review tables only in 02_内部审查包, unless the user explicitly asks for a client-facing strategy report.
For Shenzhen court filing packages, generate an integrated filing package instead of a scattered review memo set. Default outputs:
深圳法院立案材料提交说明_融合版.docx
- Merge filing readiness review, missing material list, evidence review summary, and next-step submission notes. - Must include a Shenzhen jurisdiction screen. If Shenzhen jurisdiction is unsupported, state the exact missing connection and do not present the package as final.
民事起诉状_提交前待补版.docx
- Claims must be professional and itemized: principal, interest, continuing interest, costs, preservation fee, attorney fee if supported, and total temporary amount. - Include an interest calculation explanation when interest is claimed.
送达地址确认书_自然人_待补版.docxor entity version where applicable.证据目录及说明_已编页码版.docx
- Use 证据一, 证据二, 证据三 format and match actual page ranges.
深圳法院立案材料清单及提交状态.docx证据材料汇编_证据一至证据N_已编页码.pdfwhen evidence PDFs/images are available and can be merged.证据补充清单_深圳立案版.docx财产保全申请书.docxand财产线索清单.docxif preservation is requested or there are asset clues.诉讼费退费账户/收款账号待补清单.docxor include the same section in the filing checklist when the court requires it.起诉状及证据目录复核表.docx
- Mandatory for filing packages. Check claim basis, claim completeness, amount consistency, enforceability, evidence-to-claim mapping, judge-perspective risks, opponent defenses, and filing-format issues.
For Shenzhen packages, place court-facing files in 01_法院提交包 and internal review files in 02_内部审查包. If the user only wants a court package, still generate the mandatory internal review checklist in 02_内部审查包 unless expressly excluded.
If required court, phone number, service address, party identity relation, property ownership, or other core filing information is missing, mark it clearly as pending and state that the document is a pre-submission draft, not final filing version.
4. Litigation Strategy Layer
Use when the task requires red-circle-firm level legal analysis, case route planning, risk control, negotiation positioning, or trial preparation.
Typical outputs:
- Litigation strategy analysis
- Case timeline
- Dispute focus list
- Claim-basis and elements table
- Evidence-to-elements table
- Opponent defense prediction
- Countermeasure plan
- Trial questioning outline
- Cross-examination opinions
- Settlement plan and risk matrix
Read references/litigation-strategy-standard.md before producing this layer.
Default litigation strategy and defense documents should be written in a red-circle-firm litigation work-product style: formal legal Chinese, conclusion first, legal issue framing, evidence-driven risk assessment, and no casual or AI-like phrasing. Prefer paragraph analysis plus necessary tables. Avoid slogan-like expressions. Default outputs:
诉讼策略分析报告_红圈所风格版.docx抗辩预判与反制意见_红圈所风格版.docx法官视角_案件审判要事九步法审查报告_标红问题版.docxwhen the user asks for judge-perspective review, case quality control, or full strategy review.- Optional risk matrix, negotiation plan, trial outline, or cross-examination memo only if needed by the case or requested by the user.
The strategy report must not be generic. It must address:
- whether to sue now or first supplement evidence;
- whether the chosen court has jurisdiction;
- whether each claim is supportable;
- which evidence proves each legal element;
- likely defenses and how to neutralize them;
- settlement, preservation, and enforcement pressure.
For non-lending civil/commercial cases, adapt the strategy report to the actual legal relationship. Examples:
- Contract cases must analyze formation, validity, performance, breach, termination, damages, setoff, and limitation period.
- Tort/property damage cases must analyze duty, fault, causation, damage amount, appraisal, and responsible parties.
- Company/equity cases must analyze party structure, shareholder status, corporate records, internal resolutions, registration effect, and whether the company must be added as a party.
- Labor cases must analyze arbitration prerequisite, employment relationship, termination reason, wage base, working time evidence, and claim periods.
- Defendant-side cases must lead with defense route, evidence rebuttal, burden allocation, procedural objections, counterclaim feasibility, and settlement exposure.
5. Process Management and Case Communication Layer
Use when the task involves process files, fact organization, client updates, meeting notes, court communication, opposing-counsel communication, or staged reports. This layer is the case management layer for documents that help lawyers understand, advance, and communicate the case.
Typical outputs:
- Case facts memo
- Case timeline
- Materials receiving and review log
- Evidence gap list
- Pending fact verification list
- Work task tracker
- Litigation calendar and deadline list
- Client communication memo
- Case progress report
- Pending confirmation list
- Court communication record
- Opposing counsel communication record
- WeChat/email reply draft
- Stage report
- Closing report
Read references/process-communication-templates.md before producing this layer. The current template library has no dedicated files in this layer, so use the fixed memo/table templates in that reference unless the user later adds templates.
Default output for this layer should be two integrated documents, not many separate files:
案件时间轴及案情梳理表.docx
- Include case basic information, case timeline, fact summary, existing material overview, and key pending facts.
案件过程管理及案件汇报.docx
- Include task tracker, evidence gap tracker, litigation schedule, current risks, client communication summary, stage progress report, and next steps.
证据补充清单.docx
- If not already included in the filing layer, create a separate supplement list with priority, missing material, specific content, purpose, owner, and deadline.
Only split into more files if the user requests separate process documents or the case is complex enough that the two-file package becomes unwieldy.
Output Rules
- Keep document titles formal and court/client ready.
- Use Chinese legal drafting style unless the user requests otherwise.
- For client-facing documents, state conclusion first, then facts, legal analysis, risks, and action plan.
- For court-facing documents, keep tone restrained and evidence-driven.
- Do not overstate certainty. Use risk grades when facts or evidence are incomplete.
- Keep placeholders visible, for example:
[待补充:被告统一社会信用代码]. - If generating multiple files, create a case-specific folder named like
案件名称_办案输出_YYYYMMDD. - Always separate output folders by use case for multi-file work:
01_法院提交包,02_内部审查包,03_策略研究包,04_流程管理包. - Do not use Markdown pipe-table text in generated Word files. If a Word document needs a table, create a real Word table.
- Court-facing Word files should use black-and-white court style and the local template library. Internal review Word files may use table-heavy risk-control style.
- When the user has provided an existing style template or prior draft, preserve its court-facing layout unless it conflicts with legal sufficiency or local filing requirements.
- For every final package, include or generate
00_最终交付检查报告.docxunless the user requests only a single quick draft. - For source-backed outputs, include a source-audit table and do not present unverified legal rules as confirmed-current law.
Scripts
Use scripts for deterministic mechanical work instead of rewriting extraction/merging/calculation code each time.
Path resolution: Scripts are located in the scripts/ subdirectory of this skill. When running, use the skill directory as the base path. For example, if this skill is installed at ~/.workbuddy/skills/lawyer-case-workflow/, run scripts as:
python3 ~/.workbuddy/skills/lawyer-case-workflow/scripts/scan_case_folder.py /path/to/case --out-csv ...
Dependencies: Scripts require PyMuPDF and python-docx. Install with:
pip install -r scripts/requirements.txt
scripts/extract_payment_vouchers.py
Use when a case contains many WeChat, Alipay, bank, or platform payment PDF vouchers.
Purpose:
- scan PDFs under a case folder;
- extract payer, payee, amount, payment time, serial number, platform, and status;
- classify direction when creditor/debtor names are provided;
- output CSV for payment/repayment review and balance calculation.
Example:
python3 scripts/extract_payment_vouchers.py /path/to/case --out /path/to/output/payment_extract.csv --creditor 谭嘉雯 --debtor 陈彪 --dedupe
scripts/calculate_interest.py
Use when drafting professional claims, preservation amount, settlement amount, or a calculation table.
Purpose:
- calculate simple interest by principal, start date, end date, and annual rate;
- optionally handle repayments from a CSV with
date,amount; - output JSON and/or CSV calculation tables.
Example:
python3 scripts/calculate_interest.py --principal 295200 --start 2025-04-20 --end 2026-05-23 --annual-rate 0.031 --out-csv /path/to/interest.csv
scripts/merge_evidence_bundle.py
Use when evidence files are already grouped into 证据一_*, 证据二_*, 证据三_* folders.
Purpose:
- merge PDFs and images into one page-numbered evidence bundle;
- create cover pages for each evidence group;
- generate a catalog CSV with actual page ranges.
Example:
python3 scripts/merge_evidence_bundle.py /path/to/evidence_root --out-pdf /path/to/证据材料汇编.pdf --out-catalog /path/to/证据目录页码.csv --case-name 案件名称
When scripts produce CSV output, use the CSV to draft Word evidence catalogs, claim calculations, and attorney review notes.
scripts/scan_case_folder.py
Use at the beginning of /plan, evidence-first workflows, or when the case folder is large/chaotic.
Purpose:
- scan all files under the case folder;
- classify materials by filename/path keywords;
- identify likely duplicates by md5;
- output a CSV inventory and a Markdown planning report.
Example:
python3 scripts/scan_case_folder.py /path/to/case --out-csv /path/to/material_inventory.csv --out-md /path/to/material_scan_report.md
scripts/extract_docx_media.py
Use when WeChat/chat-record DOCX files contain embedded screenshots or images.
Purpose:
- extract embedded media from DOCX files;
- create a CSV index of extracted images;
- allow extracted images to be copied into evidence folders before running
merge_evidence_bundle.py.
Example:
python3 scripts/extract_docx_media.py /path/to/chat_records --out-dir /path/to/extracted_media --out-csv /path/to/docx_media_index.csv
scripts/quality_check_package.py
Use before final delivery of any generated filing package.
Purpose:
- detect unresolved placeholders such as
[待补充]and[缺失]; - detect inconsistent court names across Word documents;
- verify PDFs can be opened;
- warn when evidence catalog and evidence bundle are not both present.
Example:
python3 scripts/quality_check_package.py /path/to/output_package --out-csv /path/to/quality_check.csv
scripts/final_review_check.py
Use after generating a complaint/application, evidence catalog, and filing package. This is the script companion to the mandatory final review rule.
Purpose:
- create a CSV checklist for complaint/application and evidence-catalog review;
- detect unresolved placeholders;
- extract money amounts for consistency review;
- check whether complaint/application, evidence catalog, and evidence bundle exist;
- remind the lawyer/agent to review claim completeness, enforceability, evidence-to-claim mapping, judge-perspective risks, and opponent defenses.
Example:
python3 scripts/final_review_check.py /path/to/output_package --out-csv /path/to/final_review_check.csv
scripts/source_audit.py
Use when outputs include legal sources, PKULaw retrieval, URLs, statutes, judicial interpretations, local rules, or similar-case rules.
Purpose:
- scan Word/Markdown/CSV outputs for legal-source markers and URLs;
- verify whether a source table exists and has required fields;
- warn when legal conclusions appear without a source title, source URL, timeliness, or issue mapping;
- output CSV findings for final delivery and loop review.
Example:
python3 scripts/source_audit.py /path/to/output_package --out-csv /path/to/source_audit.csv --sources-csv /path/to/法源与引用核验表.csv
Reference Files
references/template-index.md: local template paths and when to use each category.references/litigation-strategy-standard.md: required depth and structure for high-quality litigation strategy analysis.references/output-package-checklist.md: suggested full-case output package by layer.references/process-communication-templates.md: fixed templates for case timeline, case facts memo, pending issues, task tracker, and communication files.references/legal-source-verification.md: PKULaw/source-URL verification, source table fields, and citation rules.references/loop-review-protocol.md: three-pass loop review method, log fields, and failure handling.references/internal-gates.md: material, legal, evidence, and delivery gates for complete-package quality control.
author: "lawyer-case-workflow contributors" description: "Use this skill when a lawyer provides civil/commercial case materials and wants a reproducible litigation/arbitration workflow: intake triage, legal-source verification, filing documents, evidence catalog/page-numbered bundle, strategy, judge-perspective review, client/process reports, and final checks. Trigger for filing packages, lawsuit/arbitration preparation, evidence organization, legal research with PKULaw/source URLs, loop review, internal quality gates, or court-ready Word/PDF outputs." ---
Lawyer Case Workflow
Overview
Use this skill to turn a folder of client-provided civil or commercial case materials into structured lawyer work products. The workflow follows Chen Xuanlin's five-layer litigation case handling model and reuses a local template library.
Path Configuration
This skill uses two configurable paths. Set them at the start of a session:
- TEMPLATE_ROOT: the local template library directory. Default:
~/Desktop/GPT/05_办案模板库. Override by setting theLAWYER_TEMPLATE_ROOTenvironment variable or telling the agent the path. - OUTPUT_ROOT: the base directory for generated files. Default:
~/Desktop/GPT. Override by setting theLAWYER_OUTPUT_ROOTenvironment variable or telling the agent the path.
When the skill runs, it resolves these paths in order: environment variable → user-provided path → default. All paths in references/template-index.md are relative to TEMPLATE_ROOT.
Save all generated files under OUTPUT_ROOT, preferably in a case-specific output folder.
Competition-grade mode: when the user asks for a contest-ready workflow, first-place optimization, repeatable demo, source-backed review, or full-package delivery, run the work as a source-verified loop workflow: material scan -> legal-source verification -> internal gates -> four-package drafting -> deterministic final checks -> loop review log.
This is a general civil/commercial litigation/arbitration workflow skill. It must not default to private lending merely because a prior case involved a loan. For every new matter, first identify the dispute category, claim basis, procedural posture, and evidence structure, then select the appropriate document package. Apply it to disputes including but not limited to:
- private lending, financial lending, guarantee, factoring, and debt recovery;
- sales, service, lease, contract termination, payment recovery, and damages;
- construction, renovation, property service, property damage, water leakage, and repair-cost disputes;
- tort, personal/property damage, unjust enrichment, and restitution;
- partnership, investment cooperation, equity transfer, shareholder disputes, company-control disputes, and profit distribution;
- labor/personnel disputes when civil-litigation style analysis or filing materials are needed;
- enforcement, preservation, investigation order, arbitration, and post-judgment recovery work.
Before Drafting
- Inspect the user-provided case folder and list available materials by type: contracts, chat records, payment records, identity documents, photos, audio transcripts, litigation documents, prior correspondence, and client notes.
- Identify the case type, parties, target court or forum, claim amount, current stage, urgent deadlines, and missing materials.
- Read
references/template-index.mdbefore choosing templates. - If the output includes litigation strategy, read
references/litigation-strategy-standard.md. - If the output includes statutes, judicial interpretations, local rules, legal research, or source-backed conclusions, read
references/legal-source-verification.mdbefore drafting. - If the output is a complete package, filing package, contest demo, or final delivery, read
references/internal-gates.mdandreferences/loop-review-protocol.md. - If facts are incomplete, draft with clearly marked placeholders instead of inventing facts.
- For the first-layer engagement package, use the local Guangdong Zhiheng template files as the document bases. Do not rewrite the contract, authorization letter, or firm letter from scratch.
Universal Civil/Commercial Intake Triage
Before deciding outputs, classify the case along these axes and let the classification drive the documents:
- Case posture: plaintiff/claimant, defendant/respondent, third party, preservation-only, enforcement, settlement, pre-litigation negotiation, appeal/retrial, or arbitration.
- Dispute type: contract payment, contract termination, lending/debt, property damage, tort damages, labor, company/equity, partnership/investment, guarantee/security, enforcement, or other.
- Relief goal: payment, return of property, delivery/performance, termination/rescission, confirmation of rights, damages, injunction/cessation, removal of obstruction, preservation, investigation, enforcement pressure, negotiation leverage, or defense.
- Forum and procedure: court litigation, arbitration, labor arbitration, enforcement, pre-litigation preservation, litigation preservation, small claims, summary procedure, ordinary procedure, or special proceeding.
- Evidence pattern: written contract, oral agreement, electronic chat, payment flow, invoice/delivery/receipt, appraisal, photos/videos, witness, corporate records, official registration, court documents, or enforcement clues.
Then choose the output package:
- Filing-first: when the client needs to sue or apply for preservation immediately.
- Strategy-first: when jurisdiction, defendant selection, claim basis, or evidence sufficiency is uncertain.
- Defense-first: when representing a defendant or respondent; generate defense strategy, evidence rebuttal, jurisdiction objection, answer outline, and settlement plan before a complaint.
- Evidence-first: when materials are chaotic; first produce evidence inventory, page-numbered bundle, evidence gap list, and fact timeline.
- Client-conversion/engagement-first: when the user needs a proposal, quotation, or signing package.
- Source-verified review: when legal basis, local rules, similar-case rules, or contest-grade credibility matters; first build a source plan, run PKULaw or other authoritative retrieval when available, and create a source-audit table.
Do not force every case into a plaintiff filing package. If the user says "we represent defendant", "被告", "答辩", "反诉", or "抗辩", adapt the workflow to defense outputs.
/plan Planning Mode
If the user types /plan, asks for a plan, or appears to be setting up a complex case workflow before drafting, produce a concrete办案计划 first instead of immediately generating final documents.
The /plan output must include:
- 案件识别: case type, posture, client side, opponent, forum/court, current stage, urgent deadlines.
- 材料盘点计划: what folders/files to inspect and how to classify them.
- 证据材料计划: proposed
证据一,证据二,证据三structure, expected proof purpose, whether PDF/image/Word files can be merged, and what needs original-carrier verification. - 法律与策略计划: requested relief, claim basis, jurisdiction, limitation period, burden of proof, likely defenses, preservation/enforcement pressure.
- 法源与审查计划: whether PKULaw/source URLs are needed, which legal issues require source verification, and which loop/gate checks will run.
- 输出文件清单: exact documents to generate, grouped by filing, evidence, strategy, process management, and client communication.
- 补证清单预判: likely missing materials and who should provide them.
- 执行顺序: which work should be done first, second, third; identify blockers such as jurisdiction or missing identity materials.
After giving the plan, if the user asks to proceed or the request already authorizes execution, continue to produce the planned documents.
Non-Negotiable Case Handling Rules
Use these rules whenever generating litigation filing, strategy, or process-management outputs.
Cause-of-action and claim-basis first
For every civil/commercial matter, start from the legal relationship and requested relief, not from a fixed private-lending template.
- Identify the likely cause of action and any alternative cause of action.
- Identify the claim basis: contract claim, tort claim, restitution/unjust enrichment, property right claim, company-law claim, labor/personnel claim, guarantee/security claim, enforcement claim, arbitration claim, or mixed basis.
- Break the claim basis into legal elements and burden of proof.
- Map each element to facts, evidence, and missing materials.
- Only after this mapping, draft the complaint, arbitration application, defense, evidence catalog, preservation application, strategy report, or client communication file.
Do not mechanically reuse loan-case language such as principal, repayment, lending relationship, LPR, or creditor/debtor unless the identified dispute type actually requires it.
Complete package by default
When a user asks for filing materials, "立案材料", "一套材料", "完整办案材料", or similar language, do not stop at complaint/evidence/preservation documents. Unless the user clearly limits the scope, generate an integrated package covering:
- Filing submission package: complaint, evidence catalog, evidence bundle, subject materials list, filing checklist, service-address confirmation, preservation application, property clues, and pending submission notes.
- Process-management package: case timeline, case facts memo, materials review log, evidence gap list, pending fact list, task tracker, and client-facing progress report.
- Litigation-strategy package: litigation strategy report, dispute focus list, claim-basis table, evidence-to-elements table, defense prediction, countermeasure plan, risk matrix, and next action list.
- If the user mentions a court or region, adapt the checklist and document names to that court or region and clearly flag any jurisdiction or local-filing issue.
Mandatory output separation
For any full case package, filing package, or multi-document output, separate work products by use case before drafting. Do not mix court-facing materials with internal lawyer analysis.
Default folder structure:
01_法院提交包
- Only court-facing filing documents: complaint/application, evidence catalog, evidence bundle, filing checklist, subject materials, authorization, firm letter, service-address documents, preservation/investigation documents. - Use restrained black-and-white court style. Do not include risk matrices, judge-negative-review language, red flags, or internal strategy comments.
02_内部审查包
- Lawyer-only quality-control documents: judge-perspective nine-step review, complaint/evidence final review, facts-law-evidence-claims matrix, element proof table, risk matrix, opponent defense prediction, evidence gaps, pending facts. - May use tables, risk grades, red/problem markings, and candid negative review.
03_策略研究包
- Legal research report, similar-case report, litigation strategy report, preservation/enforcement strategy, negotiation plan, trial outline, cross-examination memo.
04_流程管理包
- Case timeline, facts memo, material receiving log, task tracker, litigation calendar, client progress report, communication notes.
If the user only asks for one layer, create only that layer. If the user asks for "完整", "全套", "不要偷懒", or authorizes the complete workflow, create all applicable folders. File names must clearly show whether a document is 法院提交格式, 内部审查, 策略分析, or 流程管理.
Execution gate before drafting
Before generating multiple files, first produce an execution plan unless the user explicitly says to execute directly. The plan must include:
本次拟生成文件清单grouped by01_法院提交包,02_内部审查包,03_策略研究包, and04_流程管理包.本次不会生成的文件with reasons, such as no asset clues, no preservation request, no legal research requested, or missing templates.需要用户确认的关键事项: court/forum, client side, preservation, claim amount, whether to use Shenzhen/local format, whether to generate final or pending-submission drafts.重大风险提示: cause of action uncertainty, jurisdiction risk, amount inconsistency, party identity gaps, evidence insufficiency, electronic evidence authenticity, limitation period, arbitration/labor prerequisite.执行顺序: scan materials, choose templates, draft court package, build evidence bundle, draft internal review, draft strategy/process files, run final checks.
If the user says "直接执行", proceed without waiting, but still create an internal plan and stop only for blockers that make drafting unsafe, such as impossible court selection, missing core party identity for a filing version, or contradictory claim amount.
Source-verified loop workflow
Use this enhanced workflow when the user requests contest optimization, first-place quality, source-backed analysis, "loop审查", "北大法宝", "源地址审查", or internal quality control.
- Run material triage and determine whether the matter should be filing-first, strategy-first, defense-first, evidence-first, engagement-first, or source-verified review.
- Build a legal-source plan before writing legal conclusions. Use
mcp__pkulaw.search_articleandmcp__pkulaw.get_articlewhen available; otherwise use official/source URLs and mark unavailable retrievals. - Create or update
法源与引用核验表with source title, article number, original excerpt, timeliness, issuing authority, source URL, retrieval date, issue mapped, and whether it supports the conclusion. - Apply the four internal gates in
references/internal-gates.md: material gate, legal gate, evidence gate, delivery gate. - Run the three-pass loop in
references/loop-review-protocol.md: structure review, legal/source review, submission review. - Keep the court-facing package clean. Source doubts, judge-negative review, risk grades, and internal corrections belong in
02_内部审查包, not in01_法院提交包.
Complaint and claims must be professional
Every complaint must have clear, court-ready, enforceable claims. Do not write overly simple claims such as only "判令被告还款", "判令被告赔偿", or "判令被告承担责任".
Before drafting claims:
- Identify all potentially available forms of relief for the specific dispute: payment, return, delivery, performance, termination/rescission, confirmation, damages, repair/restoration, removal of obstruction, apology/cessation where applicable, registration change, accounting, access to records, preservation, litigation costs, attorney fees, appraisal fees, insurance premiums, and other recoverable items.
- State each claim separately, with the responsible party, beneficiary, amount or act, calculation basis, performance deadline, and continuing calculation rule where applicable.
- For monetary claims, distinguish principal/price/refund/rent/wages/investment/payment balance/damages/repair cost/appraisal fee/late-payment loss/interest/liquidated damages. Do not collapse different money items into a single vague number.
- If interest, late-payment loss, capital occupation loss, or liquidated damages are requested, produce a calculation note or table. Use the contract rate or statutory basis where valid; if no rate or uncertain basis exists, identify the legally arguable fallback and mark risk. Use LPR only when it fits the claim type and legal basis.
- Include a temporary total as of the drafting date when useful, and state whether continuing losses, interest, rent, occupation fee, or liquidated damages are calculated to actual performance/payment.
- Avoid unsupported claims. If attorney fees, preservation insurance fees, appraisal fees, realization-of-rights costs, or similar expenses are claimed, confirm a contractual/legal basis or mark
[待补充:费用依据及票据]. - The facts and reasons must explain the claim formula and legal elements, not merely repeat evidence names.
Adapt claims to the dispute type:
- Payment/debt/lending: principal, interest, overdue interest or capital occupation loss, repayment already credited, continuing interest, costs.
- Sales/service/contract payment: contract price, delivered/performed work, unpaid amount, late-payment loss, invoices/acceptance/delivery, continued performance or termination.
- Contract termination/rescission: termination/rescission request, return of property, refund, damages, possession return, invoice handling, post-termination obligations.
- Damages/tort/property damage: liability confirmation if needed, repair cost, appraisal fee, mitigation cost, replacement cost, loss of use, interest, emotional/personal injury items only when legally applicable.
- Lease/property: rent, occupation fee, management fee, liquidated damages, return of premises, restoration, deposit, utilities, removal of obstruction.
- Company/equity/shareholder: confirmation of shareholder/equity rights, registration change, equity transfer price, capital contribution, profit distribution, access to books, resolution validity, company cooperation obligations.
- Partnership/investment cooperation: settlement/accounting, return of investment, profit/loss distribution, dissolution/liquidation, fiduciary or contractual liability.
- Labor/personnel: wages, overtime, severance/compensation, social insurance-related claims where procedurally proper, reinstatement or confirmation, arbitration prerequisites.
- Defense/defendant work: do not write plaintiff-style claims unless counterclaiming. Generate answer points, jurisdiction objection, limitation defense, performance/setoff/payment defense, evidence rebuttal, counterclaim feasibility, and settlement range.
Evidence package and page numbering
When filing materials include evidence:
- Organize evidence as
证据一,证据二,证据三rather than loose folders only. - Each evidence item must include evidence name, source/form, proof purpose, page range, and any authenticity/original-carrier note.
- If generating a PDF evidence bundle, add continuous page numbers and make the evidence catalog match the actual PDF page ranges.
- For electronic evidence such as WeChat records, screenshots, payment vouchers, and electronic signatures, flag original-carrier requirements: original phone, platform export, electronic-signature verification file, timestamp, notarization, or other preservation method as needed.
- If payment records are numerous, create a payment/repayment extraction table and a balance-calculation note. Do not rely only on scattered vouchers.
Evidence materials are a standalone work product, not merely an attachment to the complaint. For every litigation/arbitration filing package, generate or plan these evidence outputs unless the user expressly excludes them:
证据材料整理方案.docx
- proposed evidence grouping; - proof purpose for each group; - evidence source folder; - original/copy/electronic-data status; - merging/page-numbering feasibility; - authenticity and supplementation issues.
证据目录及说明_已编页码版.docx证据材料汇编_证据一至证据N_已编页码.pdfwhen files can be merged.证据补充清单.docx电子证据原始载体及核验清单.docxwhen evidence includes WeChat, Alipay, WeCom, email, electronic signatures, audio/video, platform exports, or screenshots.
Evidence grouping should normally follow the adjudication logic:
- subject qualification and service information;
- contract/legal relationship formation;
- performance/delivery/payment/contribution;
- breach/tort/damage/default facts;
- amount calculation and loss basis;
- notice, demand, negotiation, limitation interruption;
- preservation/property clues;
- other supporting or rebuttal evidence.
For defendant-side work, group evidence by defenses instead: jurisdiction, subject objection, contract invalidity/non-formation, performance, payment, setoff, limitation period, causation, damage amount, and procedural objections.
Jurisdiction and local filing standards
Always perform a jurisdiction screen before finalizing filing documents:
- Identify contractual jurisdiction clauses, defendant domicile, plaintiff domicile where relevant, contract performance place, tort place, property location, and any local connection.
- If the user specifies Shenzhen, Guangzhou, or another court, verify whether the facts support that court. If not, mark the issue as a high-risk filing obstacle and list the exact missing jurisdiction evidence.
- Do not silently write a court name that conflicts with the facts. Use
[待确认:有管辖权法院]or state the jurisdiction risk in the filing checklist and strategy report.
Local court format routing
When a user specifies a court, region, or filing platform, route the court-facing package to that local format. Never assume Shenzhen format for non-Shenzhen cases, and never write a Shenzhen court package without a Shenzhen jurisdiction screen.
Default local routing rules:
- Shenzhen court
- First generate a Shenzhen jurisdiction screen: defendant domicile/registration, contract performance place, tort place, property location, contractual jurisdiction, plaintiff domicile only when legally relevant, and any Shenzhen connection. - If Shenzhen jurisdiction is unsupported or uncertain, title court-facing documents as 深圳管辖待核实版 or use [待确认:有管辖权法院]; do not present them as final. - Court package must include 深圳法院立案材料提交说明_融合版.docx, 深圳法院立案材料清单及提交状态.docx, evidence catalog matching actual page ranges, service-address documents, and refund/account information if required by the court checklist.
- Guangzhou / Guangdong courts
- Apply the same jurisdiction screen and use Guangdong court filing checklist names where facts support the forum.
- Other courts
- Use the actual named court only if facts support jurisdiction. Otherwise keep court name pending and explain the issue in the filing checklist and internal review.
- Arbitration / labor arbitration
- Do not generate a court complaint package until the arbitration clause, arbitration institution, labor-arbitration prerequisite, or forum basis is checked.
Judge-perspective nine-step review
When the task asks for strategy, review, litigation quality control, or uses language such as "法官角度", "九步法", "审判要事", "不要偷懒", include a judge-perspective review using:
- 定主体
- 定请求
- 定案由
- 定管辖
- 定事实
- 定争点
- 定证据
- 定规则
- 定裁判/策略
For each step, state whether it is可行, partially可行, or problematic; identify the issue; explain the consequence; and give a补正/反制 plan. If the user requests visual warnings in a Word file, mark problem text in red.
Quality-control matrices
For any substantive civil/commercial strategy or filing package, include or internally complete these checks:
- Facts-to-law-to-evidence-to-claim matrix: each requested relief must map to facts, legal basis, evidence, and missing proof.
- Element proof table: for the main claim or defense, list each legal element, burden of proof, available evidence, proof strength, and gaps.
- Risk matrix: grade risks as high/medium/low and explain source, consequence, and mitigation.
- Opponent route prediction: strongest defenses or claims, not straw-man defenses.
- Procedural route check: jurisdiction, limitation period, arbitration/labor arbitration prerequisite, preservation timing, necessary parties, service risks, and enforcement feasibility.
- Client action list: what the client must supplement, what the lawyer must draft/search/file, and deadlines.
If these checks reveal that filing immediately is unsafe, say so directly and recommend a strategy-first or evidence-first path.
Mandatory final review for complaints and evidence catalogs
When generating a complaint, arbitration application, evidence catalog, or filing package, do not stop after drafting. Perform a mandatory final review and generate an internal checklist named like 起诉状及证据目录复核表.docx or include the same table in the filing submission note.
The final review must cover:
- Claim-basis review: each claim maps to a legal relationship, legal basis, fact basis, and evidence group.
- Claim completeness review: check whether principal, interest, penalty/liquidated damages, damages, return/restoration, performance, confirmation, preservation fee, litigation fee, attorney fee, appraisal fee, insurance premium, and other recoverable items are applicable. State why an item is included or excluded.
- Amount consistency review: principal, interest, repayment credits, damages, temporary total, preservation amount, and filing amount must match across complaint, preservation application, evidence catalog, calculation tables, and filing checklist.
- Enforceability review: each claim must be specific enough to enforce: who pays/performs, to whom, how much, what act, what deadline, what interest rate, what start/end date.
- Evidence-to-claim review: every claim must have supporting evidence; every core evidence item must have a proof purpose. Evidence catalog page ranges must match the evidence bundle.
- Judge-perspective negative review: identify whether a judge may question jurisdiction, subject qualification, cause of action, limitation period, claim clarity, interest/legal basis, necessary parties, electronic evidence authenticity, or proof sufficiency.
- Opponent defense reverse review: identify the strongest expected defense or procedural objection and whether the complaint/evidence package already neutralizes it.
- Formatting and filing review: court name, party names, ID numbers, addresses, phone numbers, cause of action, signature blocks, dates, service address confirmation, authorization documents, and placeholders must be checked.
The review result must be practical:
- mark each item as
通过,需补强, or高风险; - list exact fixes, not generic warnings;
- if a critical issue remains unresolved, state that the document is a pre-submission draft rather than final.
Never hide uncertainty by making the complaint look final. If key facts or evidence are missing, keep visible placeholders and list them in the review table.
Mandatory final delivery checks
Before final delivery of any filing package or complete package, run deterministic checks when the local environment supports them. Create 00_最终交付检查报告.docx or include the same results in a final delivery note.
Required checks:
- Run
scripts/quality_check_package.pyon the output package and review unresolved placeholders, inconsistent court names, PDF openability, and evidence catalog/bundle pairing. - Run
scripts/final_review_check.pyafter the complaint/application, evidence catalog, and filing package exist. - Verify evidence PDF page count and evidence catalog page ranges match.
- Verify the evidence bundle has continuous page numbers when a bundle is generated.
- Verify Word files contain real Word tables where tables are expected, not Markdown pipe-table text.
- Verify court-facing documents do not include internal-only risk language, strategy commentary, red-flag notes, or judge-review matrices.
- Verify internal review documents are not placed in
01_法院提交包. - Run
scripts/source_audit.pywhen legal research, statutes, judicial interpretations, local rules, similar cases, or source-backed claims are included. - Generate or include
loop_review_log.csvfor complete packages, contest demos, and source-verified workflows.
If a check cannot be run, state why and list the manual replacement check. If checks find unresolved critical issues, mark the package as 提交前待补版.
Case-type routing rules
After intake classification and before drafting, route the case to the correct issue checklist. Use these as minimum checks; adapt them to the facts.
- Sales / service / contract payment: formation, validity, performance, delivery/acceptance, price/fee calculation, invoice effect, reconciliation, payment condition, overdue loss, setoff, limitation period, jurisdiction.
- Private lending / debt: lending intent, payment delivery, borrower identity, third-party receipt authorization, repayments, interest agreement, maturity/call for repayment, limitation period, company/guarantor responsibility if any.
- Lease / property use: lease object, term, rent, deposit, delivery/return, occupation fee, utilities/management fees, restoration, termination notice, possession return, enforcement feasibility.
- Tort / property damage: duty of care, tort act, fault or presumption, causation, damage scope, appraisal/repair necessity, mitigation costs, responsible parties, insurance or property manager role.
- Construction / renovation: contract formation, project scope, completion/acceptance, settlement, defects, quality appraisal, repair cost, payment condition, contractor qualification where relevant.
- Company / equity / shareholder: shareholder qualification, contribution, register/filing records, articles of association, resolutions, company as necessary party, accounting/access to records, fiduciary duties, registration change.
- Partnership / investment cooperation: legal characterization, contribution proof, management authority, accounting/liquidation, profit/loss sharing, withdrawal/termination, entrusted management, fiduciary or contractual liability.
- Labor / personnel: arbitration prerequisite, employment relationship, wage base, working time, social insurance where procedurally proper, termination reason, claim periods, evidence burden.
- Enforcement / preservation: enforceable title or pending claim, asset clues, urgency/necessity, guarantee, forum, debtor property discovery, refusal-to-enforce or enforcement-objection risks.
Do not force the filing cause of action to match the folder name. If folder name, existing draft, and evidence point to different legal relationships, flag the conflict and choose the strongest route only after mapping facts, law, evidence, and claims.
Five Layers
1. Engagement Layer
Use when the task involves client intake, quotation, engagement, agency authority, or signing materials.
Typical outputs:
- Client intake summary
- Case facts preliminary summary
- Legal service proposal and quotation
- Engagement contract
- Authorization letter
- Supplementary materials list
Template guidance:
- The engagement layer is normally the first output layer. Generate it before timeline, case facts memo, strategy, or filing documents unless the user clearly asks otherwise.
- Prefer fixed-fee civil legal service contract for standard civil litigation.
- Use risk-fee contract only if the user clearly asks for contingency or risk agency.
- Use litigation authorization letter for court litigation.
- Use legal analysis and quotation proposal when the user wants conversion, pricing, or client-facing service plan.
- Strictly apply the original Guangdong Zhiheng templates in the template library for the legal service contract, authorization letter, and firm letter. Copy the original template as the base and only fill existing fields or necessary case-specific blanks.
- Preserve the template layout and firm branding. Use black-and-white style and FangSong size 4 when generating or adjusting first-layer files unless the original template requires otherwise.
- If court, client phone number, client address, ID number, second agent, lawyer phone number, defendant identity, or case amount is missing, do not silently omit it. Mark it as
[缺失,待补充]in the document when needed and list it in the engagement signing checklist. - If an identity document already exists, treat it as received. Only flag the different issue that still needs proof, for example whether a defendant is the owner, occupant, renovator, or actual responsible party for the relevant property.
2. Legal Research Layer
Use when the task requires statutes, regulations, local rules, judicial interpretations, similar cases, or裁判规则.
Typical outputs:
- Legal research report
- Similar-case search report
- Cause-of-action and claim-basis analysis
- Limitation period, jurisdiction, and burden-of-proof analysis
- Key legal-risk memo
Default output for this layer should be one integrated communication-ready report, not several fragmented documents, unless the user asks for separate files. Name it like 法律检索报告_融合沟通版.docx. It should be suitable both for lawyer team discussion and client communication.
When using external legal databases such as 北大法宝 MCP, cite retrieval source, document name, issuing authority, effective status, and date when available.
For source-backed work, use references/legal-source-verification.md. Prefer PKULaw retrieval for statutes, judicial interpretations, and authoritative legal rules when the connector is available. Each material legal conclusion must map to at least one verified source or be marked [法源待核验]. Do not cite statutes, local rules, or similar cases without a source title and source URL when source-backed mode is requested.
Legal research reports must use a formal law-firm style, preferably red-circle-firm style: conclusion first, clear hierarchy, detailed analysis, black-and-white formatting, and FangSong size 4 when creating Word files unless the user provides another firm template. Do not provide only a short summary.
Before writing the legal research report, always perform a case-specific research design:
- Identify the case type, such as property damage from water leakage, sales contract, private lending, equity transfer, property service contract, labor dispute, administrative inaction, criminal complaint, enforcement, or another specific category.
- Identify the litigation objective, such as compensation, contract termination, payment recovery, confirmation of rights, cessation of infringement, removal of obstruction, performance, defense, revocation of administrative act, or pressure for settlement.
- Design tailored research directions for that case type and objective. Do not mechanically apply the same search topics to every case.
- Make the research serve litigation strategy: whom to sue, whether to add parties, whether to send a lawyer letter first, whether to apply for appraisal or investigation order, which claims are strong or weak, and which evidence gaps block filing.
For common civil/commercial disputes, tailor the research direction:
- Contract payment: contract formation, performance/acceptance, payment conditions, late-payment loss, invoice effect, setoff, limitation period.
- Contract termination/rescission: termination right source, notice validity, restoration after termination, damages, continued performance feasibility.
- Property damage/tort: duty of care, causation, fault/presumption, appraisal, repair necessity, loss scope, responsible parties.
- Company/equity: shareholder qualification, register effect, capital contribution, resolution validity, fiduciary duties, appraisal/accounting, company as party.
- Partnership/investment: legal characterization, accounting/liquidation, profit/loss sharing, entrusted management, evidence of contribution and withdrawal.
- Labor/personnel: arbitration prerequisite, employment relationship, wage/overtime proof, termination legality, compensation standards.
- Enforcement/preservation: asset clues, preservation necessity,担保, enforcement forum, debtor property discovery, refusal-to-enforce risks.
Default legal research report structure:
- 报告用途
- 先给结论
- 本案检索方向
- 检索来源
- 请求权基础
- 举证责任
- 争议焦点
- 程序路径
- 后续补证清单
- 律师团队建议
Within "本案检索方向", keep the four-layer analysis: - 第一层:确定请求权基础。 - 第二层:确定法律依据和举证责任。 - 第三层:确定本案争议焦点。 - 第四层:确定管辖、程序路径和后续待补充举证。
Use tables, but every table should have plain-language explanation before or after it. Avoid producing table-only reports. The writing style should be formal enough for a law firm work product but understandable to a client.
Only include a dedicated "赔偿项目" section when the case type requires damages analysis, such as tort, contract damages, construction repair costs, personal injury, property damage, or enforcement recovery. For cases that do not require damages analysis, omit that section and focus on claim basis, legal elements, disputed issues, jurisdiction, procedure, and evidence.
If the first-layer engagement package lacks the target court, client phone number, or other basic information, repeat the missing information in the legal research report's risk or next-step section so downstream filing documents do not silently inherit omissions.
3. Litigation Filing Layer
Use when the task involves filing or court submission.
Typical outputs:
- Complaint or arbitration application
- Evidence catalog and evidence explanation
- A4 evidence material bundle
- Subject qualification materials checklist
- Filing material checklist
- Preservation application or investigation order request if needed
Evidence catalogs should follow the simple official format in the template library unless the user requests a more detailed court version.
Court-facing filing documents must use court-submission formatting, not internal review formatting:
- Complaint/application
- Use the local template library or the user's existing draft as the style base when available. - Use a restrained black-and-white court format; no colored risk tables, no internal notes, no strategy commentary. - Use formal headings such as 民事起诉状, 原告, 被告, 诉讼请求, 事实与理由, 此致, court name, signature/date. - Keep placeholders visible for missing party identity, service address, phone number, court name, amount basis, or fee evidence.
- Evidence catalog
- Use the official simple five-column style where suitable: 序号, 证据名称, 证明内容, 页码, 备注. - The catalog must match the actual evidence PDF page ranges. - Do not put internal risk analysis into the court-facing evidence catalog. Put authenticity/original-carrier notes in 备注 only in court-appropriate language.
- Filing checklist / submission note
- Use court-facing checklist language: submitted/not submitted, original/copy, number of copies, pending item. - Do not use internal terms such as 高风险, 抗辩路径, 法官否定审查 in court-facing files.
- Evidence bundle
- Merge PDFs/images in evidence order where possible. - Add continuous page numbers. - Verify page count and catalog consistency before final delivery.
- Internal review separation
- Put nine-step review, risk matrix, claim-basis matrix, defense prediction, and final-review tables only in 02_内部审查包, unless the user explicitly asks for a client-facing strategy report.
For Shenzhen court filing packages, generate an integrated filing package instead of a scattered review memo set. Default outputs:
深圳法院立案材料提交说明_融合版.docx
- Merge filing readiness review, missing material list, evidence review summary, and next-step submission notes. - Must include a Shenzhen jurisdiction screen. If Shenzhen jurisdiction is unsupported, state the exact missing connection and do not present the package as final.
民事起诉状_提交前待补版.docx
- Claims must be professional and itemized: principal, interest, continuing interest, costs, preservation fee, attorney fee if supported, and total temporary amount. - Include an interest calculation explanation when interest is claimed.
送达地址确认书_自然人_待补版.docxor entity version where applicable.证据目录及说明_已编页码版.docx
- Use 证据一, 证据二, 证据三 format and match actual page ranges.
深圳法院立案材料清单及提交状态.docx证据材料汇编_证据一至证据N_已编页码.pdfwhen evidence PDFs/images are available and can be merged.证据补充清单_深圳立案版.docx财产保全申请书.docxand财产线索清单.docxif preservation is requested or there are asset clues.诉讼费退费账户/收款账号待补清单.docxor include the same section in the filing checklist when the court requires it.起诉状及证据目录复核表.docx
- Mandatory for filing packages. Check claim basis, claim completeness, amount consistency, enforceability, evidence-to-claim mapping, judge-perspective risks, opponent defenses, and filing-format issues.
For Shenzhen packages, place court-facing files in 01_法院提交包 and internal review files in 02_内部审查包. If the user only wants a court package, still generate the mandatory internal review checklist in 02_内部审查包 unless expressly excluded.
If required court, phone number, service address, party identity relation, property ownership, or other core filing information is missing, mark it clearly as pending and state that the document is a pre-submission draft, not final filing version.
4. Litigation Strategy Layer
Use when the task requires red-circle-firm level legal analysis, case route planning, risk control, negotiation positioning, or trial preparation.
Typical outputs:
- Litigation strategy analysis
- Case timeline
- Dispute focus list
- Claim-basis and elements table
- Evidence-to-elements table
- Opponent defense prediction
- Countermeasure plan
- Trial questioning outline
- Cross-examination opinions
- Settlement plan and risk matrix
Read references/litigation-strategy-standard.md before producing this layer.
Default litigation strategy and defense documents should be written in a red-circle-firm litigation work-product style: formal legal Chinese, conclusion first, legal issue framing, evidence-driven risk assessment, and no casual or AI-like phrasing. Prefer paragraph analysis plus necessary tables. Avoid slogan-like expressions. Default outputs:
诉讼策略分析报告_红圈所风格版.docx抗辩预判与反制意见_红圈所风格版.docx法官视角_案件审判要事九步法审查报告_标红问题版.docxwhen the user asks for judge-perspective review, case quality control, or full strategy review.- Optional risk matrix, negotiation plan, trial outline, or cross-examination memo only if needed by the case or requested by the user.
The strategy report must not be generic. It must address:
- whether to sue now or first supplement evidence;
- whether the chosen court has jurisdiction;
- whether each claim is supportable;
- which evidence proves each legal element;
- likely defenses and how to neutralize them;
- settlement, preservation, and enforcement pressure.
For non-lending civil/commercial cases, adapt the strategy report to the actual legal relationship. Examples:
- Contract cases must analyze formation, validity, performance, breach, termination, damages, setoff, and limitation period.
- Tort/property damage cases must analyze duty, fault, causation, damage amount, appraisal, and responsible parties.
- Company/equity cases must analyze party structure, shareholder status, corporate records, internal resolutions, registration effect, and whether the company must be added as a party.
- Labor cases must analyze arbitration prerequisite, employment relationship, termination reason, wage base, working time evidence, and claim periods.
- Defendant-side cases must lead with defense route, evidence rebuttal, burden allocation, procedural objections, counterclaim feasibility, and settlement exposure.
5. Process Management and Case Communication Layer
Use when the task involves process files, fact organization, client updates, meeting notes, court communication, opposing-counsel communication, or staged reports. This layer is the case management layer for documents that help lawyers understand, advance, and communicate the case.
Typical outputs:
- Case facts memo
- Case timeline
- Materials receiving and review log
- Evidence gap list
- Pending fact verification list
- Work task tracker
- Litigation calendar and deadline list
- Client communication memo
- Case progress report
- Pending confirmation list
- Court communication record
- Opposing counsel communication record
- WeChat/email reply draft
- Stage report
- Closing report
Read references/process-communication-templates.md before producing this layer. The current template library has no dedicated files in this layer, so use the fixed memo/table templates in that reference unless the user later adds templates.
Default output for this layer should be two integrated documents, not many separate files:
案件时间轴及案情梳理表.docx
- Include case basic information, case timeline, fact summary, existing material overview, and key pending facts.
案件过程管理及案件汇报.docx
- Include task tracker, evidence gap tracker, litigation schedule, current risks, client communication summary, stage progress report, and next steps.
证据补充清单.docx
- If not already included in the filing layer, create a separate supplement list with priority, missing material, specific content, purpose, owner, and deadline.
Only split into more files if the user requests separate process documents or the case is complex enough that the two-file package becomes unwieldy.
Output Rules
- Keep document titles formal and court/client ready.
- Use Chinese legal drafting style unless the user requests otherwise.
- For client-facing documents, state conclusion first, then facts, legal analysis, risks, and action plan.
- For court-facing documents, keep tone restrained and evidence-driven.
- Do not overstate certainty. Use risk grades when facts or evidence are incomplete.
- Keep placeholders visible, for example:
[待补充:被告统一社会信用代码]. - If generating multiple files, create a case-specific folder named like
案件名称_办案输出_YYYYMMDD. - Always separate output folders by use case for multi-file work:
01_法院提交包,02_内部审查包,03_策略研究包,04_流程管理包. - Do not use Markdown pipe-table text in generated Word files. If a Word document needs a table, create a real Word table.
- Court-facing Word files should use black-and-white court style and the local template library. Internal review Word files may use table-heavy risk-control style.
- When the user has provided an existing style template or prior draft, preserve its court-facing layout unless it conflicts with legal sufficiency or local filing requirements.
- For every final package, include or generate
00_最终交付检查报告.docxunless the user requests only a single quick draft. - For source-backed outputs, include a source-audit table and do not present unverified legal rules as confirmed-current law.
Scripts
Use scripts for deterministic mechanical work instead of rewriting extraction/merging/calculation code each time.
Path resolution: Scripts are located in the scripts/ subdirectory of this skill. When running, use the skill directory as the base path. For example, if this skill is installed at ~/.workbuddy/skills/lawyer-case-workflow/, run scripts as:
python3 ~/.workbuddy/skills/lawyer-case-workflow/scripts/scan_case_folder.py /path/to/case --out-csv ...
Dependencies: Scripts require PyMuPDF and python-docx. Install with:
pip install -r scripts/requirements.txt
scripts/extract_payment_vouchers.py
Use when a case contains many WeChat, Alipay, bank, or platform payment PDF vouchers.
Purpose:
- scan PDFs under a case folder;
- extract payer, payee, amount, payment time, serial number, platform, and status;
- classify direction when creditor/debtor names are provided;
- output CSV for payment/repayment review and balance calculation.
Example:
python3 scripts/extract_payment_vouchers.py /path/to/case --out /path/to/output/payment_extract.csv --creditor 谭嘉雯 --debtor 陈彪 --dedupe
scripts/calculate_interest.py
Use when drafting professional claims, preservation amount, settlement amount, or a calculation table.
Purpose:
- calculate simple interest by principal, start date, end date, and annual rate;
- optionally handle repayments from a CSV with
date,amount; - output JSON and/or CSV calculation tables.
Example:
python3 scripts/calculate_interest.py --principal 295200 --start 2025-04-20 --end 2026-05-23 --annual-rate 0.031 --out-csv /path/to/interest.csv
scripts/merge_evidence_bundle.py
Use when evidence files are already grouped into 证据一_*, 证据二_*, 证据三_* folders.
Purpose:
- merge PDFs and images into one page-numbered evidence bundle;
- create cover pages for each evidence group;
- generate a catalog CSV with actual page ranges.
Example:
python3 scripts/merge_evidence_bundle.py /path/to/evidence_root --out-pdf /path/to/证据材料汇编.pdf --out-catalog /path/to/证据目录页码.csv --case-name 案件名称
When scripts produce CSV output, use the CSV to draft Word evidence catalogs, claim calculations, and attorney review notes.
scripts/scan_case_folder.py
Use at the beginning of /plan, evidence-first workflows, or when the case folder is large/chaotic.
Purpose:
- scan all files under the case folder;
- classify materials by filename/path keywords;
- identify likely duplicates by md5;
- output a CSV inventory and a Markdown planning report.
Example:
python3 scripts/scan_case_folder.py /path/to/case --out-csv /path/to/material_inventory.csv --out-md /path/to/material_scan_report.md
scripts/extract_docx_media.py
Use when WeChat/chat-record DOCX files contain embedded screenshots or images.
Purpose:
- extract embedded media from DOCX files;
- create a CSV index of extracted images;
- allow extracted images to be copied into evidence folders before running
merge_evidence_bundle.py.
Example:
python3 scripts/extract_docx_media.py /path/to/chat_records --out-dir /path/to/extracted_media --out-csv /path/to/docx_media_index.csv
scripts/quality_check_package.py
Use before final delivery of any generated filing package.
Purpose:
- detect unresolved placeholders such as
[待补充]and[缺失]; - detect inconsistent court names across Word documents;
- verify PDFs can be opened;
- warn when evidence catalog and evidence bundle are not both present.
Example:
python3 scripts/quality_check_package.py /path/to/output_package --out-csv /path/to/quality_check.csv
scripts/final_review_check.py
Use after generating a complaint/application, evidence catalog, and filing package. This is the script companion to the mandatory final review rule.
Purpose:
- create a CSV checklist for complaint/application and evidence-catalog review;
- detect unresolved placeholders;
- extract money amounts for consistency review;
- check whether complaint/application, evidence catalog, and evidence bundle exist;
- remind the lawyer/agent to review claim completeness, enforceability, evidence-to-claim mapping, judge-perspective risks, and opponent defenses.
Example:
python3 scripts/final_review_check.py /path/to/output_package --out-csv /path/to/final_review_check.csv
scripts/source_audit.py
Use when outputs include legal sources, PKULaw retrieval, URLs, statutes, judicial interpretations, local rules, or similar-case rules.
Purpose:
- scan Word/Markdown/CSV outputs for legal-source markers and URLs;
- verify whether a source table exists and has required fields;
- warn when legal conclusions appear without a source title, source URL, timeliness, or issue mapping;
- output CSV findings for final delivery and loop review.
Example:
python3 scripts/source_audit.py /path/to/output_package --out-csv /path/to/source_audit.csv --sources-csv /path/to/法源与引用核验表.csv
Reference Files
references/template-index.md: local template paths and when to use each category.references/litigation-strategy-standard.md: required depth and structure for high-quality litigation strategy analysis.references/output-package-checklist.md: suggested full-case output package by layer.references/process-communication-templates.md: fixed templates for case timeline, case facts memo, pending issues, task tracker, and communication files.references/legal-source-verification.md: PKULaw/source-URL verification, source table fields, and citation rules.references/loop-review-protocol.md: three-pass loop review method, log fields, and failure handling.references/internal-gates.md: material, legal, evidence, and delivery gates for complete-package quality control.
适用场景
整理一宗合同纠纷的立案材料并生成四包成果。
对拟提交法院的诉状、证据和法源引用执行最终检查。
输入材料
- 已脱敏的业务材料
- 案件或项目背景说明
- 律师整理的事实摘要
- 需要重点核验的问题清单
输出结果
将输入材料整理为便于复核的条目。
标记需要律师人工确认的信息。
提示使用中需要谨慎处理的内容。
使用说明
- 1
上传已脱敏的案件材料并说明办案目标。
- 2
确认执行计划及所需的联网、MCP、模板和代码权限。
- 3
根据质量检查日志补证、核验法源并由主办律师审定交付文件。
使用步骤
- 01
下载并解压 Skill 文件。
- 02
导入支持 Skill 的 AI 工具。
- 03
上传已脱敏的业务材料或粘贴文本。
- 04
运行 Skill 并检查结构化输出。
- 05
由律师复核事实、期限和法律依据。
注意事项
- 涉及客户、案件、身份、财务、医疗或商业秘密的材料,应先脱敏,并优先在受控的本地环境中处理。
- Skill 输出仅作为律师办案辅助;事实、证据、法律依据、期限、金额及对外文书必须由执业律师复核。
版本记录
首届深圳法律 AI Skills 创新应用大赛入围提交版本。
