figdown 0.4.1 → 0.5.1
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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/README.md +85 -0
- package/dist/figdown.js +1781 -407
- package/dist/figdown.mjs +1781 -407
- package/examples/evpn-fabric.svg +1 -1
- package/examples/showcase/arp-resolution.svg +1 -1
- package/examples/showcase/ethernet-frame.svg +1 -1
- package/examples/showcase/l2-forwarding-logic.svg +1 -1
- package/examples/showcase/tcp-handshake.svg +1 -1
- package/examples/showcase/tcp-header.svg +1 -1
- package/examples/showcase/tcp-state-machine.svg +1 -1
- package/integrations/mcp-server/server.js +50 -4
- package/package.json +13 -2
- package/skill/README.md +130 -0
- package/skill/figdown/SKILL.md +20 -0
- package/skill/figdown/build-svg.js +17 -4
- package/skill/figdown/figdown.html +4539 -898
- package/skill/figdown/reference/experimental/flowchart.md +23 -0
- package/skill/figdown/reference/experimental/sequence.md +28 -0
- package/skill/figdown/reference/experimental/statechart.md +29 -0
- package/skill/figdown/reference/experimental/topology.md +42 -0
- package/skill/figdown/reference/scene.md +23 -0
- package/skill/figdown/reference/transcribe.md +4 -1
|
@@ -184,3 +184,26 @@ ordinary text and needs no quotes, because `[ ]` is a verbatim region.
|
|
|
184
184
|
Under `figdown 0.3` any of these lines may carry `note=`, a drawn aside in
|
|
185
185
|
prose: `process parse "Parse body" note="…"`. It is never parsable and never
|
|
186
186
|
where a structural fact lives.
|
|
187
|
+
|
|
188
|
+
## Naming a connector — `id=` (`figdown 0.5`)
|
|
189
|
+
|
|
190
|
+
A connector may carry an optional `id=`, and most do not. Writing one gives
|
|
191
|
+
the line a **handle**: a name other constructs in the same section use to
|
|
192
|
+
point at this connector, a key a diff pairs on, and the value the artifact's
|
|
193
|
+
`data-edge` carries.
|
|
194
|
+
|
|
195
|
+
**What you may conclude from an id, and it is very little.** An id is a
|
|
196
|
+
handle and its SPELLING says nothing. Meeting `flowline a -> b id=f1` you may conclude that
|
|
197
|
+
something in the document can refer to this connector; you may **not**
|
|
198
|
+
conclude that it belongs to a group of any kind, that it is the first of
|
|
199
|
+
several, or that it is related to a connector with a similar name. Whatever
|
|
200
|
+
claim looks implied is made by a construct that states it, or it is not made.
|
|
201
|
+
|
|
202
|
+
**And an unnamed connector is not a lesser one.** Anonymity is the default:
|
|
203
|
+
most connectors in most figures carry no id, and the absence is not a gap, a
|
|
204
|
+
draft state or a weaker assertion. Do not treat the named connectors in a
|
|
205
|
+
figure as the important ones.
|
|
206
|
+
|
|
207
|
+
An id is bare, matches `[A-Za-z_][A-Za-z0-9_-]*`, and is unique within its
|
|
208
|
+
section — it shares one namespace with node, group and region ids, so a
|
|
209
|
+
connector cannot take a name something else already has.
|
|
@@ -250,3 +250,31 @@ a missing colour.
|
|
|
250
250
|
shared category, never a shared identity.
|
|
251
251
|
- **Nothing from the layout zone.** Here that rule is total rather than
|
|
252
252
|
conventional: a `pin` changes no coordinate, because there is none to change.
|
|
253
|
+
|
|
254
|
+
## Naming a connector — `id=` (`figdown 0.5`)
|
|
255
|
+
|
|
256
|
+
A connector may carry an optional `id=`, and most do not. Writing one gives
|
|
257
|
+
the line a **handle**: a name other constructs in the same section use to
|
|
258
|
+
point at this connector, a key a diff pairs on, and the value the artifact's
|
|
259
|
+
`data-edge` carries.
|
|
260
|
+
|
|
261
|
+
**What you may conclude from an id, and it is very little.** An id is a
|
|
262
|
+
handle and its SPELLING says nothing. Meeting `message a -> b "SYN" id=m1` you may conclude that
|
|
263
|
+
something in the document can refer to this connector; you may **not**
|
|
264
|
+
conclude that it belongs to a group of any kind, that it is the first of
|
|
265
|
+
several, or that it is related to a connector with a similar name. Whatever
|
|
266
|
+
claim looks implied is made by a construct that states it, or it is not made.
|
|
267
|
+
|
|
268
|
+
**And an unnamed connector is not a lesser one.** Anonymity is the default:
|
|
269
|
+
most connectors in most figures carry no id, and the absence is not a gap, a
|
|
270
|
+
draft state or a weaker assertion. Do not treat the named connectors in a
|
|
271
|
+
figure as the important ones.
|
|
272
|
+
|
|
273
|
+
An id is bare, matches `[A-Za-z_][A-Za-z0-9_-]*`, and is unique within its
|
|
274
|
+
section — it shares one namespace with node, group and region ids, so a
|
|
275
|
+
connector cannot take a name something else already has.
|
|
276
|
+
|
|
277
|
+
**An id on a message names it and orders nothing.** The figure's time axis is
|
|
278
|
+
declaration order and nothing else; two messages are two occurrences however
|
|
279
|
+
they are named, and an id never says that two of them are one, or that one
|
|
280
|
+
comes before another. If you need the order, read the order.
|
|
@@ -138,3 +138,32 @@ self-loops appear in almost none. A retry loop drawn as a flowchart is exactly
|
|
|
138
138
|
the figure that reads wrong as a statechart. **Only the declared genre says
|
|
139
139
|
which it is** — and a title that contains the words "state machine" does not,
|
|
140
140
|
because a polling flowchart is routinely titled that way.
|
|
141
|
+
|
|
142
|
+
## Naming a connector — `id=` (`figdown 0.5`)
|
|
143
|
+
|
|
144
|
+
A connector may carry an optional `id=`, and most do not. Writing one gives
|
|
145
|
+
the line a **handle**: a name other constructs in the same section use to
|
|
146
|
+
point at this connector, a key a diff pairs on, and the value the artifact's
|
|
147
|
+
`data-edge` carries.
|
|
148
|
+
|
|
149
|
+
**What you may conclude from an id, and it is very little.** An id is a
|
|
150
|
+
handle and its SPELLING says nothing. Meeting `transition s1 -[start]-> s2 id=t1` you may conclude that
|
|
151
|
+
something in the document can refer to this connector; you may **not**
|
|
152
|
+
conclude that it belongs to a group of any kind, that it is the first of
|
|
153
|
+
several, or that it is related to a connector with a similar name. Whatever
|
|
154
|
+
claim looks implied is made by a construct that states it, or it is not made.
|
|
155
|
+
|
|
156
|
+
**And an unnamed connector is not a lesser one.** Anonymity is the default:
|
|
157
|
+
most connectors in most figures carry no id, and the absence is not a gap, a
|
|
158
|
+
draft state or a weaker assertion. Do not treat the named connectors in a
|
|
159
|
+
figure as the important ones.
|
|
160
|
+
|
|
161
|
+
An id is bare, matches `[A-Za-z_][A-Za-z0-9_-]*`, and is unique within its
|
|
162
|
+
section — it shares one namespace with node, group and region ids, so a
|
|
163
|
+
connector cannot take a name something else already has.
|
|
164
|
+
|
|
165
|
+
**Why the caution matters most here.** Two transitions between one pair of
|
|
166
|
+
states are two different TRIGGERS, and the trigger is the whole content of
|
|
167
|
+
the arc — it lives in the `[mid]` inscription. A transition named `timeout`
|
|
168
|
+
states no trigger; a transition whose inscription reads `timeout` does. Read
|
|
169
|
+
the arc, never the handle.
|
|
@@ -164,3 +164,45 @@ as one intermediate `node` that fans out.
|
|
|
164
164
|
part of the claim — a site, a rack, a country — say it with a `group` and a
|
|
165
165
|
label. Delete every `pin` and the figure must still be the same figure
|
|
166
166
|
(`../layout.md`).
|
|
167
|
+
|
|
168
|
+
## Naming a connector — `id=` (`figdown 0.5`)
|
|
169
|
+
|
|
170
|
+
A connector may carry an optional `id=`, and most do not. Writing one gives
|
|
171
|
+
the line a **handle**: a name other constructs in the same section use to
|
|
172
|
+
point at this connector, a key a diff pairs on, and the value the artifact's
|
|
173
|
+
`data-edge` carries.
|
|
174
|
+
|
|
175
|
+
**What you may conclude from an id, and it is very little.** An id is a
|
|
176
|
+
handle and its SPELLING says nothing. Meeting `edge l1 -- s1 id=lag1a` you may conclude that
|
|
177
|
+
something in the document can refer to this connector; you may **not**
|
|
178
|
+
conclude that it belongs to a group of any kind, that it is the first of
|
|
179
|
+
several, or that it is related to a connector with a similar name. Whatever
|
|
180
|
+
claim looks implied is made by a construct that states it, or it is not made.
|
|
181
|
+
|
|
182
|
+
**And an unnamed connector is not a lesser one.** Anonymity is the default:
|
|
183
|
+
most connectors in most figures carry no id, and the absence is not a gap, a
|
|
184
|
+
draft state or a weaker assertion. Do not treat the named connectors in a
|
|
185
|
+
figure as the important ones.
|
|
186
|
+
|
|
187
|
+
An id is bare, matches `[A-Za-z_][A-Za-z0-9_-]*`, and is unique within its
|
|
188
|
+
section — it shares one namespace with node, group and region ids, so a
|
|
189
|
+
connector cannot take a name something else already has.
|
|
190
|
+
|
|
191
|
+
**What an id is FOR here: naming one link of several.** A `bundle` collects
|
|
192
|
+
links, and its members may be written either as endpoint pairs or as
|
|
193
|
+
connector ids. The pair form works only where exactly one link runs between
|
|
194
|
+
the two devices; where several do — which is the ordinary shape of an
|
|
195
|
+
aggregation — the ids are the only way to say which links belong:
|
|
196
|
+
|
|
197
|
+
```figdown
|
|
198
|
+
figdown 0.5 topology
|
|
199
|
+
node sw1 "Switch-1"
|
|
200
|
+
node sw2 "Switch-2"
|
|
201
|
+
edge sw1 -- sw2 id=m1
|
|
202
|
+
edge sw1 -- sw2 id=m2
|
|
203
|
+
bundle ae0 "ae0" m1,m2
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Read `m1,m2` as **exactly two members, named**, and nothing more: the ids do
|
|
207
|
+
not say the links are ordered, numbered, or interchangeable. If the source
|
|
208
|
+
also carries interface names, they are in the end labels, not in the ids.
|
|
@@ -168,6 +168,29 @@ a `node` styled to look like one.
|
|
|
168
168
|
`experimental/block.md` (EXPERIMENTAL)
|
|
169
169
|
- Bars drawn from a `table` region → `experimental/chart.md` (EXPERIMENTAL)
|
|
170
170
|
|
|
171
|
+
## Naming a connector — `id=` (`figdown 0.5`)
|
|
172
|
+
|
|
173
|
+
A connector may carry an optional `id=`, and most do not. Writing one gives
|
|
174
|
+
the line a **handle**: a name other constructs in the same section use to
|
|
175
|
+
point at this connector, a key a diff pairs on, and the value the artifact's
|
|
176
|
+
`data-edge` carries.
|
|
177
|
+
|
|
178
|
+
**What you may conclude from an id, and it is very little.** An id is a
|
|
179
|
+
handle and its SPELLING says nothing. Meeting `edge a -> b id=e1` you may conclude that
|
|
180
|
+
something in the document can refer to this connector; you may **not**
|
|
181
|
+
conclude that it belongs to a group of any kind, that it is the first of
|
|
182
|
+
several, or that it is related to a connector with a similar name. Whatever
|
|
183
|
+
claim looks implied is made by a construct that states it, or it is not made.
|
|
184
|
+
|
|
185
|
+
**And an unnamed connector is not a lesser one.** Anonymity is the default:
|
|
186
|
+
most connectors in most figures carry no id, and the absence is not a gap, a
|
|
187
|
+
draft state or a weaker assertion. Do not treat the named connectors in a
|
|
188
|
+
figure as the important ones.
|
|
189
|
+
|
|
190
|
+
An id is bare, matches `[A-Za-z_][A-Za-z0-9_-]*`, and is unique within its
|
|
191
|
+
section — it shares one namespace with node, group and region ids, so a
|
|
192
|
+
connector cannot take a name something else already has.
|
|
193
|
+
|
|
171
194
|
## The drawn annotation — `note=` (`figdown 0.3`)
|
|
172
195
|
|
|
173
196
|
`note=` is an **attribute on the annotated element's own line**, and the
|
|
@@ -13,7 +13,10 @@ tiers, and you state which one you used in the provenance comment:
|
|
|
13
13
|
|
|
14
14
|
## Reconstruct the meaning, do not trace the drawing
|
|
15
15
|
|
|
16
|
-
Recover what the original *means*, then state that in FigDown.
|
|
16
|
+
Recover what the original *means*, then state that in FigDown. Measured, so
|
|
17
|
+
that the temptation has a number beside it: of 216 question-labelled nodes in
|
|
18
|
+
the production corpus, **78% are diamonds, 14% ellipses and 8% carry no shape
|
|
19
|
+
at all** — a source's diamond is not evidence of a decision, its question is.
|
|
17
20
|
|
|
18
21
|
- **Verify every bitfield row's width sum against the original ruler.**
|
|
19
22
|
- **Never fabricate.** Mark every uncertainty in a `#` comment for human
|