法律实体结构图

关于法律实体结构图

法律实体结构图描绘组织与个人之间的法律和经济关系——谁拥有什么、通过哪种实体形式、在哪个司法管辖区。公司律师用它来记录控股结构和子公司链。税务顾问用它来展示跨境 IP 授权流程和转让定价安排。创业公司律师用它来制作股权表和董事会决议。遗产规划师用它来展示让与人-信托-受益人安排。这种图表是任何并购尽职调查过程中首先要求的文件,也是 OECD 转让定价主档的标准附件。

Schematex 遵循以下实务惯例:SEC Regulation S-K Exhibit 21(子公司披露)、IRS Form 8832 实体分类、ISO 3166-1 司法管辖区代码、ISO 20275 法律实体形式,以及四大会计师事务所税务备忘录惯例。实体类型对应不同的形状(公司用矩形、LLC 用圆角矩形、信托用椭圆),让任何读者都能一眼识别法律形式。本页记录解析器目前接受的语法。

entity-structure·§ Corporate
↘ preview
100%
Acme Global Holdings Entity structure diagram with 6 entities and 6 relationships Acme Global Holdings 100% 100% 100% IP License · royalty 100% US Acme Global, Inc. Corporation Ultimate Parent IE Acme Ireland Holdings Corporation KY Acme IP Ltd Corporation Holds group IP NL Acme EU Distribution LLC SG Acme APAC Trading Corporation Employee Option Pool Reserved Pool
UTF-8 · LF · 13 lines · 515 chars✓ parsed·1.0 ms·7.6 KB SVG

1. 你的第一张实体结构图

最精简的实用实体结构:一家母公司持有两家子公司。

entity-structure·§ Corporate
↘ preview
100%
Simple holding Entity structure diagram with 3 entities and 2 relationships Simple holding 100% 100% DE Holdco LLC LLC DE OpCo Inc. Corporation UK UK Sub Ltd. LLC
UTF-8 · LF · 6 lines · 180 chars✓ parsed·0.9 ms·5.1 KB SVG

四条规则涵盖 80% 的用法:

  1. entity-structure 开头,可选择性加上带引号的标题。
  2. 每个法律实体是一个节点:entity ID "显示名称" 类型 — 类型决定形状。
  3. -> 连接实体。在目标 ID 后加上 : pct 标示持股比例:parent -> child : 60%
  4. 在类型后加上 @司法管辖区 显示司法管辖区标签:corp@DE

注释必须以 # 开头,且单独占一行。


2. 实体类型

实体类型决定节点渲染的形状。Schematex 将多个常用别名对应至标准类型。

标准类型接受的别名渲染形状典型用途
corpcorporationinc矩形(直角)C-corp、S-corp、Ltd.、SA、AG
llcllpgmbhbv圆角矩形LLC、LLP、GmbH、BV
lplllpfund缺口矩形LP、LLLP、投资基金
trust椭圆形家族信托、法定信托
individualperson圆形创始人、让与人、自然人
foundationnpo五边形(盾形)非营利机构、慈善基金会
disregardedbranch虚线矩形透明实体、外国分支机构
pool虚线圆角矩形期权池、ESOP、未发行股份
placeholdertbf虚线矩形(淡化)待组建实体、收购目标

实体语法:

entity ID "Display Name" type
entity ID "Display Name" type@JURISDICTION
entity ID "Display Name" type@JURISDICTION [properties]

ID 规则。 必须以字母开头,后接字母、数字、下划线或连字符:[A-Za-z][A-Za-z0-9_-]*

entity-structure·§ Corporate
↘ preview
100%
Entity type shapes Entity structure diagram with 9 entities and 5 relationships Entity type shapes 100% 80% 100% DE Delaware C-Corp Corporation CA California LLC LLC KY Cayman Fund LP LP / Fund SD Family Trust Trust Jane Smith Acme Foundation Foundation IE Irish Branch Disregarded Entity ESOP Pool Reserved Pool Acquisition Target To Be Formed
UTF-8 · LF · 15 lines · 427 chars✓ parsed·0.7 ms·7.8 KB SVG

3. 节点属性

[…] 内的可选属性可为实体加上额外的上下文信息,显示在渲染的节点中。

属性语法效果
status: newneweliminatedmodifiednormal交易步骤图的视觉标签
tax: ccorp带引号的字符串实体名称下方的税务分类标签
role: "Grantor"带引号的字符串角色标签(供个人和受托人使用)
note: "…"带引号的字符串节点内显示的小型备注
est: "2024-03-15"带引号的字符串成立日期

不在保留集合(statustaxrolenoteest)内的任何键都会存储为自定义属性。

entity alice "Alice Chen" individual [role: "Founder & CEO"]
entity trust1 "Smith Irrevocable Trust" trust@SD [est: "2019-06-01", note: "Spendthrift provisions"]
entity opco "OpCo, Inc." corp@DE [status: new, tax: ccorp]

4. 司法管辖区

在实体类型后加上 @CODE 以在节点上显示司法管辖区标签。代码为 2–3 个字母的字符串——ISO 3166-1 alpha-2 国家代码和美国州缩写都可接受。

entity parent "Parent Corp" corp@US
entity ie_sub "Ireland Sub" corp@IE
entity ky_fund "Cayman Fund" lp@KY
entity de_llc "Delaware LLC" llc@DE

常用代码:US 美国·DE 特拉华州·CA 加利福尼亚州·NY 纽约州·UK 英国·IE 爱尔兰·NL 荷兰·KY 开曼群岛·SG 新加坡·HK 香港·JP 日本·BM 百慕大·VG 英属维尔京群岛·CH 瑞士·LU 卢森堡·SD 南达科他州。

@DE 默认解析为特拉华州(美国法律语境中最常见)。

司法管辖区集群

使用 jurisdiction CODE "名称" [color: "#hex"] 声明司法管辖区,将所有共用该代码的实体分组到图表上一个带标签的虚线边框集群区域中。

jurisdiction US "United States" [color: "#3b82f6"]
jurisdiction IE "Ireland" [color: "#059669"]

当实体的 @CODE 与已声明的 jurisdiction 吻合时,该实体会自动置于该集群内。若未声明 jurisdiction,标签仍会显示,但不绘制集群区域。

entity-structure·§ Corporate
↘ preview
100%
IP holding structure Entity structure diagram with 4 entities and 4 relationships IP holding structure United States Ireland Cayman Islands 100% 100% 100% IP License US TopCo, Inc. Corporation IE Ireland Holdings Corporation KY IP HoldCo Corporation Group IP IE EU Opco LLC
UTF-8 · LF · 12 lines · 459 chars✓ parsed·0.7 ms·6.7 KB SVG

手动集群

使用 cluster "标签" [members: [id1, id2], color: "#hex"] 将不共用单一司法管辖区代码的实体分组。

cluster "Ireland / Cayman IP" [members: [ie_ip, nl_bv], color: "#059669"]

5. 持股边

边线以一个运算符连接两个实体 ID。运算符决定线条样式和视觉语义。

运算符渲染为含义
->实线箭头股权持有(默认)
==>双线箭头仅表决控制(无经济利益)
-.->虚线灰色箭头期权池/条件持有
-~->虚线紫色箭头IP 授权、管理协议、集团内部服务
-->虚线绿色箭头分配(信托到受益人)

持股比例: 在目标 ID 后加上 : pct

parent -> subsidiary : 60%

股份类别: 加上 [class: "Series A Pref"] 在边线上标示股份类别。

vc -> startup : 22% [class: "Series A Pref"]

非股权标签: 在授权或分配边线上使用 [label: "…"] 添加描述性文字。

ip_co -~-> opco [label: "IP License · royalty"]
trust --> beneficiary [label: "Discretionary distributions"]

组合使用: class:label: 可同时出现。

fund -> portfolio : 35% [class: "Common", label: "Post-Series B"]
entity-structure·§ Corporate
↘ preview
100%
Mixed edge types Entity structure diagram with 7 entities and 7 relationships Mixed edge types 100% 100% Exclusive license 10% Income distributions 100% DE HoldCo LLC LLC DE OpCo Inc. Corporation KY IP Ltd Corporation DE Growth Fund LP / Fund ESOP Pool Reserved Pool SD Family Trust Trust J. Smith
UTF-8 · LF · 20 lines · 576 chars✓ parsed·0.7 ms·7.8 KB SVG

6. 标签与注释

  • 标题: entity-structure "Acme Holdings" — 第一行,加引号。
  • 实体显示名称: entity ID "名称" type 中带引号的字符串——显示在节点内部。
  • 司法管辖区标签: 类型后的 @CODE — 2–3 个字母代码,显示在节点角落。
  • 节点属性: [note: "…", role: "…", status: new, …] — 节点内部的标注。
  • 边线比例: 目标 ID 后的 : pct — 显示在持股箭头上。
  • 边线类别: [class: "…"] — 箭头上的股份类别标签。
  • 边线标签: [label: "…"] — 箭头上的描述性文字。
  • 注释: # 位于行首(前置空白字符之后)。括号块内行内尾随的 # 注释也会被去除。

7. 保留字与转义

行首保留字: entity-structure(标头)、entityjurisdictioncluster

实体类型关键字 — 这些字符串被解析为实体类型,不得用作实体 ID:corpcorporationincllcllpgmbhbvlplllpfundtrustindividualpersonfoundationnpodisregardedbranchpoolplaceholdertbf

边线运算符标记 — 请避免在 ID 中使用这些序列:->==>-.->-~->-->

含空白字符的字符串必须在显示名称、备注、角色标签和颜色值中使用双引号。

司法管辖区代码在来源中不区分大小写,但会规范化为大写:@de@DE 等效。


8. 常见错误

你写的解析器响应修正方式
entity acme Acme Inc. corp@DE(名称未加引号)解析失败——名称必须加引号entity acme "Acme Inc." corp@DE
acme -> sub [50%](比例在括号内)50% 无法识别为属性键acme -> sub : 50%(冒号在比例前,括号外)
entity acme "Acme" Ltd@DELtd 不是有效的类型关键字使用 corpllcLtd 不在别名表中
acme -> unknown_id : 100%EntityParseError: Edge references unknown entity "unknown_id"在边线中使用之前必须先声明每个实体
cluster "US entities" [ids: [a, b]]ids: 无法识别;属性被静默忽略使用 members: [a, b]
jurisdiction DE "Delaware" 后接 entity co "Co" corp@DE集群绘制在 co 周围——正确。但在美国语境中 @DE 是特拉华州,不是德国@DE 表示特拉华州,@DEU 无效——没有歧义解决方案;请在 note: 中记录意图
entity x "X" corp [status: pending]pending 不是有效的状态值——属性静默存储为自定义属性使用 neweliminatedmodifiednormal

9. 语法(EBNF)

document        = header (blank | comment | jurisdiction-def | cluster-def | entity-def | edge)*

header          = "entity-structure" ( WS quoted-string )? NEWLINE
quoted-string   = '"' any-char-but-quote* '"'

jurisdiction-def = "jurisdiction" CODE WS quoted-string ( "[" jur-attrs "]" )? NEWLINE
jur-attrs        = jur-attr ("," jur-attr)*
jur-attr         = "color:" quoted-string

cluster-def     = "cluster" WS quoted-string ( "[" cluster-attrs "]" )? NEWLINE
cluster-attrs   = cluster-attr ("," cluster-attr)*
cluster-attr    = "members:" "[" id ("," id)* "]"
                | "color:" quoted-string

entity-def      = "entity" WS id WS quoted-string WS entity-type ( "@" CODE )?
                  ( "[" entity-attrs "]" )? NEWLINE
entity-attrs    = entity-attr ("," entity-attr)*
entity-attr     = "status:" status
                | "tax:" quoted-string
                | "role:" quoted-string
                | "note:" quoted-string
                | "est:" quoted-string
                | key ":" quoted-string        # custom property

entity-type     = "corp" | "corporation" | "inc"
                | "llc" | "llp" | "gmbh" | "bv"
                | "lp" | "lllp" | "fund"
                | "trust"
                | "individual" | "person"
                | "foundation" | "npo"
                | "disregarded" | "branch"
                | "pool"
                | "placeholder" | "tbf"

edge            = id WS op WS id ( ":" WS pct-text )? ( "[" edge-attrs "]" )? NEWLINE
op              = "->" | "==>" | "-.->" | "-~->" | "-->"
pct-text        = any text up to "[" or end of line   # e.g. "100%" or "V 75% / E 50%"

edge-attrs      = edge-attr ("," edge-attr)*
edge-attr       = "class:" quoted-string
                | "label:" quoted-string

status          = "new" | "eliminated" | "modified" | "normal"
CODE            = [A-Za-z]{2,3}
id              = [A-Za-z] [A-Za-z0-9_-]*
comment         = "#" any NEWLINE

权威来源:src/diagrams/entity/parser.ts。若本文与解析器有出入,以解析器为准——请提交 issue 反馈。


10. 标准合规性

Schematex 法律实体结构图综合以下惯例:

  • SEC Regulation S-K, Item 601(b)(21) — Exhibit 21 子公司披露惯例
  • IRS Form 8832 — C 型公司/直通式/透明实体分类
  • ISO 3166-1 alpha-2 — 节点标签上的司法管辖区代码
  • ISO 20275:2017 — 法律实体标识符(LEI)实体形式分类
  • OECD 转让定价指南(2022) — 跨境 IP 授权和特许权使用费流程惯例
  • 四大会计师事务所税务备忘录惯例(EY / PwC / KPMG / 德勤)——跨境结构图的实际标准

目前已实现:

  • ✅ 九种具有不同形状的实体类型:corpllclptrustindividualfoundationdisregardedpoolplaceholder
  • ✅ 类型别名:corporationincllpgmbhbvlllpfundpersonnpobranchtbf
  • ✅ 五种边线运算符:->(持有)、==>(表决)、-.->(期权池)、-~->(授权)、-->(分配)
  • ✅ 持股比例标签(: pct)和股份类别([class: "…"]
  • ✅ 司法管辖区标签(@CODE),支持 ISO 3166-1 和美国州代码
  • ✅ 司法管辖区集群区域(按 @CODE 虚线边框分组)
  • ✅ 手动集群(cluster "…" [members: […]]
  • ✅ 节点属性:statustaxrolenoteest、自定义键值对
  • ⏳ 表决/经济分割比例 — V 75% / E 50% 已存储在 percentage 字符串中,但双行标签渲染尚未实现
  • ⏳ 交易步骤差异渲染 — status: new / eliminated / modified 已存储,但视觉差异标签尚未渲染
  • ⏳ 行内股份数量标注 — 持股比例旁的 100 shares Common

11. 相关示例

entity·§ Tier ownership
Acme Holdings Entity structure diagram with 4 entities and 3 relationships Acme Holdings 100% 100% 60% SD Founder Trust Trust DE Acme Inc. Corporation UK Acme UK Ltd. LLC KY Acme Growth Fund LP LP / Fund
Multi-jurisdiction holding company
Multi-jurisdiction holding structure with a Delaware corp, UK subsidiary, and Cayman growth fund — the first document in any M&A due diligence package.
finance & legal
entity·§ Tier ownership
Acme Global Holdings Entity structure diagram with 5 entities and 5 relationships Acme Global Holdings 100% 100% 100% IP License · royalty 100% US Acme Global, Inc. Corporation Ultimate Parent IE Acme Ireland Holdings Corporation KY Acme IP Ltd Corporation Holds group IP NL Acme EU Distribution Corporation SG Acme APAC Trading Corporation
International tax holding structure
Cross-border tax holding structure with Irish IP company, Dutch distribution, and APAC entity — per OECD BEPS transfer-pricing documentation requirements.
finance & legal
entity·§ Tier ownership
Acme Inc. — post Series A Entity structure diagram with 6 entities and 5 relationships Acme Inc. — post Series A 45% 12% 22% 6% 15% DE Acme Inc. Corporation Founders (2) DE Seed Fund I LP / Fund DE Sequoia Series A LP / Fund Angel group DE Employee Option Pool Trust
Series A cap table
Post-Series A cap table showing founders, seed fund, lead VC, angel group, and ESOP pool with ownership percentages — for 409A valuations and board consents.
finance & legal

12. 开发路线图

规划中——目前尚无法解析。 请勿在今日生成的 DSL 中使用;解析器会拒绝或忽略这些语法。

  • 表决/经济分割渲染 — 在单一边线上显示 V 75% / E 50%,以双行比例标签区分表决利益和经济利益。
  • 交易步骤差异标签status: new 渲染绿色"NEW"标签;status: eliminated 渲染红色删除线;用于在单一图表上比较并购前后的结构。
  • 股份数量标注 — 在 -> sub : 100 shares Common 中加上比例,以获取股权表中的确切股份数量。
  • 双向持股 — 明确的 <-> 边线用于交叉持股(两个实体互相持有),以 S 形曲线路由避免杂乱。
  • 图例块 — 自动生成的图例,显示形状与实体类型、运算符与关系类型的对应。

如有需要优先实现的项目,请在 GitHub issues 中跟踪。

Found this useful?

Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.