sad-mcp 0.1.22 → 0.1.24

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": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "MCP server for Software Analysis and Design course materials at BGU",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,7 +5,23 @@ description: Create BPMN (Business Process Model and Notation) diagrams as inter
5
5
 
6
6
  # BPMN Diagram Creation Skill
7
7
 
8
- This skill creates professional, standards-compliant BPMN diagrams rendered as interactive HTML files with embedded SVG. The diagrams support Hebrew (RTL) and English text, and follow BPMN 2.0 notation with BPMN 1.1-style intermediate events (plain double circles without internal icons).
8
+ This skill creates professional BPMN 1.1 diagrams rendered as interactive HTML files with embedded SVG. The diagrams support Hebrew (RTL) and English text.
9
+
10
+ **This skill operates in 3 phases. You MUST complete each phase fully before moving to the next.**
11
+
12
+ ## NON-NEGOTIABLE RULES — READ BEFORE ANYTHING ELSE
13
+
14
+ These rules are violated most often. You MUST follow every one. No exceptions.
15
+
16
+ 1. **GATEWAYS**: The diamond shape contains ONLY a marker symbol: **X** (XOR), **+** (AND), or **O** (OR). NEVER put text/labels inside the diamond. Labels go ABOVE the diamond. Every gateway (split AND merge) must have its marker.
17
+
18
+ 2. **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 (dashed lines) between pools. 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).
19
+
20
+ 3. **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 — you MUST draw a Data Store (cylinder) with data associations connecting it to the relevant tasks.
21
+
22
+ 4. **NO ELEMENTS ON LANE BOUNDARIES**: Every task, gateway, and event must be fully inside one lane, centered vertically with clear spacing from lane borders.
23
+
24
+ 5. **EVERY PARTICIPANT MUST APPEAR**: If the process description mentions a customer/patient/company — they MUST appear in the diagram. Never omit a participant.
9
25
 
10
26
  ## When to Use
11
27
 
@@ -14,72 +30,133 @@ This skill creates professional, standards-compliant BPMN diagrams rendered as i
14
30
  - User provides a process narrative in any language and wants a BPMN representation
15
31
  - User asks to model a process with swim lanes, pools, gateways, or data flows
16
32
 
17
- ## Process Analysis — Before Drawing
33
+ ---
18
34
 
19
- Before writing any SVG code, analyze the process description to identify:
35
+ # ═══════════════════════════════════════════════════
36
+ # PHASE 1 — STRUCTURAL MODEL (text only, NO SVG)
37
+ # ═══════════════════════════════════════════════════
20
38
 
21
- 1. **Participants CRITICAL (Pool vs Lane)**: Who are the actors? Classify each based on **process control**, not just organizational membership:
22
- - If the participant acts **independently** and communicates with the organization from outside (e.g., a customer calling to cancel a subscription, a patient arriving at a clinic, a citizen filing a complaint, an external company like a credit card company or supplier) → **separate pool** with message flows
23
- - If the organization **dictates and controls** how the participant performs their activities within its own system (e.g., a customer using the bank's app to make a transaction, a user following a guided online workflow) → **lane** within the organization pool with sequence flows
24
- - Internal roles within the same organization → **lanes** within one pool
25
- - **The test**: "Does the organization orchestrate this participant's actions, or do they act on their own initiative?" If they act independently → separate pool
26
- 2. **Activities/Tasks**: List every action/task mentioned
27
- 3. **Decision Points**: Identify every conditional branch (if/else, exists/doesn't exist)
28
- 4. **Data**: What information is created, read, updated, or stored?
29
- 5. **Handoffs**: Where does work pass between participants? These become message flows between pools or sequence flows between lanes
30
- 6. **Waiting Points**: Is any participant passively waiting? Use intermediate events, not regular tasks
31
- 7. **Data Persistence — CRITICAL**: Model a Data Store whenever the process involves persistent storage. **Trigger words** that require a data store: "system", "database", "account", "record", "registry". **Action verbs** that imply a data store: "block account", "update record", "generate invoice", "credit account", "register", "log", "store", "look up", "check status". If a task reads from or writes to shared persistent state, it MUST have a data association to a data store. Do NOT substitute a lightweight Data Object when persistent shared storage is implied. A system = a data store. An account = a data store.
32
- 8. **Complete Each Participant's Flow**: Every pool must have its own complete internal sequence flow (start → tasks → end), even for external parties. If the description says "Company X will handle the complaint," model the full handling sequence inside that pool (receive → process → respond → close), not just the first step. Never collapse an external participant's process into a single task or annotation.
33
- 9. **Bidirectional Communication**: When one participant sends something to another, check: does the receiver send something back? Every message flow that triggers a response must have a corresponding return message flow. Model both directions explicitly. Common pairs: request→acknowledgment, notification→confirmation, complaint→response.
34
- 10. **Implied Activities**: Read the description for activities that are described but not explicitly named as "tasks." Phrases like "she can and is expected to be in phone contact" or "will coordinate directly" describe real activities that should be modeled as tasks, NOT as text annotations. Annotations are only for meta-information that clarifies context but isn't an executable step.
39
+ In this phase you analyze the process description and output a structured text model. Do NOT write any HTML, SVG, or code. Only text analysis.
35
40
 
36
- ## Mandatory Structural Analysis Output — CRITICAL
41
+ ## Step 1.1 Identify Participants
37
42
 
38
- **Before writing ANY SVG code, you MUST output the following structured analysis as text.** This is non-negotiable — skipping this step is the primary cause of structural modeling errors (wrong pool/lane assignments, missing data stores).
43
+ List every actor/role mentioned in the process. For each one, classify as POOL or LANE:
39
44
 
40
- ### Required Output Format:
45
+ - **POOL** (separate, independent): The participant acts on their own initiative and communicates with the organization from outside. Examples: a customer calling to cancel, a patient arriving at a clinic, a citizen filing a complaint, an external company (credit card company, supplier, contractor).
46
+ - **LANE** (within org pool): The participant is an internal role within the organization, OR the organization fully dictates and controls how they perform activities within its system (e.g., customer using the bank's app).
47
+ - **The test**: "Does the organization orchestrate this participant's actions, or do they act independently?" Independent → POOL.
41
48
 
42
- ```
43
- STRUCTURAL ANALYSIS:
49
+ ## Step 1.2 — Identify Tasks
50
+
51
+ List every action/task mentioned in the process description. For each task, specify which lane or pool it belongs to. Also identify implied activities — phrases like "she can and is expected to be in phone contact" or "will coordinate directly" describe real tasks, NOT annotations.
52
+
53
+ ## Step 1.3 — Identify Gateways (with type!)
54
+
55
+ List every decision point / conditional branch. For each gateway, specify:
56
+ - **Type**: XOR (exclusive — only one path), AND (parallel — all paths), or OR (inclusive — one or more paths)
57
+ - **Question/condition**: What is being decided
58
+ - **Outgoing branches**: The possible outcomes and where each leads
59
+ - **Merge**: Where the branches reconverge (if applicable) — merge gateways must also be listed with their type
60
+
61
+ ## Step 1.4 — Identify Data Stores
62
+
63
+ Scan all tasks for persistent storage operations. **Trigger words**: "system", "database", "account", "record", "registry". **Action verbs**: "block account", "update record", "generate invoice", "credit account", "register", "log", "store", "look up", "check status".
64
+
65
+ If ANY task reads from or writes to shared persistent state → Data Store is required. A system = a data store. An account = a data store.
44
66
 
45
- 1. PARTICIPANTS:
46
- - [Name] → POOL (acts independently: [reason]) / LANE (org controls: [reason])
47
- - ...
67
+ List each data store with a name and which tasks connect to it (read/write).
48
68
 
49
- 2. DATA STORES:
50
- - [Store name] — triggered by: [task X writes/reads/updates ...]
51
- - ...
69
+ ## Step 1.5 Identify Data Objects
70
+
71
+ List specific pieces of data that flow between tasks (e.g., "בקשת ביטול", "חשבונית זיכוי"). These are different from data stores — data objects are transient documents, not persistent systems.
72
+
73
+ ## Step 1.6 — Identify Flows
74
+
75
+ - **Sequence flows** (within a pool/between lanes): List the order of tasks within each pool
76
+ - **Message flows** (between pools): List every communication between separate pools. Check for bidirectional communication — every message that expects a response needs a return message flow.
77
+ - **Data associations**: List connections between tasks and data stores / data objects.
78
+
79
+ ## Step 1.7 — Identify Events
80
+
81
+ - **Start events**: One per pool
82
+ - **End events**: One or more per pool (for different outcomes)
83
+ - **Intermediate events**: Use for passive waiting (not tasks). When a participant is waiting for a signal/message from another participant.
84
+
85
+ ## Step 1.8 — Complete Each Participant's Flow
86
+
87
+ Verify that every pool has a complete internal sequence flow: start → tasks/gateways → end. Even external parties must have their full process modeled (receive → process → respond → close), not just a single task.
88
+
89
+ ## Required Output Format
52
90
 
53
- 3. MESSAGE FLOWS (between pools):
54
- - [Pool A] ↔ [Pool B]: [what is communicated]
55
- - ...
56
91
  ```
92
+ STRUCTURAL MODEL:
93
+
94
+ POOLS:
95
+ - [Pool name] — [reason: acts independently / external company]
96
+ Tasks: [task1] → [task2] → ...
97
+ Start: [description]
98
+ End(s): [description(s)]
99
+
100
+ ORGANIZATION POOL: [org name]
101
+ LANE: [lane name]
102
+ Tasks: [task1] → [task2] → ...
103
+ LANE: [lane name]
104
+ Tasks: ...
105
+ Start: [description]
106
+ End(s): [description(s)]
107
+
108
+ GATEWAYS:
109
+ - [G1] Type: XOR | Question: [question] | In: [lane/pool] | Branches: [branch1 → ..., branch2 → ...]
110
+ - [G2] Type: XOR (merge) | In: [lane/pool] | Merges: [branches from G1]
111
+ - ...
112
+
113
+ DATA STORES:
114
+ - [Store name] — reads: [task X, task Y] | writes: [task Z]
115
+ - ...
116
+
117
+ DATA OBJECTS:
118
+ - [Object name] — from: [task X] → to: [task Y]
119
+ - ...
120
+
121
+ MESSAGE FLOWS:
122
+ - [Pool A] → [Pool B]: [what is communicated]
123
+ - [Pool B] → [Pool A]: [response]
124
+ - ...
125
+ ```
126
+
127
+ ## ⛔ HARD STOP — DO NOT PROCEED
128
+
129
+ **STOP HERE.** Present the structural model above to the user. Do NOT write any HTML, SVG, or code yet.
130
+
131
+ Ask the user: "הנה המודל המבני של התהליך. האם לעבור לשלב הבא ולייצר את הדיאגרמה, או שיש שינויים שתרצה לבצע?"
132
+
133
+ Wait for the user to confirm or request changes. If they request changes, revise the model and present it again. Only proceed to Phase 2 after explicit user confirmation.
134
+
135
+ ---
57
136
 
58
- **The SVG diagram MUST match this analysis exactly.** If the analysis says "separate pool," the SVG must have a separate pool. If the analysis identifies a data store, the SVG must include it with data associations.
137
+ # ═══════════════════════════════════════════════════
138
+ # PHASE 2 — SVG RENDERING (only after Phase 1 approval)
139
+ # ═══════════════════════════════════════════════════
59
140
 
60
- ## Architecture & Layout Rules
141
+ Take the approved structural model from Phase 1 and render it as an HTML file with embedded SVG. **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.
61
142
 
62
- ### Pools and Lanes — CRITICAL
143
+ ## Architecture & Layout
63
144
 
64
- - **External participants** (e.g., patient, customer, citizen) get their own **pool** at the top of the diagram
65
- - Use a distinct color scheme for the external pool header (e.g., brown) to differentiate from the organization pool (dark gray)
145
+ ### Pools and Lanes
146
+
147
+ - **External participant pools** get their own pool rectangle, visually separated from the organization pool
148
+ - Use a distinct color scheme for external pool headers (e.g., brown) to differentiate from the organization pool (dark gray)
66
149
  - External pool tasks use a warm color (e.g., orange `#fff3e0` fill, `#e65100` stroke)
67
- - **Internal roles** within the organization are modeled as **lanes** within the organization pool
150
+ - **Organization pool** contains internal lanes
68
151
  - Each lane gets a labeled sidebar and a subtle background tint
69
152
  - Separate lanes with dashed divider lines
70
153
  - Pool headers are vertical text bars on the left side of the pool
71
154
 
72
- **Common Mistakes to Avoid:**
73
- - Putting a customer/patient/citizen as a lane when they act independently — they need a separate pool with message flows, not sequence flows
74
- - Using sequence flows between independent participants instead of message flows between separate pools
75
- - Forgetting that external companies (e.g., חברת אשראי, ספק, קבלן) also need their own pool — they are not part of the organization
76
- - Omitting a participant entirely — if the process description mentions a customer/patient/citizen, they MUST appear in the diagram as a pool with their own flow
77
-
78
- ### Element Placement — CRITICAL
155
+ ### Element Placement
79
156
 
80
- **Every BPMN element (task, gateway, event) must be fully contained within a single lane or pool.** No element may overlap a lane divider line or sit on the boundary between two lanes. If an element belongs to a lane, it must be clearly centered vertically within that lane's area, with visible spacing from the lane borders above and below.
157
+ **Every BPMN element (task, gateway, event) must be fully contained within a single lane or pool.** No element may overlap a lane divider line or sit on the boundary between two lanes. Center elements vertically within their lane with visible spacing from borders.
81
158
 
82
- ### Color Scheme by Participant Type
159
+ ### Color Scheme
83
160
 
84
161
  | Element | Fill | Stroke |
85
162
  |---------|------|--------|
@@ -92,35 +169,33 @@ STRUCTURAL ANALYSIS:
92
169
  | Data objects | `#fff` | `#1565c0` |
93
170
  | Data stores | `#fff` | `#2e7d32` |
94
171
 
95
- ### Pool Ordering — Optimal Layout
96
-
97
- When multiple external pools exist, order pools to **minimize message flow crossing distance**:
98
-
99
- - Place the **primary actor** (the one who initiates and interacts with multiple parties) in the **middle**, not at the top
100
- - Place pools they interact with **above and below** so message flows go in both directions naturally
101
- - Rule of thumb: Count message flows between each pair of pools. Adjacent pools should be the pairs with the most message flows between them
172
+ ### Pool Ordering
102
173
 
103
- Example: If a Resident interacts with both a Delivery Company and a Development Company → place Delivery Company on top, Resident in the middle, Development Company on the bottom.
174
+ When multiple external pools exist, order to **minimize message flow crossing distance**:
175
+ - Place the primary actor (initiates and interacts with multiple parties) in the middle
176
+ - Place pools they interact with above and below
104
177
 
105
178
  ### Flow Types
106
179
 
107
180
  - **Sequence flows** (within a pool): Solid lines with filled arrowheads (`#546e7a`)
108
181
  - **Message flows** (between pools): Dashed lines (`stroke-dasharray: 10 5`) with open circle at source and filled arrow at target (`#37474f`)
109
- - **Data associations**: Dashed lines (`stroke-dasharray: 4 3`) with small arrowheads, colored by type:
182
+ - **Data associations**: Dashed lines (`stroke-dasharray: 4 3`) with small arrowheads:
110
183
  - Data object associations: `#7986cb`
111
184
  - Data store associations: `#4caf50`
112
185
 
113
- ## BPMN Element Standards
186
+ ## BPMN Element SVG Templates
114
187
 
115
- ### Gateways — CRITICAL RULE
188
+ ### Gateways
116
189
 
117
- **Gateway diamonds must contain ONLY the marker symbol — NEVER text.** No labels, descriptions, or questions inside the diamond shape. Gateway labels go ABOVE or BESIDE the diamond, never inside it.
190
+ **Gateway diamonds contain ONLY the marker symbol — NEVER text.** Labels go ABOVE the diamond.
118
191
 
119
- - XOR (exclusive): **X** marker inside the diamond
120
- - AND (parallel): **+** marker inside the diamond
121
- - OR (inclusive): **O** marker inside the diamond
122
-
123
- **Every gateway both split AND merge/join — MUST display its marker symbol.** Merge gateways are never left as blank diamonds. This is a non-negotiable requirement.
192
+ ```svg
193
+ <!-- XOR Gateway (split or merge) X marker inside -->
194
+ <rect x="X" y="Y" width="34" height="34" class="gateway" transform="rotate(45, CX, CY)"/>
195
+ <line x1="CX-7" y1="CY-10" x2="CX+7" y2="CY+10" class="gateway-x"/>
196
+ <line x1="CX+7" y1="CY-10" x2="CX-7" y2="CY+10" class="gateway-x"/>
197
+ <text x="CX" y="CY-25" text-anchor="middle">label ABOVE</text>
198
+ ```
124
199
 
125
200
  **Anti-pattern — NEVER do this:**
126
201
  ```svg
@@ -129,47 +204,25 @@ Example: If a Resident interacts with both a Delivery Company and a Development
129
204
  <text x="CX" y="CY">כמה ימים?</text> <!-- FORBIDDEN -->
130
205
  ```
131
206
 
132
- **Correct pattern:**
133
- ```svg
134
- <!-- RIGHT: X marker inside, label outside -->
135
- <rect x="X" y="Y" width="34" height="34" class="gateway" transform="rotate(45, CX, CY)"/>
136
- <line x1="CX-7" y1="CY-10" x2="CX+7" y2="CY+10" class="gateway-x"/>
137
- <line x1="CX+7" y1="CY-10" x2="CX-7" y2="CY+10" class="gateway-x"/>
138
- <text x="CX" y="CY-25" text-anchor="middle">כמה ימים?</text> <!-- label ABOVE -->
139
- ```
140
-
141
- ### Intermediate Events (Waiting/Catching)
207
+ ### Intermediate Events (BPMN 1.1 style)
142
208
 
143
- Use **BPMN 1.1 style**: plain double circle with NO icon inside. Just two concentric circles.
209
+ Plain double circle with NO icon inside:
144
210
 
145
211
  ```svg
146
- <!-- Intermediate event — plain double circle -->
147
212
  <circle cx="X" cy="Y" r="16" fill="#fff" stroke="#1565c0" stroke-width="2"/>
148
213
  <circle cx="X" cy="Y" r="12" fill="none" stroke="#1565c0" stroke-width="1.2"/>
149
214
  ```
150
215
 
151
- Use intermediate events (not tasks) when a participant is passively waiting for a signal, message, or trigger from another participant.
152
-
153
- ### Data Objects vs Data Stores — MUST DISTINGUISH
154
-
155
- These are two different BPMN artifacts and must be visually distinct:
156
-
157
- **Data Objects** (folded-corner document icon, blue):
158
- - Represent a specific piece of data flowing through the process (e.g., "פרטי תינוק", "סיכום ביקור", "הערת מעקב")
159
- - Drawn as a rectangle with a folded top-right corner
216
+ ### Data Objects (folded-corner document, blue)
160
217
 
161
218
  ```svg
162
- <!-- Data Object template (w≈34, h≈38) -->
163
219
  <path d="M X,Y L X+26,Y L X+34,Y+8 L X+34,Y+38 L X,Y+38 Z" class="data-object-shape"/>
164
220
  <path d="M X+26,Y L X+26,Y+8 L X+34,Y+8" class="data-object-fold"/>
165
221
  ```
166
222
 
167
- **Data Stores** (cylinder icon, green):
168
- - Represent persistent storage / databases (e.g., "מאגר כרטיסי תינוקות", "מאגר מדדים")
169
- - Drawn as a cylinder (two ellipses connected by vertical lines)
223
+ ### Data Stores (cylinder, green)
170
224
 
171
225
  ```svg
172
- <!-- Data Store template -->
173
226
  <ellipse cx="CX" cy="TOP" rx="28" ry="8" class="data-store-body"/>
174
227
  <path d="M CX-28,TOP L CX-28,BOTTOM" fill="none" stroke="#2e7d32" stroke-width="1.3"/>
175
228
  <path d="M CX+28,TOP L CX+28,BOTTOM" fill="none" stroke="#2e7d32" stroke-width="1.3"/>
@@ -178,91 +231,96 @@ These are two different BPMN artifacts and must be visually distinct:
178
231
 
179
232
  ### Data Artifact Placement
180
233
 
181
- - Place data objects **above** or **below** their associated task, never overlapping flow lines
182
- - Place data objects to the **left** of a task if vertical placement would cross flow paths
183
- - Data stores typically go below their associated tasks
184
- - **Never** place data artifacts in a location where their association lines cross or overlap with sequence flow arrows
185
-
186
- ## Arrow Routing — CRITICAL
234
+ - Place data objects above or below their associated task, never overlapping flow lines
235
+ - Place data stores typically below their associated tasks
236
+ - Never place data artifacts where association lines cross sequence flow arrows
187
237
 
188
- The most important visual quality rule: **arrows must never be ambiguous**.
238
+ ## Arrow Routing
189
239
 
190
- ### Split-Merge Pattern (Two Outcome Paths)
240
+ **Arrows must never be ambiguous.**
191
241
 
192
- When a gateway splits into two paths (e.g., "תקין" vs "דורש מעקב") and then merges:
242
+ ### Split-Merge Pattern
193
243
 
194
- 1. Place the **YES task** above the gateway's horizontal center line
195
- 2. Place the **NO task** below the gateway's horizontal center line
196
- 3. Place the **merge gateway** clearly to the right of BOTH tasks
197
- 4. Route the YES path: task → **right****down** into merge gateway (entering from top)
198
- 5. Route the NO path: task → **right****up** into merge gateway (entering from bottom)
199
- 6. From the merge gateway, route a **single clean vertical line down** to the next task
200
-
201
- **The merge area must have clear visual separation between all paths. No path should overlap another.**
244
+ 1. YES task above the gateway's horizontal center line
245
+ 2. NO task below
246
+ 3. Merge gateway clearly to the right of BOTH tasks
247
+ 4. YES path: task → right → down into merge (entering from top)
248
+ 5. NO path: task → right → up into merge (entering from bottom)
249
+ 6. From merge: single clean line to next task
202
250
 
203
251
  ### General Routing Rules
204
252
 
205
- - Prefer orthogonal (right-angle) routing over diagonal lines
253
+ - Prefer orthogonal (right-angle) routing
206
254
  - Leave at least 30px spacing between parallel flow lines
207
- - When routing a flow from one lane to another, use a clear vertical drop/rise
255
+ - Cross-lane flows use clear vertical drops/rises
208
256
  - Label YES/NO (כן/לא) near the gateway, not at the end of the path
209
- - Flow labels should not overlap with other elements
257
+ - Flow labels must not overlap other elements
210
258
 
211
259
  ## Modeling Rejection/Retry Loops
212
260
 
213
- When a process includes an approval step where the participant can reject:
214
-
215
- 1. Model the **rejection action** as an explicit task in the rejecting participant's pool (e.g., "שליחת ביטול סגירה"), not just a gateway output
216
- 2. After rejection, model what the rejecting participant **does next** — typically a waiting intermediate event (e.g., waiting for follow-up contact)
217
- 3. In the receiving pool, model the **response to rejection** as a concrete task sequence (e.g., "contact customer" → "decide next step")
218
- 4. Loop-back arrows should return to the earliest meaningful re-entry point in the process, not to an arbitrary task
261
+ 1. Model rejection as an explicit task (not just a gateway output)
262
+ 2. After rejection, model the rejecting participant's next state (waiting/action)
263
+ 3. Model the response to rejection as a concrete task sequence
264
+ 4. Loop-back arrows return to the earliest meaningful re-entry point
219
265
 
220
- ## Typography & Hebrew Support
266
+ ## Typography & Hebrew
221
267
 
222
268
  - Use `Noto Sans Hebrew` (imported from Google Fonts) for all text
223
269
  - Set `lang="he"` and `dir="rtl"` on the HTML element
224
- - Task text: 11.5px, font-weight 500, centered in the task box
270
+ - Task text: 11.5px, font-weight 500, centered
225
271
  - Gateway labels: 10.5px, font-weight 400, positioned above the diamond
226
272
  - Data labels: 9.5px, font-weight 500
227
- - Flow labels (כן/לא): 10px
273
+ - Flow labels: 10px
228
274
 
229
275
  ## File Structure
230
276
 
231
277
  Output a single self-contained HTML file with:
232
278
 
233
- 1. **Header bar**: Gradient background with process title in Hebrew + English subtitle
234
- 2. **Legend**: Horizontal bar showing all BPMN symbols used in the diagram (start, end, task, XOR gateway, intermediate event, data object, data store, message flow)
279
+ 1. **Header bar**: Gradient background with process title in Hebrew + English subtitle. Must say "BPMN 1.1" (NOT 2.0)
280
+ 2. **Legend**: Horizontal bar showing all BPMN symbols used (start, end, task, XOR gateway, intermediate event, data object, data store, message flow)
235
281
  3. **SVG canvas**: The full BPMN diagram in a scrollable wrapper
236
282
  4. **SVG definitions**: Drop shadow filters, arrow markers (sequence, message, data association)
237
283
 
238
284
  ### SVG Sizing
239
285
 
240
286
  - Width: 1700–1800px typical (allow overflow scroll)
241
- - Height: Scale based on number of pools and lanes (~130px per external pool, ~250px per lane, plus spacing for data artifacts)
242
- - Use `viewBox` matching width/height for proper scaling
287
+ - Height: Scale based on pools and lanes (~130px per external pool, ~250px per lane, plus data artifacts)
288
+ - Use `viewBox` matching width/height
289
+
290
+ ---
243
291
 
244
- ## Verification Gate — MANDATORY
292
+ # ═══════════════════════════════════════════════════
293
+ # PHASE 3 — VALIDATION & FIX
294
+ # ═══════════════════════════════════════════════════
245
295
 
246
- **STOP before delivering the diagram. Verify EVERY item below. If any item fails, you MUST fix it before delivering. Do NOT skip this step.**
296
+ **Before delivering the diagram, go through EVERY item below. If ANY item fails, fix the SVG immediately. Do NOT deliver until all pass.**
247
297
 
298
+ ## Structural Accuracy (cross-reference with Phase 1 model)
299
+ - [ ] Every participant from the Phase 1 model appears in the SVG — none are omitted
300
+ - [ ] External participants are in separate pools with message flows (not lanes with sequence flows)
301
+ - [ ] Every pool has a complete internal flow (start → ... → end)
302
+ - [ ] Every gateway from Phase 1 appears with the correct type marker
303
+ - [ ] Every data store from Phase 1 appears as a cylinder with data associations
304
+ - [ ] Every message flow from Phase 1 appears as a dashed line between pools
305
+
306
+ ## BPMN Compliance
248
307
  - [ ] Every gateway (split AND merge) has ONLY an X/+/O marker inside — no text inside the diamond
249
- - [ ] Gateway labels (questions, conditions) are positioned ABOVE or BESIDE the diamond, never inside
308
+ - [ ] Gateway labels are positioned ABOVE or BESIDE the diamond, never inside
250
309
  - [ ] Every element (task, gateway, event) is fully inside a single lane — nothing sits on a lane boundary
251
- - [ ] No arrow paths overlap or cross ambiguously
252
- - [ ] Data objects (📄) and data stores (🗄️) use different icons
253
- - [ ] Every participant mentioned in the process description appears in the diagram — none are omitted
254
- - [ ] External participants are in separate pools with message flows
255
310
  - [ ] Passive waiting uses intermediate events, not regular tasks
311
+ - [ ] Data objects (folded document) and data stores (cylinder) use different icons
312
+
313
+ ## Visual Quality
314
+ - [ ] No arrow paths overlap or cross ambiguously
256
315
  - [ ] Flow labels (כן/לא) are clearly positioned near their gateway
257
316
  - [ ] The legend includes every symbol type used in the diagram
258
317
  - [ ] Data artifacts don't overlap with sequence flow paths
259
- - [ ] Every pool has a complete internal flow (start → ... → end), not just a single task
260
- - [ ] A Data Store is modeled for every persistent system (accounts, invoices, records, registrations — see trigger words in Process Analysis step 7)
261
- - [ ] Every message flow that expects a response has a return message flow
262
- - [ ] Phone calls, emails, and direct contacts mentioned in the description are modeled as tasks, not annotations
263
- - [ ] After a rejection/refusal gateway, the rejecting participant's subsequent state (waiting/action) is explicitly modeled
264
318
  - [ ] Pool ordering minimizes message flow crossing distance
265
319
 
320
+ ---
321
+
322
+ # APPENDIX
323
+
266
324
  ## Example Process Categories
267
325
 
268
326
  This skill handles processes such as: