
Antu
io.github.zh-xxv0.9.0更新于 Oct 6, 2026
Legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page.
概览
把描述法律事实、程序、关系或论证的 JSON 转成一个可离线打开的单文件 HTML 法律图表页面。
- 功能
- Antu 把一份 JSON 文档转换成一个自包含的 HTML 法律图表。它提供模式查询、指南、示例、校验、布局、渲染和预览等工具,支持四类图表:关系图、事实时间线、程序流程图和论证推理树。输出是约 2.3 MB 的单个文件,不发起网络请求、不需要服务器,可离线打开、归档、打印或作为附件发送。同一份 JSON 始终生成同一张图。
- 适用场景
- 适合助手已阅读案件材料、需要把提取出的事实、程序路径、当事人关系或法律论证呈现为可复现图表,用于归档、打印或分享的场景。适用于重视稳定离线产物而非交互式制图的法律与案件分析工作流。
- 运行要求
- 以 npm 包 @zh-xx/antu 通过 stdio 在本地运行,通常用 npx 启动。未声明认证、环境变量或请求头。README 的用法示例会安装依赖并对示例 JSON 文件运行制图命令。
安装
在 SourceWeft 中
- 打开 控制台中的 Antu,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Antu 案图
中文 | 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
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
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:
- 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.
- The diagram does not depend on which model extracted the information.
- 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.
- 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
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.
Tools: antu_schema, antu_guide, antu_examples, antu_validate, antu_layout, antu_render, antu_preview.
Documentation
- Design documents for people, under
spec/: architecture, the source types, themes, the MCP server, and the diagrams (fact, procedure, relationship, justification). The notes for Agents are underspec/agent/. - CHANGELOG.md and the versioning rules in spec/versioning.md.
- Known problems and requests are tracked as GitHub issues. Working rules for contributors are in CONTRIBUTING.md.
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 inexamples/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- v0.9.0最新Oct 6, 2026


