@zh-xx/antu 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +11 -0
  3. package/THIRD-PARTY-NOTICES.md +739 -0
  4. package/assets/viewer.html +1503 -0
  5. package/bin/antu-mcp.mjs +1549 -0
  6. package/bin/antu.mjs +1494 -0
  7. package/examples/agent/fact/1-minimal.en.json +57 -0
  8. package/examples/agent/fact/1-minimal.zh-CN.json +29 -0
  9. package/examples/agent/fact/2-single-actor.en.json +66 -0
  10. package/examples/agent/fact/2-single-actor.zh-CN.json +28 -0
  11. package/examples/agent/fact/3-groups.en.json +34 -0
  12. package/examples/agent/fact/3-groups.zh-CN.json +34 -0
  13. package/examples/agent/fact/4-views.en.json +44 -0
  14. package/examples/agent/fact/4-views.zh-CN.json +44 -0
  15. package/examples/agent/fact/5-duration.en.json +28 -0
  16. package/examples/agent/fact/5-duration.zh-CN.json +28 -0
  17. package/examples/agent/fact/6-sources.en.json +30 -0
  18. package/examples/agent/fact/6-sources.zh-CN.json +30 -0
  19. package/examples/agent/fact/7-undated.en.json +34 -0
  20. package/examples/agent/fact/7-undated.zh-CN.json +34 -0
  21. package/examples/agent/justification/1-minimal.en.json +83 -0
  22. package/examples/agent/justification/1-minimal.zh-CN.json +83 -0
  23. package/examples/agent/justification/2-against-and-rejected.en.json +82 -0
  24. package/examples/agent/justification/2-against-and-rejected.zh-CN.json +82 -0
  25. package/examples/agent/justification/3-issues.en.json +107 -0
  26. package/examples/agent/justification/3-issues.zh-CN.json +107 -0
  27. package/examples/agent/justification/4-shared-fact.en.json +111 -0
  28. package/examples/agent/justification/4-shared-fact.zh-CN.json +111 -0
  29. package/examples/agent/justification/5-sources.en.json +97 -0
  30. package/examples/agent/justification/5-sources.zh-CN.json +97 -0
  31. package/examples/agent/justification/6-all-or-any.en.json +98 -0
  32. package/examples/agent/justification/6-all-or-any.zh-CN.json +98 -0
  33. package/examples/agent/procedure/1-minimal.en.json +15 -0
  34. package/examples/agent/procedure/1-minimal.zh-CN.json +15 -0
  35. package/examples/agent/procedure/2-decision.en.json +17 -0
  36. package/examples/agent/procedure/2-decision.zh-CN.json +17 -0
  37. package/examples/agent/procedure/3-branches.en.json +22 -0
  38. package/examples/agent/procedure/3-branches.zh-CN.json +22 -0
  39. package/examples/agent/procedure/4-stages.en.json +34 -0
  40. package/examples/agent/procedure/4-stages.zh-CN.json +34 -0
  41. package/examples/agent/procedure/5-inferred-spine.en.json +21 -0
  42. package/examples/agent/procedure/5-inferred-spine.zh-CN.json +21 -0
  43. package/examples/agent/procedure/6-merged-edges.en.json +19 -0
  44. package/examples/agent/procedure/6-merged-edges.zh-CN.json +19 -0
  45. package/examples/agent/procedure/7-rules.en.json +30 -0
  46. package/examples/agent/procedure/7-rules.zh-CN.json +30 -0
  47. package/examples/agent/relationship/1-minimal.en.json +28 -0
  48. package/examples/agent/relationship/1-minimal.zh-CN.json +28 -0
  49. package/examples/agent/relationship/2-equity.en.json +59 -0
  50. package/examples/agent/relationship/2-equity.zh-CN.json +59 -0
  51. package/examples/agent/relationship/3-guarantee.en.json +51 -0
  52. package/examples/agent/relationship/3-guarantee.zh-CN.json +51 -0
  53. package/examples/agent/relationship/4-groups.en.json +68 -0
  54. package/examples/agent/relationship/4-groups.zh-CN.json +68 -0
  55. package/examples/agent/relationship/5-kinship.en.json +69 -0
  56. package/examples/agent/relationship/5-kinship.zh-CN.json +69 -0
  57. package/examples/fact/fang-yuan-loan-and-conflict.en.json +330 -0
  58. package/examples/fact/fang-yuan-loan-and-conflict.zh-CN.json +237 -0
  59. package/examples/fact/gym-membership-face-scan.en.json +181 -0
  60. package/examples/fact/gym-membership-face-scan.zh-CN.json +181 -0
  61. package/examples/fact/lin-fang-v-zhao-lei-private-lending.en.json +122 -0
  62. package/examples/fact/lin-fang-v-zhao-lei-private-lending.zh-CN.json +122 -0
  63. package/examples/fact/marketplace-platform-liability.en.json +192 -0
  64. package/examples/fact/marketplace-platform-liability.zh-CN.json +192 -0
  65. package/examples/fact/neighbour-corridor-charging.en.json +201 -0
  66. package/examples/fact/neighbour-corridor-charging.zh-CN.json +201 -0
  67. package/examples/fact/sample-construction-payment.en.json +220 -0
  68. package/examples/fact/sample-construction-payment.zh-CN.json +139 -0
  69. package/examples/fact/sample-four-parties-four-slots.en.json +202 -0
  70. package/examples/fact/sample-four-parties-four-slots.zh-CN.json +121 -0
  71. package/examples/fact/sample-no-groups.en.json +100 -0
  72. package/examples/fact/sample-no-groups.zh-CN.json +100 -0
  73. package/examples/fact/sample-three-slots.en.json +102 -0
  74. package/examples/fact/sample-three-slots.zh-CN.json +102 -0
  75. package/examples/fact/sample-two-actors-one-side.en.json +143 -0
  76. package/examples/fact/sample-two-actors-one-side.zh-CN.json +143 -0
  77. package/examples/fact/sample-two-parties-each-side.en.json +183 -0
  78. package/examples/fact/sample-two-parties-each-side.zh-CN.json +183 -0
  79. package/examples/justification/fang-yuan-defense-excess.en.json +636 -0
  80. package/examples/justification/fang-yuan-defense-excess.zh-CN.json +636 -0
  81. package/examples/justification/neighbour-corridor-liability.en.json +571 -0
  82. package/examples/justification/neighbour-corridor-liability.zh-CN.json +571 -0
  83. package/examples/procedure/01-software-development-contract.en.json +290 -0
  84. package/examples/procedure/01-software-development-contract.zh-CN.json +290 -0
  85. package/examples/procedure/02-purchase-contract.en.json +46 -0
  86. package/examples/procedure/02-purchase-contract.zh-CN.json +46 -0
  87. package/examples/procedure/03-labour-outsourcing-contract.en.json +251 -0
  88. package/examples/procedure/03-labour-outsourcing-contract.zh-CN.json +251 -0
  89. package/examples/procedure/04-non-disclosure-agreement.en.json +79 -0
  90. package/examples/procedure/04-non-disclosure-agreement.zh-CN.json +79 -0
  91. package/examples/procedure/05-premises-lease.en.json +344 -0
  92. package/examples/procedure/05-premises-lease.zh-CN.json +344 -0
  93. package/examples/procedure/06-epc-general-contract.en.json +375 -0
  94. package/examples/procedure/06-epc-general-contract.zh-CN.json +375 -0
  95. package/examples/procedure/07-share-acquisition-agreement.en.json +368 -0
  96. package/examples/procedure/07-share-acquisition-agreement.zh-CN.json +368 -0
  97. package/examples/raw//351/207/207/350/264/255/345/220/210/345/220/214-PO-2026-088.md +31 -0
  98. package/examples/raw//357/274/2102031/357/274/211/347/244/272/345/210/221/345/210/2353/345/217/267-/350/231/232/346/236/204/347/275/221/347/273/234/345/225/206/345/237/216/346/241/210-/344/270/200/345/256/241.md +36 -0
  99. package/examples/raw//357/274/2102031/357/274/211/347/244/272/346/260/221/345/210/2351/345/217/267-/346/260/221/351/227/264/345/200/237/350/264/267/346/241/210-/344/270/200/345/256/241.md +31 -0
  100. package/examples/raw//357/274/2102031/357/274/211/347/244/272/346/260/221/345/210/2352/345/217/267-/345/201/245/350/272/253/346/210/277/345/210/267/350/204/270/345/205/245/345/234/272/346/241/210-/344/270/200/345/256/241.md +40 -0
  101. package/examples/raw//357/274/2102031/357/274/211/347/244/272/346/260/221/347/273/2101/345/217/267-/346/245/274/351/201/223/345/205/205/347/224/265/345/212/235/351/230/273/346/241/210-/344/272/214/345/256/241.md +38 -0
  102. package/examples/raw//357/274/2102032/357/274/211/347/244/272/345/210/221/347/273/2101/345/217/267-/346/226/271/350/277/234/346/241/210-/344/272/214/345/256/241.md +49 -0
  103. package/examples/relationship/fang-yuan-parties.en.json +226 -0
  104. package/examples/relationship/fang-yuan-parties.zh-CN.json +226 -0
  105. package/examples/relationship/lin-fang-v-zhao-lei-parties.en.json +140 -0
  106. package/examples/relationship/lin-fang-v-zhao-lei-parties.zh-CN.json +140 -0
  107. package/examples/relationship/marketplace-parties.en.json +259 -0
  108. package/examples/relationship/marketplace-parties.zh-CN.json +259 -0
  109. package/examples/relationship/sample-group-guarantee.en.json +138 -0
  110. package/examples/relationship/sample-group-guarantee.zh-CN.json +138 -0
  111. package/examples/relationship/sample-loan-guarantee.en.json +122 -0
  112. package/examples/relationship/sample-loan-guarantee.zh-CN.json +122 -0
  113. package/package.json +35 -0
  114. package/server.json +20 -0
  115. package/spec/agent/fact/guide.md +114 -0
  116. package/spec/agent/justification/guide.md +100 -0
  117. package/spec/agent/procedure/guide.md +109 -0
  118. package/spec/agent/relationship/guide.md +92 -0
@@ -0,0 +1,138 @@
1
+ {
2
+ "type": "relationship",
3
+ "specVersion": 1,
4
+ "title": "Xinghe Group · Shareholdings and guarantees",
5
+ "asOf": "2024-06-30",
6
+ "groups": [
7
+ {
8
+ "id": "g-1",
9
+ "label": "Plaintiff side"
10
+ },
11
+ {
12
+ "id": "g-2",
13
+ "label": "Defendant side"
14
+ }
15
+ ],
16
+ "entities": [
17
+ {
18
+ "id": "e-1",
19
+ "kind": "company",
20
+ "label": "Huafeng Investment Co.",
21
+ "role": "Lender",
22
+ "groupId": "g-1"
23
+ },
24
+ {
25
+ "id": "e-2",
26
+ "kind": "person",
27
+ "label": "Mr. Chen",
28
+ "role": "Huafeng's controlling shareholder",
29
+ "groupId": "g-1"
30
+ },
31
+ {
32
+ "id": "e-3",
33
+ "kind": "company",
34
+ "label": "Xinghe Group Co.",
35
+ "role": "Borrower",
36
+ "groupId": "g-2"
37
+ },
38
+ {
39
+ "id": "e-4",
40
+ "kind": "person",
41
+ "label": "Li Ming",
42
+ "role": "Chairman of Xinghe Group",
43
+ "groupId": "g-2"
44
+ },
45
+ {
46
+ "id": "e-5",
47
+ "kind": "company",
48
+ "label": "Xinghe Trading Co.",
49
+ "groupId": "g-2"
50
+ },
51
+ {
52
+ "id": "e-6",
53
+ "kind": "company",
54
+ "label": "Xinghe Logistics Co.",
55
+ "groupId": "g-2"
56
+ },
57
+ {
58
+ "id": "e-7",
59
+ "kind": "organization",
60
+ "label": "Rong'an Guarantee Co.",
61
+ "role": "Guarantor"
62
+ },
63
+ {
64
+ "id": "e-8",
65
+ "kind": "government",
66
+ "label": "Municipal Market Regulation Bureau",
67
+ "role": "Registration authority"
68
+ }
69
+ ],
70
+ "relations": [
71
+ {
72
+ "id": "r-1",
73
+ "from": "e-2",
74
+ "to": "e-1",
75
+ "kind": "equity",
76
+ "share": 70
77
+ },
78
+ {
79
+ "id": "r-2",
80
+ "from": "e-4",
81
+ "to": "e-3",
82
+ "kind": "equity",
83
+ "share": 55
84
+ },
85
+ {
86
+ "id": "r-3",
87
+ "from": "e-3",
88
+ "to": "e-5",
89
+ "kind": "equity",
90
+ "share": 100
91
+ },
92
+ {
93
+ "id": "r-4",
94
+ "from": "e-3",
95
+ "to": "e-6",
96
+ "kind": "equity",
97
+ "share": 80
98
+ },
99
+ {
100
+ "id": "r-5",
101
+ "from": "e-1",
102
+ "to": "e-3",
103
+ "kind": "debt",
104
+ "amount": "CNY 30,000,000",
105
+ "label": "Loan"
106
+ },
107
+ {
108
+ "id": "r-6",
109
+ "from": "e-7",
110
+ "to": "e-1",
111
+ "kind": "guarantee",
112
+ "label": "Joint and several guarantee",
113
+ "secures": "r-5"
114
+ },
115
+ {
116
+ "id": "r-7",
117
+ "from": "e-4",
118
+ "to": "e-1",
119
+ "kind": "guarantee",
120
+ "label": "Personal joint and several guarantee",
121
+ "secures": "r-5"
122
+ },
123
+ {
124
+ "id": "r-8",
125
+ "from": "e-3",
126
+ "to": "e-7",
127
+ "kind": "contract",
128
+ "label": "Counter-guarantee contract"
129
+ },
130
+ {
131
+ "id": "r-9",
132
+ "from": "e-8",
133
+ "to": "e-3",
134
+ "kind": "other",
135
+ "label": "Registration"
136
+ }
137
+ ]
138
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "type": "relationship",
3
+ "specVersion": 1,
4
+ "title": "星河集团股权与担保",
5
+ "asOf": "2024-06-30",
6
+ "groups": [
7
+ {
8
+ "id": "g-1",
9
+ "label": "原告方"
10
+ },
11
+ {
12
+ "id": "g-2",
13
+ "label": "被告方"
14
+ }
15
+ ],
16
+ "entities": [
17
+ {
18
+ "id": "e-1",
19
+ "kind": "company",
20
+ "label": "华峰投资有限公司",
21
+ "role": "出借人",
22
+ "groupId": "g-1"
23
+ },
24
+ {
25
+ "id": "e-2",
26
+ "kind": "person",
27
+ "label": "陈总",
28
+ "role": "华峰实际控制人",
29
+ "groupId": "g-1"
30
+ },
31
+ {
32
+ "id": "e-3",
33
+ "kind": "company",
34
+ "label": "星河集团有限公司",
35
+ "role": "借款人",
36
+ "groupId": "g-2"
37
+ },
38
+ {
39
+ "id": "e-4",
40
+ "kind": "person",
41
+ "label": "李明",
42
+ "role": "星河集团董事长",
43
+ "groupId": "g-2"
44
+ },
45
+ {
46
+ "id": "e-5",
47
+ "kind": "company",
48
+ "label": "星河商贸有限公司",
49
+ "groupId": "g-2"
50
+ },
51
+ {
52
+ "id": "e-6",
53
+ "kind": "company",
54
+ "label": "星河物流有限公司",
55
+ "groupId": "g-2"
56
+ },
57
+ {
58
+ "id": "e-7",
59
+ "kind": "organization",
60
+ "label": "融安担保公司",
61
+ "role": "保证人"
62
+ },
63
+ {
64
+ "id": "e-8",
65
+ "kind": "government",
66
+ "label": "市市场监督管理局",
67
+ "role": "登记机关"
68
+ }
69
+ ],
70
+ "relations": [
71
+ {
72
+ "id": "r-1",
73
+ "from": "e-2",
74
+ "to": "e-1",
75
+ "kind": "equity",
76
+ "share": 70
77
+ },
78
+ {
79
+ "id": "r-2",
80
+ "from": "e-4",
81
+ "to": "e-3",
82
+ "kind": "equity",
83
+ "share": 55
84
+ },
85
+ {
86
+ "id": "r-3",
87
+ "from": "e-3",
88
+ "to": "e-5",
89
+ "kind": "equity",
90
+ "share": 100
91
+ },
92
+ {
93
+ "id": "r-4",
94
+ "from": "e-3",
95
+ "to": "e-6",
96
+ "kind": "equity",
97
+ "share": 80
98
+ },
99
+ {
100
+ "id": "r-5",
101
+ "from": "e-1",
102
+ "to": "e-3",
103
+ "kind": "debt",
104
+ "amount": "人民币 3000 万元",
105
+ "label": "借款"
106
+ },
107
+ {
108
+ "id": "r-6",
109
+ "from": "e-7",
110
+ "to": "e-1",
111
+ "kind": "guarantee",
112
+ "label": "连带责任保证",
113
+ "secures": "r-5"
114
+ },
115
+ {
116
+ "id": "r-7",
117
+ "from": "e-4",
118
+ "to": "e-1",
119
+ "kind": "guarantee",
120
+ "label": "个人连带保证",
121
+ "secures": "r-5"
122
+ },
123
+ {
124
+ "id": "r-8",
125
+ "from": "e-3",
126
+ "to": "e-7",
127
+ "kind": "contract",
128
+ "label": "反担保合同"
129
+ },
130
+ {
131
+ "id": "r-9",
132
+ "from": "e-8",
133
+ "to": "e-3",
134
+ "kind": "other",
135
+ "label": "登记"
136
+ }
137
+ ]
138
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "type": "relationship",
3
+ "specVersion": 1,
4
+ "title": "Zhang San v. Li Si · Parties and relations",
5
+ "asOf": "2023-03-10",
6
+ "groups": [
7
+ {
8
+ "id": "g-1",
9
+ "label": "Creditor side"
10
+ },
11
+ {
12
+ "id": "g-2",
13
+ "label": "Debtor side"
14
+ }
15
+ ],
16
+ "entities": [
17
+ {
18
+ "id": "e-1",
19
+ "kind": "person",
20
+ "label": "Zhang San",
21
+ "role": "Lender",
22
+ "groupId": "g-1"
23
+ },
24
+ {
25
+ "id": "e-2",
26
+ "kind": "person",
27
+ "label": "Li Si",
28
+ "role": "Borrower",
29
+ "groupId": "g-2"
30
+ },
31
+ {
32
+ "id": "e-3",
33
+ "kind": "person",
34
+ "label": "Wang Wu",
35
+ "role": "Guarantor",
36
+ "groupId": "g-2"
37
+ },
38
+ {
39
+ "id": "e-4",
40
+ "kind": "company",
41
+ "label": "Xinghe Trading Co.",
42
+ "groupId": "g-2"
43
+ },
44
+ {
45
+ "id": "e-5",
46
+ "kind": "person",
47
+ "label": "Zhao Liu",
48
+ "role": "Li Si's spouse",
49
+ "groupId": "g-2"
50
+ }
51
+ ],
52
+ "relations": [
53
+ {
54
+ "id": "r-1",
55
+ "from": "e-1",
56
+ "to": "e-2",
57
+ "kind": "debt",
58
+ "label": "Loan",
59
+ "amount": "CNY 500,000",
60
+ "sourceIds": [
61
+ "s-1"
62
+ ]
63
+ },
64
+ {
65
+ "id": "r-2",
66
+ "from": "e-3",
67
+ "to": "e-1",
68
+ "kind": "guarantee",
69
+ "label": "Joint and several guarantee",
70
+ "secures": "r-1",
71
+ "sourceIds": [
72
+ "s-2"
73
+ ]
74
+ },
75
+ {
76
+ "id": "r-3",
77
+ "from": "e-2",
78
+ "to": "e-4",
79
+ "kind": "equity",
80
+ "share": 60,
81
+ "sourceIds": [
82
+ "s-3"
83
+ ]
84
+ },
85
+ {
86
+ "id": "r-4",
87
+ "from": "e-2",
88
+ "to": "e-5",
89
+ "kind": "kinship",
90
+ "label": "Spouses"
91
+ }
92
+ ],
93
+ "sources": [
94
+ {
95
+ "id": "s-1",
96
+ "type": "contract",
97
+ "name": "Loan contract",
98
+ "loc": {
99
+ "file": "loan-contract.pdf",
100
+ "page": 1
101
+ }
102
+ },
103
+ {
104
+ "id": "s-2",
105
+ "type": "contract",
106
+ "name": "Guarantee contract",
107
+ "loc": {
108
+ "file": "guarantee.pdf",
109
+ "page": 1
110
+ }
111
+ },
112
+ {
113
+ "id": "s-3",
114
+ "type": "evidence",
115
+ "name": "Business registration record",
116
+ "loc": {
117
+ "file": "registry.pdf",
118
+ "page": 2
119
+ }
120
+ }
121
+ ]
122
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "type": "relationship",
3
+ "specVersion": 1,
4
+ "title": "张三诉李四 · 当事方及其关系",
5
+ "asOf": "2023-03-10",
6
+ "groups": [
7
+ {
8
+ "id": "g-1",
9
+ "label": "债权人一方"
10
+ },
11
+ {
12
+ "id": "g-2",
13
+ "label": "债务人一方"
14
+ }
15
+ ],
16
+ "entities": [
17
+ {
18
+ "id": "e-1",
19
+ "kind": "person",
20
+ "label": "张三",
21
+ "role": "出借人",
22
+ "groupId": "g-1"
23
+ },
24
+ {
25
+ "id": "e-2",
26
+ "kind": "person",
27
+ "label": "李四",
28
+ "role": "借款人",
29
+ "groupId": "g-2"
30
+ },
31
+ {
32
+ "id": "e-3",
33
+ "kind": "person",
34
+ "label": "王五",
35
+ "role": "保证人",
36
+ "groupId": "g-2"
37
+ },
38
+ {
39
+ "id": "e-4",
40
+ "kind": "company",
41
+ "label": "星河商贸有限公司",
42
+ "groupId": "g-2"
43
+ },
44
+ {
45
+ "id": "e-5",
46
+ "kind": "person",
47
+ "label": "赵六",
48
+ "role": "李四之妻",
49
+ "groupId": "g-2"
50
+ }
51
+ ],
52
+ "relations": [
53
+ {
54
+ "id": "r-1",
55
+ "from": "e-1",
56
+ "to": "e-2",
57
+ "kind": "debt",
58
+ "label": "借款",
59
+ "amount": "人民币 50 万元",
60
+ "sourceIds": [
61
+ "s-1"
62
+ ]
63
+ },
64
+ {
65
+ "id": "r-2",
66
+ "from": "e-3",
67
+ "to": "e-1",
68
+ "kind": "guarantee",
69
+ "label": "连带责任保证",
70
+ "secures": "r-1",
71
+ "sourceIds": [
72
+ "s-2"
73
+ ]
74
+ },
75
+ {
76
+ "id": "r-3",
77
+ "from": "e-2",
78
+ "to": "e-4",
79
+ "kind": "equity",
80
+ "share": 60,
81
+ "sourceIds": [
82
+ "s-3"
83
+ ]
84
+ },
85
+ {
86
+ "id": "r-4",
87
+ "from": "e-2",
88
+ "to": "e-5",
89
+ "kind": "kinship",
90
+ "label": "夫妻"
91
+ }
92
+ ],
93
+ "sources": [
94
+ {
95
+ "id": "s-1",
96
+ "type": "contract",
97
+ "name": "借款合同",
98
+ "loc": {
99
+ "file": "loan-contract.pdf",
100
+ "page": 1
101
+ }
102
+ },
103
+ {
104
+ "id": "s-2",
105
+ "type": "contract",
106
+ "name": "保证合同",
107
+ "loc": {
108
+ "file": "guarantee.pdf",
109
+ "page": 1
110
+ }
111
+ },
112
+ {
113
+ "id": "s-3",
114
+ "type": "evidence",
115
+ "name": "工商登记记录",
116
+ "loc": {
117
+ "file": "registry.pdf",
118
+ "page": 2
119
+ }
120
+ }
121
+ ]
122
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@zh-xx/antu",
3
+ "version": "0.9.0",
4
+ "description": "Antu: legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page. The command line and the MCP server.",
5
+ "license": "AGPL-3.0-or-later",
6
+ "author": "Ji Cheng",
7
+ "homepage": "https://github.com/zh-xx/Antu",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/zh-xx/Antu.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/zh-xx/Antu/issues"
14
+ },
15
+ "keywords": [
16
+ "legal",
17
+ "diagram",
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "agent",
21
+ "visualization"
22
+ ],
23
+ "mcpName": "io.github.zh-xx/antu",
24
+ "type": "module",
25
+ "bin": {
26
+ "antu": "bin/antu.mjs",
27
+ "antu-mcp": "bin/antu-mcp.mjs"
28
+ },
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ }
35
+ }
package/server.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.zh-xx/antu",
4
+ "description": "Legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page.",
5
+ "repository": {
6
+ "url": "https://github.com/zh-xx/Antu",
7
+ "source": "github"
8
+ },
9
+ "version": "0.9.0",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "@zh-xx/antu",
14
+ "version": "0.9.0",
15
+ "transport": {
16
+ "type": "stdio"
17
+ }
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,114 @@
1
+ # Mechanism notes for an agent
2
+
3
+ > This is an **operating note**, not the specification. The field list is served by
4
+ > `antu_schema`, examples by `antu_examples`, and the design rationale lives in the
5
+ > human-facing documents under `spec/` (you do not need them to write JSON).
6
+ >
7
+ > **This file is English on purpose.** It goes into a model's context, the same as
8
+ > the field table and the validation errors. See the header of `src/core/i18n.js`.
9
+
10
+ ## In one sentence
11
+
12
+ A fact JSON describes: **when, who, did what, resting on which material**.
13
+ The engine draws it as a timeline: time runs downwards, parties and sides are laid
14
+ out left and right.
15
+
16
+ The reader can also switch to a **chronicle** (one column in slot order, the time passed
17
+ written between events) or a **time scale** (distance is real time, the axis breaks where the
18
+ scale changes). `date`, `dateEnd` and their precision matter more there: a day-only date is
19
+ drawn as the whole day. The same JSON draws in all three; `kind: "chronicle"` or
20
+ `kind: "scale"` on antu_layout / antu_preview / antu_render shows it.
21
+
22
+ ## Where an event is drawn is decided by three things
23
+
24
+ ```
25
+ Row (time) the order of the slots array. Earlier in the array = earlier in time.
26
+ date is display-only: it never orders or reorders anything.
27
+
28
+ Column (side) groupId decides which side:
29
+ the 1st group -> side 1 (left when vertical)
30
+ the 2nd group -> side 2 (right when vertical)
31
+ the 3rd group or none -> the axis (the middle column)
32
+
33
+ Column (lane) actorIds decides the lane:
34
+ exactly 1 party -> that party's lane
35
+ 2 or more, or none -> the axis
36
+ ```
37
+
38
+ **An event with several parties lands on the axis.** That is a hard rule: it means
39
+ "both sides did this" or "this happened objectively", and belongs to neither side.
40
+
41
+ So list in `actorIds` **the party who did it**: "A pays B" is A's act (one party, A's lane); "A and B sign a
42
+ contract" is both's (two parties, the axis). Name the other party in the label or the summary, not in `actorIds`,
43
+ unless both acted.
44
+
45
+ ## What a view is
46
+
47
+ The same data can be looked at in several ways. A view only changes how the two
48
+ rules above are applied. It **never changes the data**:
49
+
50
+ ```json
51
+ { "label": "parties side by side", "splitBy": "actor",
52
+ "side1": { "label": "Huayuan Trading", "actors": ["a-1"] },
53
+ "side2": { "label": "Xincheng Building Materials", "actors": ["a-2"] } }
54
+ ```
55
+
56
+ - `splitBy: "actor"`: split by party; `side1` / `side2` say who is on which side;
57
+ - `splitBy: "group"`: split by group; no need to name parties;
58
+ - `views` may be omitted; the engine then provides a single "all" view.
59
+
60
+ ## One limit: one event per cell
61
+
62
+ **A time point holds at most one event per lane.** Two events in the same lane of the
63
+ same slot means that view cannot be drawn, and it disappears from the interface options
64
+ (an option that cannot be clicked is noise). `antu_validate` checks the data once and does not call
65
+ this an error, since a data set may keep a view that does not fit on purpose; it does list each such
66
+ view as a note after "Validation passed", so it never goes unseen. `antu_layout` reports the same views.
67
+
68
+ Three ways to fix it, most common first:
69
+
70
+ 1. **Split the time point.** If two things happened at 9:24, one at 9:24:03 and one at
71
+ 9:24:16, make two slots and give each its exact time.
72
+ 2. **Add actorIds.** If the two events belong to different parties, add `actorIds` and
73
+ they fall into different lanes.
74
+ 3. **Add groupId.** If they are of different kinds, add `groupId` and they fall on
75
+ different sides.
76
+
77
+ After splitting, check again that each slot holds exactly one event.
78
+
79
+ ## After writing
80
+
81
+ ```
82
+ antu_validate reports each problem, with the field path and the event id
83
+ (e.g. slots[0].events[1] (ev-2)); when it passes, notes any view that
84
+ does not fit (not an error, but that view will not be offered)
85
+ antu_layout no rendering: how large, which orientation, which views do not fit
86
+ antu_preview take a screenshot and look: are cards cramped, is the text small,
87
+ is there too much empty space
88
+ antu_render produce the self-contained HTML
89
+ ```
90
+
91
+ **Passing validation is only the pass mark.** Validation cannot tell whether the
92
+ diagram looks good. Always run `antu_preview` and look before delivering.
93
+
94
+ ## Things that are easy to get wrong
95
+
96
+ - **date does not decide order.** The order is the `slots` array. To reorder, reorder
97
+ the array.
98
+ - **Referenced ids must exist.** `actorIds` / `groupId` / `sourceIds` pointing at an id
99
+ that does not exist is an error.
100
+ - **List only the sources this diagram uses.** `sources` travels inside the diagram;
101
+ there is no need to list the whole case file.
102
+ - **approx is not "roughly written".** It is the formal marker that the time is not
103
+ exact, and the diagram then shows "approx."; explain why in `dateNote`.
104
+ - **No date in the material: leave `date` out.** It is optional, and the card then says the date
105
+ is unknown. Do not borrow a neighbour's date, and do not use `approx` for it: `approx` is for a
106
+ date that was estimated or worked out, not for one that is missing. The place in the array still
107
+ puts the event in order ("and afterwards they never replied" goes after the event it follows).
108
+ `dateEnd` needs a `date`.
109
+ - **`quote` is verbatim.** It is shown on the card as the material's own words, so it must be an exact passage of
110
+ the source: copy it, do not shorten or reword it. Join several passages with `……`. A condensed version of what
111
+ the source says belongs in `detail`, not in `quote`. If you do not have the text, leave `quote` out.
112
+ - **Keep the summary short.** `summary` fits one line of the card (about 22 full-width
113
+ characters); a longer one is **rejected**, not truncated, because it would overflow
114
+ the card. Put the long text in `detail`.