sad-mcp 0.1.19 → 0.1.21
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 +4 -2
- package/package.json +1 -1
- package/skills/bpmn-diagram/SKILL.md +38 -7
package/dist/tools.js
CHANGED
|
@@ -418,9 +418,11 @@ export function registerToolHandlers(server) {
|
|
|
418
418
|
}
|
|
419
419
|
const lines = filtered.map(e => {
|
|
420
420
|
const hasSolution = e.solutionFile ? "✓ פתרון" : "✗ ללא פתרון";
|
|
421
|
-
|
|
421
|
+
const examLink = e.examFile ? `https://drive.google.com/file/d/${e.examFile.id}/view` : "";
|
|
422
|
+
const solutionLink = e.solutionFile ? `https://drive.google.com/file/d/${e.solutionFile.id}/view` : "";
|
|
423
|
+
return `- ${e.id} (שנה: ${e.year}, סמסטר: ${e.semester}, מועד: ${e.moed}) [${hasSolution}]\n Exam: ${examLink}${solutionLink ? `\n Solution: ${solutionLink}` : ""}`;
|
|
422
424
|
});
|
|
423
|
-
const responseText = `Available exams (${filtered.length}):\n\n${lines.join("\n")}\n\
|
|
425
|
+
const responseText = `Available exams (${filtered.length}):\n\n${lines.join("\n\n")}\n\nPresent the list to the student and for each exam, ask what they'd like to do:\n- Download the exam or solution file (share the link)\n- Ask questions about the exam content\n- Practice the exam (use practice_exam with the exam ID)`;
|
|
424
426
|
trackToolCall(name, toolArgs, { resultCount: filtered.length, success: true, responseChars: responseText.length }, Date.now() - startTime);
|
|
425
427
|
return { content: [{ type: "text", text: responseText }] };
|
|
426
428
|
}
|
package/package.json
CHANGED
|
@@ -18,22 +18,48 @@ This skill creates professional, standards-compliant BPMN diagrams rendered as i
|
|
|
18
18
|
|
|
19
19
|
Before writing any SVG code, analyze the process description to identify:
|
|
20
20
|
|
|
21
|
-
1. **Participants**: Who are the actors?
|
|
22
|
-
-
|
|
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
|
|
23
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
|
|
24
26
|
2. **Activities/Tasks**: List every action/task mentioned
|
|
25
27
|
3. **Decision Points**: Identify every conditional branch (if/else, exists/doesn't exist)
|
|
26
28
|
4. **Data**: What information is created, read, updated, or stored?
|
|
27
29
|
5. **Handoffs**: Where does work pass between participants? These become message flows between pools or sequence flows between lanes
|
|
28
30
|
6. **Waiting Points**: Is any participant passively waiting? Use intermediate events, not regular tasks
|
|
29
|
-
7. **Data Persistence**:
|
|
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.
|
|
30
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.
|
|
31
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.
|
|
32
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.
|
|
33
35
|
|
|
36
|
+
## Mandatory Structural Analysis Output — CRITICAL
|
|
37
|
+
|
|
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).
|
|
39
|
+
|
|
40
|
+
### Required Output Format:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
STRUCTURAL ANALYSIS:
|
|
44
|
+
|
|
45
|
+
1. PARTICIPANTS:
|
|
46
|
+
- [Name] → POOL (acts independently: [reason]) / LANE (org controls: [reason])
|
|
47
|
+
- ...
|
|
48
|
+
|
|
49
|
+
2. DATA STORES:
|
|
50
|
+
- [Store name] — triggered by: [task X writes/reads/updates ...]
|
|
51
|
+
- ...
|
|
52
|
+
|
|
53
|
+
3. MESSAGE FLOWS (between pools):
|
|
54
|
+
- [Pool A] ↔ [Pool B]: [what is communicated]
|
|
55
|
+
- ...
|
|
56
|
+
```
|
|
57
|
+
|
|
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.
|
|
59
|
+
|
|
34
60
|
## Architecture & Layout Rules
|
|
35
61
|
|
|
36
|
-
### Pools and Lanes
|
|
62
|
+
### Pools and Lanes — CRITICAL
|
|
37
63
|
|
|
38
64
|
- **External participants** (e.g., patient, customer, citizen) get their own **pool** at the top of the diagram
|
|
39
65
|
- Use a distinct color scheme for the external pool header (e.g., brown) to differentiate from the organization pool (dark gray)
|
|
@@ -43,6 +69,11 @@ Before writing any SVG code, analyze the process description to identify:
|
|
|
43
69
|
- Separate lanes with dashed divider lines
|
|
44
70
|
- Pool headers are vertical text bars on the left side of the pool
|
|
45
71
|
|
|
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
|
+
|
|
46
77
|
### Color Scheme by Participant Type
|
|
47
78
|
|
|
48
79
|
| Element | Fill | Stroke |
|
|
@@ -190,9 +221,9 @@ Output a single self-contained HTML file with:
|
|
|
190
221
|
- Height: Scale based on number of pools and lanes (~130px per external pool, ~250px per lane, plus spacing for data artifacts)
|
|
191
222
|
- Use `viewBox` matching width/height for proper scaling
|
|
192
223
|
|
|
193
|
-
##
|
|
224
|
+
## Verification Gate — MANDATORY
|
|
194
225
|
|
|
195
|
-
|
|
226
|
+
**STOP before delivering the diagram. Verify EVERY item below. If any item fails, you MUST fix it before delivering. Do NOT skip this step.**
|
|
196
227
|
|
|
197
228
|
- [ ] Every gateway (split AND merge) has an X or + symbol
|
|
198
229
|
- [ ] No arrow paths overlap or cross ambiguously
|
|
@@ -203,7 +234,7 @@ After generating the initial diagram, verify:
|
|
|
203
234
|
- [ ] The legend includes every symbol type used in the diagram
|
|
204
235
|
- [ ] Data artifacts don't overlap with sequence flow paths
|
|
205
236
|
- [ ] Every pool has a complete internal flow (start → ... → end), not just a single task
|
|
206
|
-
- [ ] A Data Store is modeled
|
|
237
|
+
- [ ] A Data Store is modeled for every persistent system (accounts, invoices, records, registrations — see trigger words in Process Analysis step 7)
|
|
207
238
|
- [ ] Every message flow that expects a response has a return message flow
|
|
208
239
|
- [ ] Phone calls, emails, and direct contacts mentioned in the description are modeled as tasks, not annotations
|
|
209
240
|
- [ ] After a rejection/refusal gateway, the rejecting participant's subsequent state (waiting/action) is explicitly modeled
|