sad-mcp 1.1.4 → 1.1.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sad-mcp",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "MCP server for Software Analysis and Design course materials at BGU",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,6 +30,7 @@ The shared files prepended to this prompt define the layout recipes, model shape
30
30
  7. **Default: zero «include» and zero «extend».** Most diagrams need none. More than two is almost always wrong. §4 defines a gate every such relationship must pass before you draw it.
31
31
  8. **UC labels describe actions WITH the information system, not physical real-world actions.** See §3 for the full rule and verb list.
32
32
  9. **Every system-time / cron actor association MUST carry a timing label** (e.g., "פעם ביום", "כל 5 דקות"). See §2 and §8 for rendering.
33
+ 10. **No "send-only" use cases.** If a UC's entire behavior is sending a message / notification / alert / email / SMS, it is not a UC — it is a step inside the UC that *decided* to send it. See §3.
33
34
 
34
35
  ---
35
36
 
@@ -78,6 +79,12 @@ The shared files prepended to this prompt define the layout recipes, model shape
78
79
 
79
80
  **Implied UCs**: every entity the system references needs at least one UC that manages it.
80
81
 
82
+ **No "send-only" use cases.** A UC must carry non-trivial behavior (decision, data entry, state change, non-trivial computation). If the only behavior is firing a message, it is not a UC — it is a system step inside the UC that *decided* to send.
83
+
84
+ - ❌ Wrong UCs: `שליחת התראה`, `שליחת מייל אישור`, `שליחת SMS`, `הודעה למנהל`, `שליחת דוח`.
85
+ - ✅ Fold into the decider: the alert send-step belongs inside `עדכון רמות מלאי` (which *detected* the low stock); the confirmation email belongs inside `אישור הזמנה` (which *decided* to confirm).
86
+ - This rule applies even when the send is triggered by a condition — conditional sending is part of the conditional UC, not its own UC.
87
+
81
88
  ---
82
89
 
83
90
  ## 4. Include and Extend — Mandatory Justification Gate
@@ -337,13 +344,21 @@ function fixLayout(layout) {
337
344
  line.setAttribute('x2', x2); line.setAttribute('y2', y2);
338
345
  });
339
346
 
340
- // Step 9 — Resize boundary rect and SVG viewBox.
347
+ // Step 9 — Resize boundary rect and SVG viewBox (BOTH width and height).
341
348
  const br = svg.querySelector('.system-boundary, rect[rx="12"]');
342
- if (br) br.setAttribute('height', b.height);
349
+ if (br) { br.setAttribute('width', b.width); br.setAttribute('height', b.height); }
343
350
  const vb = svg.getAttribute('viewBox');
344
351
  if (vb) {
345
352
  const p = vb.split(/\s+/);
353
+ // Height: fit boundary + any bottom actors.
346
354
  p[3] = Math.max(parseFloat(p[3]), b.y + b.height + 120);
355
+ // Width: fit the rightmost actor + label margin. Without this, widening the
356
+ // boundary pushes right-column actors off the visible SVG.
357
+ const ACTOR_LABEL_MARGIN = 120; // covers stick figure width + longest label
358
+ const maxActorX = layout.actors.length
359
+ ? Math.max(...layout.actors.map(a => a.x))
360
+ : b.x + b.width;
361
+ p[2] = Math.max(parseFloat(p[2]), maxActorX + ACTOR_LABEL_MARGIN);
347
362
  svg.setAttribute('viewBox', p.join(' '));
348
363
  }
349
364
 
@@ -588,7 +603,7 @@ Fonts: 'Noto Sans Hebrew' + 'IBM Plex Mono' from Google Fonts
588
603
  </html>
589
604
  ```
590
605
 
591
- For a single-tab diagram, drop the tab bar, the split-rationale line, and the second `.diagram-part`; keep `diagramLayouts` as a one-element array so `showDiagram` / `fixLayout` wiring stays uniform.
606
+ **Single-tab diagrams still define the full script.** Always emit `diagramLayouts` (one-element array), `activeTab`, `currentLayout()`, **and `showDiagram(index)`**. Only the HTML-level tab bar and the second `.diagram-part` are conditional on splitting. Omitting `showDiagram` is a silent bug: a future edit that adds tabs will have dead onclick handlers with no console error pointing at the cause.
592
607
 
593
608
  ---
594
609
 
@@ -613,6 +628,8 @@ For a single-tab diagram, drop the tab bar, the split-rationale line, and the se
613
628
  - [ ] System actors drawn as stick figures with `«system»` label (not rectangles).
614
629
  - [ ] Every UC label describes an action WITH the information system (data entry, query, state change) — no bare physical verbs (`הכנת X`, `ספירת X`, `מסירת X`, `תשלום במזומן`). Physical verbs are wrapped with a system verb (`רישום`, `הזנה`, `עדכון`, `סימון`, etc.).
615
630
  - [ ] Every system-time / cron actor association has a `timing` field (and the rendered diagram shows a visible label at the line midpoint) — no unlabeled cron connections.
616
- - [ ] `fixLayout` uses adaptive column X (widens boundary if needed so left/center/right ellipses never overlap horizontally).
631
+ - [ ] No "send-only" UCs (no bare `שליחת X` / `הודעה ל-X`); message-sends are folded into the UC that decided to send.
632
+ - [ ] `showDiagram(index)` is defined in every generated file, even single-tab diagrams (so tab switching is wired if splitting is ever added).
633
+ - [ ] `fixLayout` uses adaptive column X (widens boundary if needed so left/center/right ellipses never overlap horizontally) AND expands viewBox width so right-side actors are not clipped.
617
634
  - [ ] If split: each tab has a split-rationale line citing the actual trigger that fired (count > 8, or 2+ disjoint actor groups); `showDiagram` and per-tab `fixLayout` wired per §11.
618
635
  - [ ] `diagramModel` defined per `model-shape.md`; VP export button present and wired to `exportXMI()`.