Antu

io.github.zh-xxv0.9.0更新於 Oct 6, 2026

Legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page.

概覽

AI 產生的概覽

把描述法律事實、程序、關係或論證的 JSON 轉成一個可離線開啟的單檔 HTML 法律圖表頁面。

功能
Antu 把一份 JSON 文件轉換成一個自包含的 HTML 法律圖表。它提供結構描述查詢、指南、範例、驗證、版面、算繪與預覽等工具,支援四類圖表:關係圖、事實時間軸、程序流程圖與論證推理樹。輸出是約 2.3 MB 的單一檔案,不發出網路請求、不需要伺服器,可離線開啟、封存、列印或作為附件傳送。同一份 JSON 永遠產生同一張圖。
適用情境
適合助理已閱讀案件資料、需要把擷取出的事實、程序路徑、當事人關係或法律論證呈現為可重現圖表,用於歸檔、列印或分享的情境。適用於重視穩定離線產物而非互動式製圖的法律與案件分析工作流程。
執行需求
以 npm 套件 @zh-xx/antu 透過 stdio 在本機執行,通常用 npx 啟動。未宣告驗證、環境變數或標頭。README 的用法範例會安裝相依套件並對範例 JSON 檔案執行製圖指令。
安裝前請注意
專案處於 0.x 版本,關係圖與論證圖的格式仍為草案,這些結構描述可能變動。引擎會把 HTML 頁面寫在 JSON 檔案旁邊,因此會在磁碟上建立檔案。案件資料本身不會被綁入或連結,但 JSON 會記錄來源文件、頁碼與條文引用,這些資訊可能敏感。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Antu,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Antu 案图

[Verify]

中文 | English

Antu turns one JSON document into one self-contained HTML legal diagram. The page is one file of about 2.3 MB that makes no network request and needs no server; it opens offline and can be archived, printed or sent as an attachment. An AI Agent can read the case materials and write the JSON; the engine then draws the diagram from it, and the same JSON gives the same diagram. Antu is at version 0.x, and the formats of the relationship and justification diagrams are still drafts.

Diagram Types

Four types of legal content, each drawn in several ways. A selector in the page switches between the ways; nothing in the JSON chooses one.

Relationship diagrams show parties, roles and legal relationships; fact diagrams the time, the participants and how events went; procedure diagrams a procedural path and its branches; justification diagrams a conclusion drawn from norms and facts. The relationship and justification schemas are still drafts.

Three looks, called themes: document (black and white and square, for print and filing; the default), modern (rounded, pale) and legal (navy). The reader switches in the page, or a call fixes a page to one. Only the diagram is themed. See spec/theme.md.

Usage

bash
npm installnpm run diagram -- examples/fact/neighbour-corridor-charging.en.json

The page is written beside the JSON file. The interface language of a page is set with ?lang=en or ?lang=zh; the case content is never translated.

Principle

Agent ──> key information ──> one JSON ──> engine ──> diagram
RoleDoesDeterminism
Modelreads documents, extracts facts, understands meaningthe result may differ from run to run
Enginedraws the diagram according to the specificationthe same JSON gives the same diagram, whichever model wrote it
JSON specificationthe only interface between the twoversioned (see spec/versioning.md)

The engine does not write JSON, and the Agent does not draw. The model puts information into JSON; the engine draws. The JSON specification is a specification of its own, for four reasons:

  1. General-purpose charting syntax is built on nodes, edges and state machines, and has no place for procedural standing or the source of a piece of evidence.
  2. The diagram does not depend on which model extracted the information.
  3. The same JSON gives the same diagram at any time and in any environment, so a diagram handed to a court or to the other side can be reproduced.
  4. The source is recorded when the facts are extracted: each fact states the document, the page and the provision it rests on, and the diagram shows them. The materials themselves are neither bundled nor linked.

Agent Integration

The reference material for an Agent, for the fact diagram, is a field table of about 3.3k characters and a mechanism note of about 5.8k characters.

Skill

npx skills add zh-xx/Antu -g

The Skill is in skills/antu/; each release also carries it as antu-skill-<version>.zip.

MCP

The MCP server is the npm package @zh-xx/antu, registered as io.github.zh-xx/antu in the MCP registry.

json
{  "mcpServers": {    "antu": {      "command": "npx",      "args": ["-y", "-p", "@zh-xx/antu", "antu-mcp"]    }  }}

Tools: antu_schema, antu_guide, antu_examples, antu_validate, antu_layout, antu_render, antu_preview.

Documentation

License

Copyright (C) 2026 Ji Cheng.

Antu is free software, licensed under the GNU Affero General Public License, version 3 or any later version (LICENSE, SPDX AGPL-3.0-or-later). In short: you may use, study, change and share it, including for commercial purposes. If you distribute a changed version, or let others use it over a network (for example as a hosted service), you must release your changes under the same licence, keep the copyright and licence notices, and make the source available. There is no warranty. This summary is not the licence; the licence text is.

  • Additional permission (AGPL section 7). A page made with Antu contains Antu's code together with the diagram data you gave it. The diagram data, and the content of the diagram you drew from your material, are not part of Antu and are not covered by this licence: you may keep them private, publish them, or sell them on any terms you like. The licence covers Antu's code in the page, and the notices in the page must stay with it. The same text is in every page and at the top of the command line.
  • Everything in the repository (the code, the examples, the specifications and the guides) is under the same licence, except what is named below.
  • Code of other projects inside the pages and the command line keeps its own licence. Its notices are in skills/antu/THIRD-PARTY-NOTICES.md, and also inside every page and at the top of the command line, together with the licence of Antu and the place of the source of that version.
  • The cases in examples/ and the judgment texts in examples/raw/ are fictional: the people, companies, dates, amounts and provisions are made up for Antu and match no real case. They are under the same licence.
  • Versions up to 0.5.0 were published without a licence file. The licence applies from 0.5.1.

來源:README.md,提交 b49240a

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.9.0最新Oct 6, 2026