sad-mcp 2.3.2 → 2.3.4

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.
@@ -348,7 +348,7 @@ export function validateModel(model) {
348
348
  const isHuman = !pa || pa.actorType !== "system";
349
349
  const wfMissing = typeof wf !== "string" || wf.trim() === "";
350
350
  if (isHuman && wfMissing) {
351
- warn("wireframe-missing", `${path}.wireframe`, `UC "${id}" has a human primary actor ("${primaryActor}") but no wireframe. Wireframes are opt-in per §WF — add one only if the user requested wireframes.`);
351
+ err("wireframe-missing", `${path}.wireframe`, `UC "${id}" has a human primary actor ("${primaryActor}") but no wireframe. Wireframes are mandatory for every human-initiated UC (§WF) — add one.`);
352
352
  }
353
353
  }
354
354
  if (typeof wf === "string" && wf.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sad-mcp",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "MCP server for Software Analysis and Design course materials at BGU",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,7 +5,7 @@ Source lectures: שיעורים 6-7 תרשים מחלקות.pptx, ניתוץ ש
5
5
  ## Elements Taught
6
6
 
7
7
  - **Classes** — three compartments: name, attributes, operations
8
- - **Enumerations** — `«enumeration»` stereotype; use when: closed list, textual values, ≤~20 items. Do NOT use for open-ended or numeric choices
8
+ - **Enumerations** — `«enumeration»` stereotype; use when: closed list, textual values, ≤~20 items. Do NOT use for open-ended or numeric choices. Draw as an **unconnected box** next to the class that uses it — no dependency or association line to the class.
9
9
  - **Packages (חבילה)** — grouping mechanism for related classes; taught as an organizational concept
10
10
  - **Abstract classes / interfaces** — not explicitly covered in lectures; avoid adding unless user asks
11
11
 
@@ -69,7 +69,7 @@ Source lectures: שיעורים 6-7 תרשים מחלקות.pptx, ניתוץ ש
69
69
  - Strict LEFT/CENTER/RIGHT zone layout — lectures don't prescribe this
70
70
  - Interactive composition-toggle panel — not a teaching concept
71
71
  - Enumerations placed only in a "RIGHT zone" — not explicitly taught
72
- - No dependency lines from enums to classes — not mentioned; lectures use dependencies normally
72
+ - Enumerations are drawn as **unconnected boxes** next to their using class the course does **not** draw a dependency (or any) line from a class to an enum; the attribute type reference is the only link (instructor rule, 2026)
73
73
  - Association class connected to midpoint — taught in principle but not the dashed-line-to-midpoint rule specifically
74
74
 
75
75
  ### Rules lectures teach that SKILL.md omits or misrepresents
@@ -66,6 +66,7 @@ Two common false positives:
66
66
  - Use enumerations when: closed list, textual values, ≤~20 items, will not change often
67
67
  - Do NOT use for open-ended, numeric, or frequently changing value sets
68
68
  - Place enumerations adjacent to the class that uses them, not in a fixed zone
69
+ - **Do NOT connect an enumeration to a class with any line** (no dependency, no association). The attribute type reference (`status : RegistrationStatus`) is the only link. `type: 'dep'` in RELS is not used.
69
70
 
70
71
  ### Packages (חבילה)
71
72
  - Draw as a tabbed rectangle enclosing related classes
@@ -83,11 +84,11 @@ Two common false positives:
83
84
  | Aggregation | Solid | Hollow diamond at whole | "has-a", part can exist independently |
84
85
  | Composition | Solid | Filled diamond at whole | Part cannot exist without whole |
85
86
  | Generalization | Solid | Hollow triangle at parent | True is-a; subtypes have different attributes/ops |
86
- | Dependency | Dashed | Open arrow | **ONLY** when a class references an enumeration type as an attribute type. Never between two regular classes — use plain association instead |
87
+ | Dependency | Dashed | Open arrow | **Not used in this course's class diagrams.** Enumerations are NOT connected to their using class by any line (see §2 / §3 CRITICAL). Never draw a dependency between two regular classes either — use a plain association. |
87
88
 
88
89
  > **CRITICAL — domain diagram association rules:**
89
90
  > - Plain association (──): the default for every class-to-class relationship. No arrowheads.
90
- > - Dependency (---→): only for enumeration usage. Never on class-to-class relationships.
91
+ > - Dependency (---→): **not used at all.** Enumerations are drawn as unconnected boxes placed next to their using class — no line of any kind. The attribute type reference (`status : RegistrationStatus`) is the only link. Do not draw a dependency between two regular classes either.
91
92
  > - Directed association (──→): never in a domain or analysis diagram.
92
93
 
93
94
  **Multiplicity at both ends of every association**: `1`, `0..1`, `1..*`, `0..*`. Never leave one end unlabeled.
@@ -484,7 +485,7 @@ When in doubt, use the male form.
484
485
  - [ ] Hebrew names use male form
485
486
  - [ ] **No raw SVG class boxes** — class boxes are rendered by `svgBox()` from `CLASSES` data, not hand-written SVG
486
487
  - [ ] **No arrowheads on plain associations** — `type: 'assoc'` in RELS produces no marker; directed association never appears in domain/analysis diagrams
487
- - [ ] **Dependency (---→) only for enum usage** — `type: 'dep'` only when a class references an enum type; never between two regular classes
488
+ - [ ] **No dependency lines at all** — enumerations are unconnected boxes placed near their using class (no `type: 'dep'`); dependency is not used in this course's class diagrams, and never between two regular classes
488
489
  - [ ] **`<html>` has no `dir="rtl"`** — SVG coordinates are LTR; page language does not affect SVG rendering
489
490
  - [ ] **`boxH()` / `boxW()` from §9d engine used** — never hardcode box dimensions in data or SVG
490
491
  - [ ] **Attribute/operation rows: `text-anchor="start"` at `x = box.x + 6`** — enforced by engine; do not override
@@ -200,7 +200,7 @@ UC documentation: [uc-id]
200
200
  - בתור [תפקיד שונה או אותו תפקיד עם מטרה שונה], אני רוצה [...], כדי ש[...].
201
201
  - ... (keep adding until every user-facing goal tied to this UC is represented)
202
202
 
203
- wireframe?: (optional only where the UC benefits from a UI mock; see §WF)
203
+ wireframe: (REQUIRED for every human-initiated UC; omit only for system/cron primary actors and include-targets see §WF)
204
204
  ```
205
205
 
206
206
  **Gates enforced before publishing:**
@@ -652,15 +652,13 @@ Every connection from a system-time actor MUST carry a `timing` field:
652
652
 
653
653
  ---
654
654
 
655
- ## §WF. Wireframe Authoring (Opt-In)
655
+ ## §WF. Wireframe Authoring (Always On)
656
656
 
657
- **Wireframes are generated only when the user explicitly requests them** (e.g., "add wireframes", "include UI mocks"). Do not generate wireframes unless asked they significantly increase generation time.
658
-
659
- When wireframes are requested, generate them only for UCs whose `primaryActor.actorType === 'human'`. Skip wireframes for:
657
+ **Generate a wireframe for every human-initiated UC always.** This course wants a UI mock on every human-facing screen; author them as part of normal generation, not on request. Generate a wireframe for every UC whose `primaryActor.actorType === 'human'`. Skip wireframes ONLY for:
660
658
  - UCs whose primary actor is a system or cron (`actorType: 'system'`) — no human sees a screen.
661
659
  - Pure include-target UCs (sub-behaviors with no actor association).
662
660
 
663
- When generated, emit a wireframe as an inline HTML fragment and attach it to `useCaseDocs[ucId].wireframe`. The modal renderer (§8a) injects the fragment after passing a safety check (see `wireframeSafe()` in §8a).
661
+ Emit each wireframe as an inline HTML fragment and attach it to `useCaseDocs[ucId].wireframe` (and thus to the derived `diagramModel` useCase element). The modal renderer (§8a) injects the fragment after passing a safety check (see `wireframeSafe()` in §8a). A missing wireframe on a human-initiated UC is a validation ERROR (§12).
664
662
 
665
663
  Claude authors the wireframe using its own UI-generation judgment — there is no DSL. But the skill enforces a consistent look and safe sandbox via a scoped CSS theme and a set of forbidden patterns.
666
664
 
@@ -903,7 +901,8 @@ The validator runs locally (no API cost) and catches what the §4 and CR gates c
903
901
  - Extensions referencing invalid step numbers → ERROR
904
902
  - Narrative text missing Hebrew characters (description, preconditions, postconditions, flow/extension text, user stories, assumptions, openQuestions) → ERROR
905
903
  - Unsafe wireframe HTML (script / on*= / iframe / external URL / @import / inline style) → ERROR
906
- - Warnings: fewer than 2 user stories on a UC, no preconditions/postconditions, overall >2 include+extend relationships, wireframe present on a UC when none were requested
904
+ - Missing wireframe on a human-initiated UC (§WF wireframes are mandatory) ERROR
905
+ - Warnings: fewer than 2 user stories on a UC, no preconditions/postconditions, overall >2 include+extend relationships
907
906
 
908
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`.**
909
908
 
@@ -921,7 +920,7 @@ Briefly report: actor count, use case count, include/extend count, whether split
921
920
  - [ ] Every `primaryActor` id exists in `actors[]` AND has an association with `role: 'initiator'` on that UC (aligning §4.1 with §4.4).
922
921
  - [ ] Every flow step of `kind: 'actor'` references a real actor id; every `kind: 'include'` references a real UC id; every `extension.at` references a valid step number in its scenario's flow.
923
922
  - [ ] Clicking a UC on the diagram opens the full-screen modal (§8a); Esc / backdrop click closes it. Step actor/UC references are clickable. Actor popup + association popup (§8b) still work for non-UC clicks.
924
- - [ ] Wireframes generated only if the user explicitly requested them (§WF). If generated, only for human-initiated UCs; system/cron and include-targets omitted.
923
+ - [ ] Wireframes generated for EVERY human-initiated UC (§WF mandatory); system/cron primary actors and include-targets omitted.
925
924
  - [ ] Any `wireframe` HTML passes `wireframeSafe()` (no `<script>`, no `on*=`, no `<iframe>`, no external URLs, no `@import`, no inline `<style>`); all classes are `wf-*` only; visible text is in Hebrew.
926
925
  - [ ] Every actor-UC association has a written §4.1 justification block (role, initiates? one-line "why"); every UC has ≥1 association with `initiates = yes`.
927
926
  - [ ] Every association line carries a transparent click-hitbox (stroke-width ≥12, `data-conn-id`) wired to `showDesc(id,'assoc',event)`; `assocDescriptions` entry exists for each id.