sad-mcp 0.1.30 → 0.1.32

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/dist/tools.js CHANGED
@@ -248,6 +248,20 @@ export function registerToolHandlers(server) {
248
248
  required: ["process_description"],
249
249
  },
250
250
  },
251
+ {
252
+ name: "bpmn_render",
253
+ description: "Render a BPMN model as an interactive HTML/SVG diagram. Call this ONLY after the user has reviewed and approved the analysis output from bpmn_analysis, and explicitly asked you to draw/render the diagram. Pass the JSON model from the analysis phase.",
254
+ inputSchema: {
255
+ type: "object",
256
+ properties: {
257
+ model_json: {
258
+ type: "string",
259
+ description: "The JSON model from the bpmn_analysis output (Section 8: מודל JSON)",
260
+ },
261
+ },
262
+ required: ["model_json"],
263
+ },
264
+ },
251
265
  ],
252
266
  }));
253
267
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
@@ -483,6 +497,18 @@ export function registerToolHandlers(server) {
483
497
  trackToolCall(name, toolArgs, { success: true, responseChars: fullResponse.length }, Date.now() - startTime);
484
498
  return { content: [{ type: "text", text: fullResponse }] };
485
499
  }
500
+ if (name === "bpmn_render") {
501
+ const modelJson = args.model_json;
502
+ if (!modelJson) {
503
+ return {
504
+ content: [{ type: "text", text: "Error: model_json parameter is required. Use the JSON model from bpmn_analysis output." }],
505
+ };
506
+ }
507
+ const instructions = loadSkillContent("bpmn-render");
508
+ const fullResponse = `${instructions}\n\n---\n\n## JSON Model to Render\n\n\`\`\`json\n${modelJson}\n\`\`\``;
509
+ trackToolCall(name, toolArgs, { success: true, responseChars: fullResponse.length }, Date.now() - startTime);
510
+ return { content: [{ type: "text", text: fullResponse }] };
511
+ }
486
512
  throw new Error(`Unknown tool: ${name}`);
487
513
  });
488
514
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sad-mcp",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "MCP server for Software Analysis and Design course materials at BGU",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,13 @@ You are a business process analyst. Analyze the process description and produce
9
9
 
10
10
  ## Critical Modeling Rules
11
11
 
12
- 1. **CUSTOMERS / EXTERNAL PARTIES get their own POOL**: If a customer, patient, citizen, or external company (e.g., חברת אשראי, ספק) acts independently they are a SEPARATE POOL with message flows. They are NOT a lane. The only exception: if the organization fully controls the participant's actions within its system (e.g., customer using a bank app).
12
+ 1. **EXTERNAL PARTIES get their own POOL**but the pool type depends on who controls the process:
13
+
14
+ - **Independent external** (acts on their own, organization cannot dictate their process — e.g., חברת אשראי processing a charge, ספק deciding delivery schedule, customer deciding whether to complain): → **Empty/collapsed pool**. NO tasks, NO gateways, NO events inside. Just a labeled rectangle. Message flows connect to/from the **pool border**.
15
+
16
+ - **Organization-controlled external** (follows a process dictated by the organization step by step — e.g., customer filling out the organization's form, patient following the clinic's intake procedure): → **Regular expanded pool** with tasks, start/end events, gateways, and sequence flows inside. Treated like a full pool.
17
+
18
+ External participants are NEVER lanes — they are always separate pools. The question is only whether the pool is empty or expanded.
13
19
 
14
20
  2. **DATA STORES are mandatory**: If any task involves "block account", "generate invoice", "credit account", "update record", "register", "look up", or any read/write to persistent state — a Data Store is required.
15
21
 
@@ -17,6 +23,29 @@ You are a business process analyst. Analyze the process description and produce
17
23
 
18
24
  4. **GATEWAYS have types**: Every gateway must be classified as XOR (exclusive — one path), AND (parallel — all paths), or OR (inclusive — one or more paths).
19
25
 
26
+ ## ⚠️ EMPTY POOL VALIDATION — Read This Before Writing JSON
27
+
28
+ An `external-empty` pool is JUST A LABEL. It has NOTHING inside it. Before finalizing your JSON, check every array and delete violations:
29
+
30
+ **❌ WRONG — these violate empty pool rules:**
31
+ ```json
32
+ { "id": "t1", "name": "יצירת קשר", "pool": "pool-customer" } ← task in empty pool!
33
+ { "id": "t10", "name": "זיכוי חשבון", "pool": "pool-credit" } ← task in empty pool!
34
+ { "id": "start-customer", "type": "start", "pool": "pool-customer" } ← event in empty pool!
35
+ { "id": "end-credit", "type": "end", "pool": "pool-credit" } ← event in empty pool!
36
+ { "from": "start-customer", "to": "t1" } ← sequence flow in empty pool!
37
+ ```
38
+
39
+ **✅ RIGHT — empty pools appear ONLY in:**
40
+ - `pools` array (with `"type": "external-empty"`)
41
+ - `messageFlows` array (with `"fromTask": null` or `"toTask": null` for the empty pool side)
42
+
43
+ **✅ RIGHT — customer's action is modeled as org-side task + message flow:**
44
+ ```json
45
+ { "id": "t2", "name": "קבלת פנייה מהלקוח", "pool": "pool-org", "lane": "lane-cs" }
46
+ { "from": "pool-customer", "to": "pool-org", "fromTask": null, "toTask": "t2", "description": "בקשת זיכוי" }
47
+ ```
48
+
20
49
  ## Analysis Steps
21
50
 
22
51
  ### Step 1 — Identify Participants
@@ -29,9 +58,13 @@ List every actor/role. Classify each as POOL or LANE:
29
58
 
30
59
  ### Step 2 — Identify Tasks
31
60
 
32
- List every action/task. Assign each to a specific lane or pool.
61
+ List every action/task. Assign each to:
62
+ - A **lane within the organization pool**, OR
63
+ - An **organization-controlled external pool** (expanded — has its own tasks)
64
+
65
+ Do NOT assign tasks to **independent external pools** — those are empty.
33
66
 
34
- Look for implied activities — phrases like "is expected to be in phone contact" or "will coordinate directly" describe real tasks, not annotations.
67
+ Look for implied activities — phrases like "is expected to be in phone contact" or "will coordinate directly" describe real tasks, not annotations. If an independent external party performs an action, model the organization's side of that interaction as a task in the relevant lane (e.g., "קבלת בקשה מהלקוח") with a message flow from the external pool border.
35
68
 
36
69
  ### Step 3 — Identify Gateways
37
70
 
@@ -53,20 +86,23 @@ List transient data flowing between tasks (e.g., "בקשת ביטול", "חשב
53
86
 
54
87
  ### Step 6 — Identify Flows
55
88
 
56
- - **Sequence flows** (within a pool): Task ordering within each pool
57
- - **Message flows** (between pools): Every communication between separate pools. Check bidirectional — every message expecting a response needs a return flow.
89
+ - **Sequence flows** (within pools that have tasks): Task ordering within the organization pool and within organization-controlled external pools. Independent external pools (empty) have NO sequence flows.
90
+ - **Message flows** (between pools): Every communication between pools. For **independent external pools** (empty), message flows connect to/from the **pool border** (not to any element inside — there are none). For **organization-controlled external pools** (expanded), message flows connect to specific tasks. Check bidirectional — every message expecting a response needs a return flow.
58
91
  - **Data associations**: Connections between tasks and data stores / data objects.
59
92
 
60
93
  ### Step 7 — Identify Events
61
94
 
62
- - **Start events**: One per pool
63
- - **End events**: One or more per pool (different outcomes)
95
+ Events exist in the **organization pool** and in **organization-controlled external pools** (expanded). NOT in independent external pools (empty).
96
+
97
+ - **Start events**: One per expanded pool (organization + organization-controlled external)
98
+ - **End events**: One or more per expanded pool (different outcomes)
64
99
  - **Intermediate events**: For passive waiting — when a participant waits for a signal/message
65
100
 
66
101
  ### Step 8 — Verify Completeness & Note Assumptions
67
102
 
68
- - Every pool has a complete flow: start → tasks/gateways → end
69
- - External parties have their full process modeled, not just a single task
103
+ - Every expanded pool (organization + organization-controlled external) has a complete flow: start → tasks/gateways → end
104
+ - Independent external pools are EMPTY no tasks, no events, no gateways inside them
105
+ - Every external participant mentioned in the description appears as a pool (empty or expanded, based on control)
70
106
  - List any assumptions you made about the process
71
107
  - List any open questions where the description was ambiguous
72
108
 
@@ -80,7 +116,8 @@ Show pools and lanes as a hierarchy:
80
116
 
81
117
  ```
82
118
  מאגרים (Pools):
83
- ├── לקוח (מאגר חיצוני — פועל באופן עצמאי)
119
+ ├── חברת אשראי (מאגר חיצוני — ריק, פועל באופן עצמאי)
120
+ ├── לקוח (מאגר חיצוני — מורחב, תהליך נשלט ע״י הארגון)
84
121
  └── חברת אישימוטו (מאגר ארגוני)
85
122
  ├── שירות לקוחות
86
123
  ├── שימור לקוחות
@@ -89,7 +126,7 @@ Show pools and lanes as a hierarchy:
89
126
 
90
127
  ### Section 2: זרימת העבודה (Workflow)
91
128
 
92
- For each pool and lane, show the task flow as a numbered list with gateway branches indented:
129
+ For each **expanded pool** (organization lanes + organization-controlled external pools), show the task flow as a numbered list with gateway branches indented. Do NOT show workflow for independent external pools (they are empty):
93
130
 
94
131
  ```
95
132
  שירות לקוחות:
@@ -114,7 +151,7 @@ Each data object with source task and target task.
114
151
 
115
152
  ### Section 6: זרימות הודעות (Message Flows)
116
153
 
117
- Between which pools, what's communicated, direction.
154
+ Between which pools, what's communicated, direction. For **independent external pools** (empty), the message flow connects to/from the **pool border**. For expanded pools (organization or organization-controlled external), specify which task sends/receives the message.
118
155
 
119
156
  ### Section 7: הנחות ושאלות פתוחות (Assumptions & Open Questions)
120
157
 
@@ -129,14 +166,19 @@ Output the complete structured model as a JSON code block. This is the machine-r
129
166
  "title": { "he": "שם התהליך", "en": "Process Name" },
130
167
  "pools": [
131
168
  {
132
- "id": "pool-id",
133
- "name": "שם המאגר",
134
- "type": "external",
135
- "reason": "why this is a separate pool",
136
- "lanes": []
169
+ "id": "pool-customer",
170
+ "name": "לקוח",
171
+ "type": "external-empty",
172
+ "reason": "acts independently empty pool, no internal elements"
173
+ },
174
+ {
175
+ "id": "pool-patient",
176
+ "name": "מטופל",
177
+ "type": "external-expanded",
178
+ "reason": "follows clinic's prescribed intake process"
137
179
  },
138
180
  {
139
- "id": "org-id",
181
+ "id": "pool-org",
140
182
  "name": "שם הארגון",
141
183
  "type": "organization",
142
184
  "reason": "main organization",
@@ -149,8 +191,8 @@ Output the complete structured model as a JSON code block. This is the machine-r
149
191
  {
150
192
  "id": "task-id",
151
193
  "name": "שם המשימה",
152
- "pool": "pool-id",
153
- "lane": "lane-id-or-null",
194
+ "pool": "pool-org",
195
+ "lane": "lane-id",
154
196
  "description": "optional details"
155
197
  }
156
198
  ],
@@ -160,8 +202,8 @@ Output the complete structured model as a JSON code block. This is the machine-r
160
202
  "type": "XOR",
161
203
  "role": "split",
162
204
  "question": "מה השאלה?",
163
- "pool": "pool-id",
164
- "lane": "lane-id-or-null",
205
+ "pool": "pool-org",
206
+ "lane": "lane-id",
165
207
  "branches": [
166
208
  { "label": "תיאור הענף", "target": "task-or-gw-id" }
167
209
  ]
@@ -187,8 +229,8 @@ Output the complete structured model as a JSON code block. This is the machine-r
187
229
  {
188
230
  "id": "event-id",
189
231
  "type": "start",
190
- "pool": "pool-id",
191
- "lane": "lane-id-or-null",
232
+ "pool": "pool-org",
233
+ "lane": "lane-id",
192
234
  "name": "תיאור האירוע"
193
235
  }
194
236
  ],
@@ -196,7 +238,7 @@ Output the complete structured model as a JSON code block. This is the machine-r
196
238
  { "from": "element-id", "to": "element-id", "label": "optional" }
197
239
  ],
198
240
  "messageFlows": [
199
- { "from": "pool-id", "to": "pool-id", "description": "מה מועבר" }
241
+ { "from": "pool-customer", "to": "pool-org", "fromTask": null, "toTask": "task-id", "description": "מה מועבר" }
200
242
  ],
201
243
  "assumptions": [
202
244
  "הנחה שנעשתה..."
@@ -207,11 +249,26 @@ Output the complete structured model as a JSON code block. This is the machine-r
207
249
  }
208
250
  ```
209
251
 
210
- ## After the Analysis
252
+ ## Final JSON Validation Checklist
253
+
254
+ Before outputting the JSON, scan every array and verify:
255
+
256
+ 1. **`tasks` array**: Every task has `"pool": "pool-org"` (or an `external-expanded` pool). NO task has `"pool"` pointing to an `external-empty` pool.
257
+ 2. **`events` array**: Every event has `"pool": "pool-org"` (or an `external-expanded` pool). NO event has `"pool"` pointing to an `external-empty` pool.
258
+ 3. **`gateways` array**: Every gateway has `"pool": "pool-org"` (or an `external-expanded` pool). NO gateway has `"pool"` pointing to an `external-empty` pool.
259
+ 4. **`sequenceFlows` array**: NO sequence flow references any element in an `external-empty` pool.
260
+ 5. **`messageFlows` array**: For `external-empty` pools, `fromTask` or `toTask` is `null` (connects to pool border). The other side points to a specific task in the org pool.
261
+ 6. **`pools` array**: Empty pools use `"type": "external-empty"`. NOT `"external"`.
262
+
263
+ If any violation is found, fix it — move the action to the org side and add a message flow instead.
264
+
265
+ ## After the Analysis — STOP
266
+
267
+ After outputting the analysis, you MUST stop and wait for user feedback. Do NOT proceed to create a diagram, HTML file, or any visual output. Do NOT call any other tools. End your response with exactly this text:
211
268
 
212
- End your response with:
269
+ **"זהו הניתוח המבני של התהליך. אפשר לבקש תיקונים או שינויים. כשהמודל מאושר, אמרו ״צייר את הדיאגרמה״ ואצור קובץ BPMN."**
213
270
 
214
- **"זהו הניתוח המבני של התהליך. אפשר לבקש תיקונים או שינויים. כשהמודל מאושר, אפשר לבקש ממני לצייר את דיאגרמת ה-BPMN."**
271
+ Your response ends here. Do not continue.
215
272
 
216
273
  ## Hebrew Language Guidelines
217
274
 
@@ -1,35 +1,78 @@
1
1
  ---
2
2
  name: bpmn-render
3
- description: "Internal skill: Render an approved BPMN structural model as an interactive HTML/SVG file. Do not invoke directly — use bpmn-diagram first to build the model."
3
+ description: "Render an approved BPMN structural model as an interactive HTML/SVG file."
4
4
  ---
5
5
 
6
- # BPMN Rendering — Phase 2 & 3
6
+ # BPMN Rendering
7
7
 
8
- You have an approved structural model from the conversation above (output of the `bpmn-diagram` prompt). Now render it as an HTML file with embedded SVG, then validate.
8
+ You have an approved structural model (the JSON below). Render it as a single self-contained HTML file with embedded SVG.
9
9
 
10
- **Every participant, task, gateway, data store, data object, and flow from the approved model MUST appear in the SVG. Do not add or remove elements.**
10
+ **Every participant, task, gateway, data store, data object, and flow from the model MUST appear in the SVG. Do not add or remove elements. The header pool/lane count MUST match the actual diagram.**
11
11
 
12
- ## NON-NEGOTIABLE RENDERING RULES
12
+ ## NON-NEGOTIABLE RULES
13
13
 
14
- 1. **GATEWAYS**: The diamond contains ONLY the marker symbol: **X** (XOR), **+** (AND), or **O** (OR). NEVER text inside. Labels go ABOVE the diamond. Every gateway (split AND merge) must show its marker.
14
+ 1. **GATEWAYS**: The diamond contains ONLY a marker symbol. NEVER text inside. Labels go ABOVE the diamond. Every gateway (split AND merge) must show its marker.
15
15
 
16
- 2. **EXTERNAL PARTICIPANTS** are separate pools with message flows (dashed). NOT lanes.
16
+ 2. **EXTERNAL PARTICIPANT POOLS**: Separate pool rectangles with message flows (dashed). NOT lanes.
17
17
 
18
- 3. **DATA STORES** appear as cylinders with data association lines to their tasks.
18
+ 3. **EMPTY POOLS** (external participants with no internal tasks): Message flows connect to/from the **pool border itself** — NOT to any element inside. The pool is just a labeled rectangle. No start/end events inside empty pools.
19
19
 
20
- 4. **NO ELEMENTS ON LANE BOUNDARIES**: Every element fully inside one lane, centered vertically.
20
+ 4. **DATA STORES** appear as cylinders with data association lines to their tasks.
21
+
22
+ 5. **NO ELEMENTS ON LANE BOUNDARIES**: Every element fully inside one lane, centered vertically.
23
+
24
+ 6. **HEADER ACCURACY**: The header must show the correct count of pools and lanes matching the actual diagram. Count external pools + organization pool.
25
+
26
+ 7. **NO LEGEND**: Do not include a legend section. Students know BPMN notation.
27
+
28
+ ## Gateway Marker Styling
29
+
30
+ Gateway markers must be clean and visually prominent. Use SVG paths, not text characters:
31
+
32
+ ### XOR Gateway — bold X
33
+ ```svg
34
+ <g class="gateway-group">
35
+ <rect x="X" y="Y" width="34" height="34" fill="#fff8e1" stroke="#f9a825" stroke-width="2" transform="rotate(45, CX, CY)"/>
36
+ <line x1="CX-8" y1="CY-8" x2="CX+8" y2="CY+8" stroke="#e65100" stroke-width="3" stroke-linecap="round"/>
37
+ <line x1="CX+8" y1="CY-8" x2="CX-8" y2="CY+8" stroke="#e65100" stroke-width="3" stroke-linecap="round"/>
38
+ </g>
39
+ <text x="CX" y="CY-28" text-anchor="middle" class="gateway-label">label here</text>
40
+ ```
41
+
42
+ ### AND Gateway — bold +
43
+ ```svg
44
+ <g class="gateway-group">
45
+ <rect x="X" y="Y" width="34" height="34" fill="#e8f5e9" stroke="#2e7d32" stroke-width="2" transform="rotate(45, CX, CY)"/>
46
+ <line x1="CX" y1="CY-9" x2="CX" y2="CY+9" stroke="#1b5e20" stroke-width="3" stroke-linecap="round"/>
47
+ <line x1="CX-9" y1="CY" x2="CX+9" y2="CY" stroke="#1b5e20" stroke-width="3" stroke-linecap="round"/>
48
+ </g>
49
+ <text x="CX" y="CY-28" text-anchor="middle" class="gateway-label">label here</text>
50
+ ```
51
+
52
+ ### OR Gateway — bold O
53
+ ```svg
54
+ <g class="gateway-group">
55
+ <rect x="X" y="Y" width="34" height="34" fill="#e3f2fd" stroke="#1565c0" stroke-width="2" transform="rotate(45, CX, CY)"/>
56
+ <circle cx="CX" cy="CY" r="9" fill="none" stroke="#0d47a1" stroke-width="3"/>
57
+ </g>
58
+ <text x="CX" y="CY-28" text-anchor="middle" class="gateway-label">label here</text>
59
+ ```
21
60
 
22
61
  ## Architecture & Layout
23
62
 
24
63
  ### Pools and Lanes
25
64
 
26
65
  - **External participant pools**: Own pool rectangle, visually separated. Brown header, orange tasks (`#fff3e0` fill, `#e65100` stroke).
66
+ - **Empty external pools**: Just a labeled rectangle (header bar + empty body). No elements inside. Height: ~60px.
27
67
  - **Organization pool**: Dark gray header, contains internal lanes. Each lane has a labeled sidebar and subtle background tint. Dashed divider lines between lanes.
28
68
  - Pool headers: Vertical text bars on the left side.
29
69
 
30
- ### Element Placement
70
+ ### Message Flows with Empty Pools
31
71
 
32
- Every BPMN element must be fully contained within a single lane or pool. Center elements vertically within their lane with visible spacing from borders.
72
+ When a message flow connects to/from an empty pool:
73
+ - The arrow starts/ends at the **pool border** (the rectangle edge)
74
+ - It does NOT connect to any element inside the pool
75
+ - Use dashed lines (`stroke-dasharray: 10 5`), open circle at source, filled arrow at target
33
76
 
34
77
  ### Color Scheme
35
78
 
@@ -39,6 +82,8 @@ Every BPMN element must be fully contained within a single lane or pool. Center
39
82
  | Reception/admin tasks | `#e3f2fd` | `#1976d2` |
40
83
  | Clinical/operational tasks | `#f3e5f5` | `#7b1fa2` |
41
84
  | XOR Gateways | `#fff8e1` | `#f9a825` |
85
+ | AND Gateways | `#e8f5e9` | `#2e7d32` |
86
+ | OR Gateways | `#e3f2fd` | `#1565c0` |
42
87
  | Start event | `#e8f5e9` | `#2e7d32` |
43
88
  | End event | `#ffebee` | `#c62828` |
44
89
  | Data objects | `#fff` | `#1565c0` |
@@ -47,8 +92,9 @@ Every BPMN element must be fully contained within a single lane or pool. Center
47
92
  ### Pool Ordering
48
93
 
49
94
  When multiple external pools exist, minimize message flow crossing distance:
50
- - Primary actor (initiates, interacts with multiple parties) in the middle
51
- - Interacting pools above and below
95
+ - Primary actor (initiates, interacts with multiple parties) near top
96
+ - Organization pool in the middle
97
+ - Supporting external participants (credit company, supplier) at bottom
52
98
 
53
99
  ### Flow Types
54
100
 
@@ -58,22 +104,44 @@ When multiple external pools exist, minimize message flow crossing distance:
58
104
  - Data object: `#7986cb`
59
105
  - Data store: `#4caf50`
60
106
 
61
- ## SVG Templates
62
-
63
- ### XOR Gateway (split or merge)
64
-
65
- ```svg
66
- <rect x="X" y="Y" width="34" height="34" class="gateway" transform="rotate(45, CX, CY)"/>
67
- <line x1="CX-7" y1="CY-10" x2="CX+7" y2="CY+10" class="gateway-x"/>
68
- <line x1="CX+7" y1="CY-10" x2="CX-7" y2="CY+10" class="gateway-x"/>
69
- <text x="CX" y="CY-25" text-anchor="middle">label ABOVE diamond</text>
107
+ ## Interactivity
108
+
109
+ Make the diagram interactive with hover tooltips and click behavior:
110
+
111
+ ### Clickable Tasks
112
+ Each task rectangle should show a tooltip on hover with:
113
+ - The task name
114
+ - Which pool/lane it belongs to
115
+ - Any data stores it reads from or writes to
116
+
117
+ ### Clickable Gateways
118
+ Each gateway should show a tooltip on hover with:
119
+ - Gateway type (XOR/AND/OR)
120
+ - The decision question
121
+ - The branch conditions and where each leads
122
+
123
+ ### Clickable Data Stores
124
+ Each data store should show a tooltip on hover with:
125
+ - The data store name
126
+ - Which tasks read from it
127
+ - Which tasks write to it
128
+
129
+ ### Implementation
130
+ Use CSS hover tooltips or simple JavaScript click-to-show panels. Keep it lightweight — no external libraries. Example approach:
131
+
132
+ ```html
133
+ <style>
134
+ .bpmn-tooltip { display: none; position: absolute; background: #1a1a2e; color: #fff;
135
+ padding: 8px 12px; border-radius: 6px; font-size: 12px; max-width: 250px;
136
+ z-index: 100; direction: rtl; pointer-events: none; }
137
+ .bpmn-element:hover .bpmn-tooltip { display: block; }
138
+ </style>
70
139
  ```
71
140
 
72
- **WRONG never do this:**
73
- ```svg
74
- <polygon points="..." fill="..." stroke="..."/>
75
- <text x="CX" y="CY">text inside diamond</text> <!-- FORBIDDEN -->
76
- ```
141
+ ### Assumptions Panel
142
+ If the model includes assumptions or open questions, show a small floating info button in the top-right corner. Clicking it shows the assumptions list.
143
+
144
+ ## SVG Templates
77
145
 
78
146
  ### Intermediate Events (BPMN 1.1)
79
147
 
@@ -99,39 +167,16 @@ Plain double circle, NO icon inside:
99
167
  <ellipse cx="CX" cy="BOTTOM" rx="28" ry="8" class="data-store-body"/>
100
168
  ```
101
169
 
102
- ### Data Artifact Placement
103
-
104
- - Data objects above or below their task, never overlapping flow lines
105
- - Data stores typically below their tasks
106
- - Association lines must not cross sequence flow arrows
107
-
108
170
  ## Arrow Routing
109
171
 
110
172
  **Arrows must never be ambiguous.**
111
173
 
112
- ### Split-Merge Pattern
113
-
114
- 1. YES task above gateway center, NO task below
115
- 2. Merge gateway to the right of BOTH tasks
116
- 3. YES path: task → right → down into merge (from top)
117
- 4. NO path: task → right → up into merge (from bottom)
118
- 5. Single clean line from merge to next task
119
-
120
- ### General Rules
121
-
122
174
  - Orthogonal (right-angle) routing preferred
123
175
  - At least 30px between parallel flow lines
124
176
  - Cross-lane flows: clear vertical drops/rises
125
177
  - Labels (כן/לא) near the gateway, not at path end
126
178
  - Flow labels must not overlap other elements
127
179
 
128
- ### Rejection/Retry Loops
129
-
130
- - Rejection = explicit task (not just gateway output)
131
- - After rejection: model the rejecting participant's next state
132
- - Response to rejection = concrete task sequence
133
- - Loop-back to earliest meaningful re-entry point
134
-
135
180
  ## Typography & Hebrew
136
181
 
137
182
  - `Noto Sans Hebrew` from Google Fonts
@@ -145,43 +190,38 @@ Plain double circle, NO icon inside:
145
190
 
146
191
  Single self-contained HTML file:
147
192
 
148
- 1. **Header bar**: Gradient, process title in Hebrew + English subtitle. Must say "BPMN 1.1"
149
- 2. **Legend**: All BPMN symbols used (start, end, task, XOR gateway, intermediate event, data object, data store, message flow)
150
- 3. **SVG canvas**: Full diagram in scrollable wrapper
151
- 4. **SVG definitions**: Drop shadow filters, arrow markers
193
+ 1. **Header bar**: Gradient, process title in Hebrew + English subtitle. Must say "BPMN 1.1". Show correct pool and lane counts.
194
+ 2. **SVG canvas**: Full diagram in scrollable wrapper
195
+ 3. **SVG definitions**: Drop shadow filters, arrow markers
196
+ 4. **Interactivity**: Hover tooltips on all elements
197
+ 5. **NO LEGEND**: Do not include a legend.
152
198
 
153
199
  ### SVG Sizing
154
200
 
155
201
  - Width: 1700–1800px (overflow scroll)
156
- - Height: ~130px per external pool, ~250px per lane, plus data artifacts
202
+ - Height: ~60px per empty external pool, ~130px per external pool with tasks, ~250px per lane, plus data artifacts
157
203
  - `viewBox` matching width/height
158
204
 
159
205
  ---
160
206
 
161
- # PHASE 3 — VALIDATION
207
+ # VALIDATION
162
208
 
163
- **Before delivering, verify EVERY item. Fix any failure before delivering.**
209
+ **Before delivering, verify EVERY item. Fix any failure.**
164
210
 
165
- ## Structural Accuracy (cross-reference with approved model)
211
+ ## Structural Accuracy
166
212
  - [ ] Every participant from the model appears — none omitted
167
213
  - [ ] External participants are separate pools with message flows
168
- - [ ] Every pool has complete flow (start ... end)
169
- - [ ] Every gateway has the correct type marker (X/+/O) — no text inside
214
+ - [ ] Empty pools have NO elements inside message flows connect to pool border
215
+ - [ ] Every pool has complete flow (start ... → end) — except empty external pools
216
+ - [ ] Every gateway has the correct type marker (bold X/+/O via SVG paths) — no text inside
170
217
  - [ ] Every data store appears as a cylinder with data associations
171
218
  - [ ] Every message flow appears as dashed line between pools
219
+ - [ ] Header pool/lane count matches actual diagram
172
220
 
173
- ## BPMN Compliance
174
- - [ ] Gateway labels ABOVE or BESIDE the diamond, never inside
175
- - [ ] Every element fully inside one lane nothing on boundaries
176
- - [ ] Passive waiting uses intermediate events, not tasks
177
- - [ ] Data objects (folded document) and data stores (cylinder) are visually distinct
178
-
179
- ## Visual Quality
180
- - [ ] No arrow paths overlap or cross ambiguously
181
- - [ ] Flow labels clearly positioned near their gateway
182
- - [ ] Legend includes every symbol type used
183
- - [ ] Data artifacts don't overlap sequence flow paths
184
- - [ ] Pool ordering minimizes message flow crossing distance
221
+ ## Interactivity
222
+ - [ ] Tasks show tooltips on hover
223
+ - [ ] Gateways show tooltips with decision question and branches
224
+ - [ ] Data stores show tooltips with connected tasks
185
225
 
186
226
  ## Hebrew Language
187
- - [ ] Male grammatical form used for all roles (רופא not אחות, אח not אחות, מטופל not מטופלת)
227
+ - [ ] Male grammatical form used for all roles