sad-mcp 2.3.4 → 2.3.6
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/package.json
CHANGED
|
@@ -207,10 +207,10 @@ Font: 'IBM Plex Mono', monospace (Google Fonts import)
|
|
|
207
207
|
|
|
208
208
|
## 7. Legend Bar
|
|
209
209
|
|
|
210
|
-
Include at the bottom of every SVG:
|
|
210
|
+
Include at the bottom of every SVG (no dependency entry — dependencies are not used, §3):
|
|
211
211
|
```
|
|
212
|
-
── Association ◇── Aggregation ◆── Composition ──▷ Generalization
|
|
213
|
-
Multiplicity at both ends | italic = operations
|
|
212
|
+
── Association ◇── Aggregation ◆── Composition ──▷ Generalization
|
|
213
|
+
Multiplicity at both ends (rendered outside both boxes) | italic = operations
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
---
|
|
@@ -385,13 +385,18 @@ function svgRel(rel) {
|
|
|
385
385
|
// 'assoc': no markers — plain line
|
|
386
386
|
|
|
387
387
|
let s = `<polyline points="${pts}" fill="none" stroke="#334155" stroke-width="1.8" ${dash} ${mS} ${mE}/>`;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
388
|
+
// Multiplicity labels — placed just OUTSIDE each box, offset along the line
|
|
389
|
+
// (away from the box) and beside it, so BOTH ends are always legible.
|
|
390
|
+
const multLabel = (end, adj, txt) => {
|
|
391
|
+
const dx = adj[0] - end[0], dy = adj[1] - end[1];
|
|
392
|
+
const L = Math.hypot(dx, dy) || 1, ux = dx / L, uy = dy / L;
|
|
393
|
+
const x = end[0] + ux * 16 - uy * 9, y = end[1] + uy * 16 + ux * 9 + 3;
|
|
394
|
+
return `<text x="${x}" y="${y}" text-anchor="middle" fill="#64748b" font-size="9.5" ${FM}>${escXml(txt)}</text>`;
|
|
395
|
+
};
|
|
396
|
+
if (rel.fromMult) s += multLabel(rel.points[0], rel.points[1], rel.fromMult);
|
|
392
397
|
if (rel.toMult) {
|
|
393
|
-
const
|
|
394
|
-
s +=
|
|
398
|
+
const n = rel.points.length;
|
|
399
|
+
s += multLabel(rel.points[n - 1], rel.points[n - 2], rel.toMult);
|
|
395
400
|
}
|
|
396
401
|
if (rel.label) {
|
|
397
402
|
const mid = rel.points[Math.floor(rel.points.length / 2)];
|
|
@@ -435,7 +440,7 @@ function render() {
|
|
|
435
440
|
const rels = RELS.map(svgRel).join('');
|
|
436
441
|
const boxes = CLASSES.map(svgBox).join('');
|
|
437
442
|
// Legend is placed at totalHeight - 60 so it always lands inside the viewBox.
|
|
438
|
-
const legend = `<text x="16" y="${totalHeight - 60}" fill="#64748b" font-size="9" ${FM}>── Association ◇── Aggregation ◆── Composition ──▷ Generalization
|
|
443
|
+
const legend = `<text x="16" y="${totalHeight - 60}" fill="#64748b" font-size="9" ${FM}>── Association ◇── Aggregation ◆── Composition ──▷ Generalization | קרדינליות בשני קצות הקשר</text>`;
|
|
439
444
|
|
|
440
445
|
const svg = document.getElementById('diagram-svg');
|
|
441
446
|
svg.setAttribute('width', totalWidth);
|
|
@@ -454,6 +459,7 @@ When splitting (§5), generate one `<svg id="svg-part-N">` per part. Split `CLAS
|
|
|
454
459
|
## 10. Output
|
|
455
460
|
|
|
456
461
|
- Save as `[system_name]_class_diagram.html`
|
|
462
|
+
- **Visual verification (required) — a loop, not a one-shot.** Structural validity ≠ visual validity. If a browser is available, render the HTML to an image, inspect it, and **fix → re-render → repeat until visually clean**. Scan every pass for: box overlaps; boxes off-canvas/clipped; a **multiplicity or role label landing inside a box** or on a line; **any line crossing through a foreign box**; the association-class tether hitting the wrong association; enum boxes overlapping. Do not report the diagram as done until a rendered pass is clean.
|
|
457
463
|
- After saving, briefly state: number of classes, enumerations, relationships, whether split (and why), whether VP export is included
|
|
458
464
|
|
|
459
465
|
---
|
|
@@ -257,6 +257,7 @@ Include at the bottom of every SVG:
|
|
|
257
257
|
## 11. Output
|
|
258
258
|
|
|
259
259
|
- Save as `[entity_name]_state_diagram.html`
|
|
260
|
+
- **Visual verification (required) — a loop, not a one-shot.** Structural validity ≠ visual validity. If a browser is available, render the HTML, inspect it, and **fix → re-render → repeat until visually clean**. Scan for: state-box overlaps; transition **labels/guards landing on a box or on another line**; arrows crossing through a foreign state; the initial/final markers misplaced; self-transitions unreadable. Confirm the lifecycle reads as **non-linear** (branches + returns), not a straight line. Don't report done until a rendered pass is clean.
|
|
260
261
|
- Briefly state: entity modeled, state count, transition count, composite states, whether split
|
|
261
262
|
|
|
262
263
|
---
|
|
@@ -907,6 +907,9 @@ The validator runs locally (no API cost) and catches what the §4 and CR gates c
|
|
|
907
907
|
If the response is `✗ Model invalid`, fix every listed error and call the validator again. **Do not write the HTML file until the validator returns `✓ Model valid`.**
|
|
908
908
|
|
|
909
909
|
After the validator passes, save the HTML as `[system_name]_use_case_diagram.html`.
|
|
910
|
+
|
|
911
|
+
**Visual verification (required) — a loop, not a one-shot.** The validator passing is necessary but NOT sufficient: it does not catch layout problems. If a browser is available, render the HTML and inspect it, then **fix → re-render → repeat until visually clean**. Check **both tabs** (toggle which `.diagram-part` is `hidden`) and open at least one UC modal to confirm the wireframe renders. Scan every pass for: ellipse **overlaps**; actors too close (min ~200px); actor figure detached from its own line; a UC crowded into a **center column** (usually a recipient-only human actor on a system-initiated UC — remove it per §4.1); wide ellipses colliding with the boundary title bar; timing/label text on top of a line. Do not report the diagram as done until a rendered pass of each tab is clean.
|
|
912
|
+
|
|
910
913
|
Briefly report: actor count, use case count, include/extend count, whether split, and any warnings the validator surfaced.
|
|
911
914
|
|
|
912
915
|
---
|