Skip to content

Commit 7340726

Browse files
committed
fig: widen architecture diagram, single-line cell labels (no overflow)
1 parent dcba81b commit 7340726

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/paper/figures/arch.png

-2.88 KB
Loading

docs/paper/figures/make_figures.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def save(fig, name: str) -> None:
8080
# Figure 1 — Architecture.
8181

8282
def fig_architecture():
83-
fig, ax = plt.subplots(figsize=(6.5, 3.0))
84-
ax.set_xlim(0, 100); ax.set_ylim(0, 50); ax.axis("off")
83+
fig, ax = plt.subplots(figsize=(7.5, 3.2))
84+
ax.set_xlim(0, 130); ax.set_ylim(0, 52); ax.axis("off")
8585

8686
def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
8787
fontsize=9, rounded=0.02):
@@ -96,28 +96,28 @@ def box(x, y, w, h, label, facecolor, edgecolor="black", text_color="black",
9696
fontsize=fontsize, color=text_color)
9797

9898
# LLM
99-
box(2, 18, 16, 14, "LLM\n(MCP host)", C["llm"], fontsize=10)
99+
box(2, 18, 18, 14, "LLM\n(MCP host)", C["llm"], fontsize=10)
100100

101-
# Bridge outer
102-
box(28, 4, 42, 42, "", "#ffffff", edgecolor=C["bridge_outer"], rounded=1.5)
103-
ax.text(28 + 21, 41, "Bridge (sole trust boundary)",
104-
ha="center", va="bottom", fontsize=9, color=C["bridge_outer"],
101+
# Bridge outer — widened to comfortably hold 2x2 inner grid
102+
box(32, 4, 60, 44, "", "#ffffff", edgecolor=C["bridge_outer"], rounded=1.5)
103+
ax.text(32 + 30, 42, "Bridge sole trust boundary",
104+
ha="center", va="bottom", fontsize=9.5, color=C["bridge_outer"],
105105
fontweight="bold")
106106

107-
# Bridge inner components (2 x 2 grid)
108-
inner_w, inner_h = 18, 9
107+
# Bridge inner components (2 x 2 grid) — single-line labels, wider cells
108+
inner_w, inner_h = 26, 11
109109
cells = [
110-
(31, 25, "Capability\ntoken verify"),
111-
(51, 25, "Range / type\nchecks"),
112-
(31, 10, "Dry-run\nevaluator"),
113-
(51, 10, "Audit /\nrate-limit"),
110+
(35, 24, "Capability token"),
111+
(63, 24, "Range / type"),
112+
(35, 10, "Dry-run"),
113+
(63, 10, "Audit / rate-limit"),
114114
]
115115
for x, y, label in cells:
116116
box(x, y, inner_w, inner_h, label, C["bridge_inner"],
117-
edgecolor=C["bridge_outer"], fontsize=8)
117+
edgecolor=C["bridge_outer"], fontsize=8.5)
118118

119119
# Device
120-
box(80, 18, 18, 14, "Device\n(<16 KB MCU)", C["device"], fontsize=10)
120+
box(104, 18, 24, 14, "Device\n(<16 KB MCU)", C["device"], fontsize=10)
121121

122122
# Arrows.
123123
def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
@@ -127,10 +127,10 @@ def arrow(x1, y1, x2, y2, label, dy_label=2, color="black"):
127127
ax.text((x1 + x2) / 2, max(y1, y2) + dy_label, label,
128128
ha="center", va="bottom", fontsize=8, color=color, style="italic")
129129

130-
arrow(18, 27, 28, 27, "MCP", dy_label=1)
131-
arrow(28, 23, 18, 23, "results", dy_label=-3.5, color="#666666")
132-
arrow(70, 27, 80, 27, "DCP wire", dy_label=1)
133-
arrow(80, 23, 70, 23, "reply", dy_label=-3.5, color="#666666")
130+
arrow(20, 28, 32, 28, "MCP", dy_label=1)
131+
arrow(32, 22, 20, 22, "results", dy_label=-3.5, color="#666666")
132+
arrow(92, 28, 104, 28, "DCP wire", dy_label=1)
133+
arrow(104, 22, 92, 22, "reply", dy_label=-3.5, color="#666666")
134134

135135
# Transport bullets under device
136136
transports = "UART · MQTT · BLE · USB-CDC"

0 commit comments

Comments
 (0)