cpee-llm 1.1.0 → 1.3.1
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.
- checksums.yaml +4 -4
- data/LICENSE +668 -159
- data/cpee-llm.gemspec +3 -3
- data/lib/cpee/llm/dataflow.rb +9 -9
- data/lib/cpee/llm/functions.rb +18 -18
- data/lib/cpee/llm/implementation.rb +9 -7
- data/lib/cpee/llm/implementation.xml +14 -7
- data/lib/cpee/llm/prompts/system/adapt_mermaid.txt +12 -0
- data/lib/cpee/llm/prompts/system/{adapt_docxml_description.txt → adapt_xml_documentation.txt} +11 -11
- data/lib/cpee/llm/prompts/system/adapt_xml_endpoints.txt +10 -12
- data/lib/cpee/llm/prompts/system/dataflow.txt +13 -25
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/arguments.txt +8 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/color_palette.txt +10 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/description.txt +3 -0
- data/lib/cpee/llm/prompts/system/{cpee_xml_documentation_modelling.txt → fragments/cpee_xml/documentation.txt} +1 -1
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/exclusive_gateway.txt +7 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/finalize.txt +3 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/inclusive_gateway.txt +2 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/loop.txt +7 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/method.txt +6 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/parallel_gateway.txt +6 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/pause.txt +4 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/pause_insertion.txt +3 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/script_task.txt +5 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/sequence.txt +2 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/service_task.txt +20 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml/variables.txt +3 -0
- data/lib/cpee/llm/prompts/system/fragments/cpee_xml.txt +15 -0
- data/lib/cpee/llm/prompts/system/fragments/data_references.txt +16 -0
- data/lib/cpee/llm/prompts/system/fragments/endpoint_naming.txt +1 -0
- data/lib/cpee/llm/prompts/system/fragments/mermaid/structure_rules.txt +29 -0
- data/lib/cpee/llm/prompts/system/fragments/mermaid/syntax.txt +22 -0
- data/lib/cpee/llm/prompts/system/fragments/numeric_conversion.txt +5 -0
- data/lib/cpee/llm/prompts/system/fragments/service_registry.txt +6 -0
- data/lib/cpee/llm/prompts/system/fragments/unmatched_tasks.txt +4 -0
- data/lib/cpee/llm/prompts/system/generate_mermaid.txt +40 -0
- data/lib/cpee/llm/prompts/system/generate_mermaid_endpoints.txt +82 -0
- data/lib/cpee/llm/prompts/system/intent.txt +3 -3
- data/lib/cpee/llm/prompts/system/validate_xml.txt +15 -0
- data/lib/cpee/llm/prompts/user/dataflow.txt +8 -1
- data/lib/cpee/llm/prompts/user/describe_text.txt +4 -0
- data/lib/cpee/llm/prompts/user/intent.txt +65 -10
- data/lib/cpee/llm/prompts/user/validate_xml.txt +5 -0
- data/lib/cpee/llm/rubyllm_requests.rb +30 -9
- data/server/{cpee-llm → llm} +4 -3
- data/tools/cpee-llm +3 -3
- data/tools/cpee-llm-tool +3 -3
- metadata +39 -23
- data/lib/cpee/llm/prompts/system/apply.txt +0 -32
- data/lib/cpee/llm/prompts/system/cpee_xml.txt +0 -99
- data/lib/cpee/llm/prompts/system/derive.txt +0 -28
- data/lib/cpee/llm/prompts/system/gemini-request.json +0 -18
- data/lib/cpee/llm/prompts/system/generate1.txt +0 -90
- data/lib/cpee/llm/prompts/system/generate_enpoints.txt +0 -132
- data/lib/cpee/llm/prompts/system/generate_enpoints1.txt +0 -155
- data/lib/cpee/llm/prompts/system/identify.txt +0 -25
- data/lib/cpee/llm/prompts/system/validate_mermaid.xml +0 -74
- data/lib/cpee/llm/prompts/user/cpee_repair.txt +0 -5
- data/lib/cpee/llm/prompts/user/process_model_text.txt +0 -4
- data/lib/cpee/llm/prompts/user/repair.txt +0 -5
- /data/lib/cpee/llm/prompts/system/{describe.txt → describe_text.txt} +0 -0
- /data/lib/cpee/llm/prompts/user/{process_model_adapt.txt → adapt.txt} +0 -0
- /data/lib/cpee/llm/prompts/user/{process_model_adapt_api.txt → adapt_xml_endpoints.txt} +0 -0
- /data/lib/cpee/llm/prompts/user/{process_description.txt → generate_mermaid.txt} +0 -0
- /data/lib/cpee/llm/prompts/user/{process_description_endpoints.txt → generate_mermaid_endpoints.txt} +0 -0
- /data/server/{cpee-llm.conf → llm.conf} +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
Given the relevant the Mermaid.js BPMN model, and the provided Mermaid.js BPMN syntax and structural rules, perform the validation.
|
|
2
|
-
mermaid model: .
|
|
3
|
-
|
|
4
|
-
Mermaid.js BPMN Syntax:
|
|
5
|
-
- The graph must use the LR (Left to Right) direction.
|
|
6
|
-
- Each Mermaid.js node must have the following structure:
|
|
7
|
-
id:type:shape and label
|
|
8
|
-
- id: a unique integer from 0 to n.
|
|
9
|
-
- type: BPMN element type → startevent, endevent, task, subprocess, exclusivegateway, inclusivegateway, parallelgateway.
|
|
10
|
-
- Shapes and labels:
|
|
11
|
-
- Start event → id:startevent:((startevent))
|
|
12
|
-
- End event → id:endevent:(((endevent)))
|
|
13
|
-
- Task → id:task:(Task Label)
|
|
14
|
-
- Subprocess → id:subprocess:(Subprocess Label)
|
|
15
|
-
- Exclusive gateway → id:exclusivegateway:{x}
|
|
16
|
-
- Parallel gateway → id:parallelgateway:{AND}
|
|
17
|
-
- Inclusive gateway → id:inclusivegateway:{O}
|
|
18
|
-
|
|
19
|
-
Hard Structural Rules:
|
|
20
|
-
- Tasks:
|
|
21
|
-
- No empty tasks are allowed: every task node must have a descriptive label.
|
|
22
|
-
- “Default branches” between gateways are allowed — edges that go directly from one gateway to another without any task in between.
|
|
23
|
-
- Gateways:
|
|
24
|
-
- Every split gateway must be matched with a corresponding merge gateway of the same type.
|
|
25
|
-
- No implicit merges are allowed — merges must always be explicit.
|
|
26
|
-
- No split gateway is permitted without a matching merge.
|
|
27
|
-
- Flow correctness:
|
|
28
|
-
- Each path/branch must start from the start event and lead to the end event.
|
|
29
|
-
- Each incoming node must have its own separate edge to the target node.
|
|
30
|
-
- Reused nodes:
|
|
31
|
-
- If a node occurs more than once, reference it by repeating the full node declaration like this - id:type:shape and label (e.g., 2:task:(do something)).
|
|
32
|
-
- It is strictly prohibited to use only the ID (e.g., 2) without type and to use other short versions like id:type (e.g.,2:task).
|
|
33
|
-
- Edges:
|
|
34
|
-
- All nodes must be connected with -->.
|
|
35
|
-
- Edge labels (for conditions/annotations) must be written as |text| between nodes.
|
|
36
|
-
- Simplification Rule:
|
|
37
|
-
- If you cannot generate a model that fully meets all requirements due to the complexity of the description, you must simplify the model until it fully satisfies every requirement.
|
|
38
|
-
|
|
39
|
-
### Validation Procedure Summary:
|
|
40
|
-
When validating a Mermaid BPMN graph against the above rules, apply these steps systematically:
|
|
41
|
-
|
|
42
|
-
1. **Basic Syntax Validation**
|
|
43
|
-
- Confirm the graph uses LR direction.
|
|
44
|
-
- Verify all nodes follow the `id:type:shape and label` format with unique integer IDs.
|
|
45
|
-
- Check every task and subprocess node has a non-empty descriptive label.
|
|
46
|
-
- Ensure node types are valid BPMN types.
|
|
47
|
-
|
|
48
|
-
2. **Connectivity Validation**
|
|
49
|
-
- Confirm all edges use `-->` syntax and connect valid existing nodes.
|
|
50
|
-
- Ensure exactly one start event and at least one end event exist.
|
|
51
|
-
- Verify the graph is connected: all nodes are reachable from start and lead to an end event.
|
|
52
|
-
|
|
53
|
-
3. **Gateway Structural Validation**
|
|
54
|
-
- Identify all gateways as splits (≥2 outgoing edges) or merges (≥2 incoming edges).
|
|
55
|
-
- Confirm every split gateway has a corresponding matching merge gateway of the same type.
|
|
56
|
-
- Ensure no implicit merges (e.g., branches merging into a gateway of a different type without an explicit merge).
|
|
57
|
-
- Verify all gateways are connected (no isolated gateways).
|
|
58
|
-
|
|
59
|
-
4. **Task and Subprocess Rules**
|
|
60
|
-
- Verify no empty task or subprocess nodes.
|
|
61
|
-
- Confirm tasks are not orphaned: they have both incoming and outgoing edges unless start/end tasks.
|
|
62
|
-
|
|
63
|
-
5. **Flow Semantics**
|
|
64
|
-
- Exclusive gateways must have at least two outgoing branches.
|
|
65
|
-
- Parallel gateways’ splits must be followed by matching merges before continuing.
|
|
66
|
-
- All paths must start at the start event and lead to an end event.
|
|
67
|
-
|
|
68
|
-
6. **Reused Nodes Validation**
|
|
69
|
-
- Each reused node must be fully re-declared (with id:type:shape and label), never referenced by ID only or shorthand.
|
|
70
|
-
|
|
71
|
-
7. **Simplification Rule**
|
|
72
|
-
- If any rule above fails, simplify the model by removing redundant gateways or tasks, adding missing merges, or merging sequential gateways until the model fully satisfies all rules.
|
|
73
|
-
|
|
74
|
-
Return only Mermaid.js code as plain text, without markdown formatting or explanation.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/cpee/llm/prompts/user/{process_description_endpoints.txt → generate_mermaid_endpoints.txt}
RENAMED
|
File without changes
|
|
File without changes
|