Loading...
Loading...
Guide the Agent to consolidate case facts, legal provisions, court judgments, issues, parties, evidence, contract obligation relationships (Three-layer Model of Contract → Clause → Obligation, including Risk Rating Color Coding), and constitutive element subsumption results (Law → Element → Fact Subsumption Color Coding), generate superset legal relationship graph data compatible with law-powers' index.html/data.js, and write it into data.js.
npx skill4agent add kevintsai1202/law-powers legal-graphindex.htmldata.jslaw-powersdata.jswindow.GRAPH_DATAgraph TD
Step1["Step 1: Identify Graph Nodes"]
Step2["Step 2: Establish Legal Relationship Connections (Edges)"]
Step3["Step 3: Assemble and Write to data.js"]
Step1 --> Step2
Step2 --> Step3Complete Extraction Methodology: For how to extract data from existing skill outputs for each dimension (including the judgment criteria for 5 types of legal provision associations), please refer to references/superset-extraction.md. When generating the graph, the Agent should follow the "union principle" to capture all the following dimensions as much as possible; if data is insufficient, only the basic 4 categories (see backward compatibility statement at the end of this section) need to be output.rel
Prioritize Structured Data: If case judgments come from thereturn ofdr-lawbot:search_bundle, prioritize reading the structured fields of the bundle to build the graph instead of inferring only from prose:legal-research
→ Createcited_articlesnodes one by one, and connect the judgment to the legal provision with a "citation" edge.law /case_history.upper→ Connect previous and subsequent trial judgments with an "appeal" edge; if the trial record shows that the judgment "contains reversal in the main text", mark the judgment node withlower(see point 3 of this section and the example in Step 3)."overturned": true → Used as the judgment node label.citation_text- Only create judgment nodes for judgments within
to avoid hallucinated citations.allowed_citations
Data Source for Contract Obligation Relationships: When constructing the contract graph (/contract/clause), extract parties, clauses, and obligation structures from the original contract provided by the user; if theobligationcontract review has been executed, must map its risk assessment report into the graph—create acompliance-verificationnode for each reviewed clause, map risk ratings 🔴→clause, 🟡→"risk": "high", 🟢→"risk": "medium", and write the "original reviewed clause text/risk points/revision suggestions" from the report into the node's"risk": "low". Unreviewed clauses should not be marked withdescription(rendered in neutral color), and risk ratings must not be speculated arbitrarily.risk
legal-brainstorminglegal-researchidtitledescriptionfact"id": "fact_1", "label": "Daan District Traffic Accident", "group": "fact"law"id": "law_civ_184", "label": "Article 184, Paragraph 1 of the Civil Code", "group": "law"judgment"id": "jud_supreme_108_2345", "label": "Supreme Court Judgment No. 2345 of 2019", "group": "judgment"statusgoodbadmixedstatusTexturloverturnedtrueindex.htmlissue"id": "claim_compensation", "label": "Claim Compensation of NT$500,000", "group": "issue"party"id": "party_1", "label": "Defendant XX Technology Co., Ltd.", "group": "party"rolejudgmentfactcontractplaintiff"id": "plaintiff_1", "label": "Plaintiff XX", "group": "plaintiff"partyjudgmentfactevidence"id": "evi_1", "label": "Surveillance Camera Footage", "group": "evidence", "favorable": "strong", "description": "Captures the moment the defendant ran a red light, extremely probative"favorablestrongweakjudgmentfactcontract"id": "c1", "label": "Software Development Commission Contract", "group": "contract"partyroleclauseclause"id": "cl4", "label": "§9 Liquidated Damages", "group": "clause", "risk": "high"riskhighmediumlowcompliance-verificationhighmediumlowindex.htmldescriptionobligation"id": "o1", "label": "Deliver Software Results", "group": "obligation", "duty": "main"dutymaincollateralincidentalindex.htmlelementlegal-element-analysis"id": "e_1", "label": "Adequate Causation", "group": "element", "met": "unknown"metyesnounknownindex.htmldescriptionmetlegal-element-analysisfamilyindex.htmlfactlawjudgmentissuepartyplaintiffevidencefamilyindex.htmlstatusurloverturnedjudgmentcontractclauseobligationelementjudgmentissuefamilylabelindex.html"Applies""Cites""Civil Incidental to Criminal (Civil Attachment)""Appeals""Joint and Several Liability/Guarantee""Defense/Block""Preservation/Preliminary Attachment""Legal Provision Association"lawlawreltriggeraltabsorblexbridgetitle"Party"partyplaintiffjudgmentfactcontract"Evidence"judgmentfactevidence"Contains"contractclause"Imposes"clauseobligation"Bears"partyobligation"Entitled to Claim"obligationparty"Consideration"obligationobligation"Breach Effect"clauseobligation"Applies"contractclauselaw"Joint and Several Liability/Guarantee"partyobligationlegal-element-analysis"Element"lawelement"Subsumes"factelementmet"Element Determination"judgmentelementtitlestanceproconmetmetallowed_citations"Evidence"elementevidenceevidencefavorable{nodes, edges}```json///* */{
"nodes": [
{ "id": "fact_id", "label": "Node Title", "group": "fact", "title": "Mouse Hover Brief Description", "description": "Detailed Description (Markdown Supported)" },
{ "id": "law_id", "label": "Legal Provision Name", "group": "law", "title": "Mouse Hover Brief Description", "description": "Original Provision Text or Summary" },
{ "id": "jud_id", "label": "Judgment Number", "group": "judgment", "title": "Mouse Hover Brief Description", "description": "Judgment Gist", "status": "good", "url": "https://Full Judgment Link", "family": "Case Family Name" },
{ "id": "issue_id", "label": "Issue Title", "group": "issue", "title": "Mouse Hover Brief Description", "description": "Issue Explanation" },
{ "id": "party_id", "label": "Defendant Name", "group": "party", "family": "Case Family Name" },
{ "id": "plaintiff_id", "label": "Plaintiff Name", "group": "plaintiff" },
{ "id": "evi_id", "label": "Evidence Name", "group": "evidence", "title": "Mouse Hover Brief Description", "description": "Probative Value Explanation", "favorable": "strong" },
{ "id": "contract_id", "label": "Contract Name", "group": "contract", "title": "Mouse Hover Brief Description", "description": "Contract Summary", "family": "Contract Cluster Name" },
{ "id": "clause_id", "label": "§3 Delivery Deadline", "group": "clause", "title": "Mouse Hover Brief Description", "description": "[Original Clause Text]…\n\n[Risk Analysis]…\n\n[Revision Suggestions]…", "risk": "medium" },
{ "id": "clause_penalty_id", "label": "§9 Liquidated Damages", "group": "clause", "title": "Mouse Hover Brief Description", "description": "[Original Clause Text]…\n\n[Risk Analysis]…\n\n[Revision Suggestions]…", "risk": "high" },
{ "id": "obligation_id", "label": "Deliver Work Results", "group": "obligation", "title": "Mouse Hover Brief Description", "description": "Obligation Content Explanation", "duty": "main" },
{ "id": "obligation_id_2", "label": "Pay Remuneration", "group": "obligation", "title": "Mouse Hover Brief Description", "description": "Obligation Content Explanation", "duty": "main" },
{ "id": "party_a_id", "label": "Contract Party A Name", "group": "party", "role": "Party A (Principal)" },
{ "id": "element_id", "label": "Adequate Causation", "group": "element", "title": "△ Fact Unclear", "description": "Element Connotation and Basis + Corresponding Facts of Current Case", "met": "unknown" }
],
"edges": [
{ "from": "from_id", "to": "to_id", "label": "Relationship Category", "title": "Specific Legal Explanation of Relationship" },
{ "from": "law_id", "to": "law_id_2", "label": "Legal Provision Association", "title": "Explanation of Systematic Relationship Between Two Provisions", "rel": "trigger" },
{ "from": "party_id", "to": "jud_id", "label": "Party" },
{ "from": "jud_id", "to": "evi_id", "label": "Evidence" },
{ "from": "party_a_id", "to": "contract_id", "label": "Party", "title": "Party A (Principal)" },
{ "from": "contract_id", "to": "clause_id", "label": "Contains" },
{ "from": "contract_id", "to": "clause_penalty_id", "label": "Contains" },
{ "from": "clause_id", "to": "obligation_id", "label": "Imposes" },
{ "from": "party_id", "to": "obligation_id", "label": "Bears", "title": "Party B is the Debtor of This Obligation" },
{ "from": "obligation_id", "to": "party_a_id", "label": "Entitled to Claim", "title": "Party A is the Creditor of This Obligation" },
{ "from": "obligation_id", "to": "obligation_id_2", "label": "Consideration", "title": "Mutually Corresponding Payment Obligations in Bilateral Contract" },
{ "from": "clause_penalty_id", "to": "obligation_id", "label": "Breach Effect", "title": "Breaching Delivery Obligation Triggers Liquidated Damages Clause" },
{ "from": "law_id", "to": "element_id", "label": "Element", "title": "Disassembled from Provision Text" },
{ "from": "fact_id", "to": "element_id", "label": "Subsumes", "title": "Explanation of Current Case Facts Corresponding to This Element" },
{ "from": "element_id", "to": "evi_id", "label": "Evidence", "title": "To Be Supplemented: Evidence That Can Support This Element" },
{ "from": "jud_id", "to": "element_id", "label": "Element Determination", "title": "Gist of Judgment's Determination of This Element (Determination of Another Case, Does Not Affect Current Case's met)" }
]
}case_historyjudgment"overturned": trueindex.html{ "id": "jud_x", "label": "Taiwan XX District Court Judgment No. 1 of 2019 (Overturned)", "group": "judgment", "overturned": true, "title": "This Judgment Has Been Overturned by a Higher Court, Only for Reference in Trial-Level Relationships" }{nodes, edges}data.jswindow.GRAPH_DATA = { "nodes": [...], "edges": [...] };index-3d-src.htmlscripts/inline_libs.pydata.jsindex.htmlrenderer/data.jsrenderer/index.html"Graph data has been written to. Please directly open<Full Actual Writing Path>with a WebGL-supported browser (self-contained single file, usable offline), and the page will automatically read and render it. To update the graph, simply overwrite the<Full Corresponding index.html Path>with newdata.jsand refresh the page;{nodes, edges}is a packaged product, please do not edit it manually."index.html