kanonik-core 0.4.2__tar.gz

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.
Files changed (46) hide show
  1. kanonik_core-0.4.2/LICENSE +202 -0
  2. kanonik_core-0.4.2/NOTICE +30 -0
  3. kanonik_core-0.4.2/PKG-INFO +205 -0
  4. kanonik_core-0.4.2/README.md +173 -0
  5. kanonik_core-0.4.2/bpmn_code/__init__.py +3 -0
  6. kanonik_core-0.4.2/bpmn_code/pruefen.py +753 -0
  7. kanonik_core-0.4.2/bpmn_code/quelle.py +262 -0
  8. kanonik_core-0.4.2/kanonik/allgemein.py +90 -0
  9. kanonik_core-0.4.2/kanonik/annahmen.py +230 -0
  10. kanonik_core-0.4.2/kanonik/code_quelle.py +46 -0
  11. kanonik_core-0.4.2/kanonik/config.py +88 -0
  12. kanonik_core-0.4.2/kanonik/domain.py +204 -0
  13. kanonik_core-0.4.2/kanonik/konsole.py +20 -0
  14. kanonik_core-0.4.2/kanonik/paths.py +180 -0
  15. kanonik_core-0.4.2/kanonik/texte.py +89 -0
  16. kanonik_core-0.4.2/kanonik_core.egg-info/PKG-INFO +205 -0
  17. kanonik_core-0.4.2/kanonik_core.egg-info/SOURCES.txt +44 -0
  18. kanonik_core-0.4.2/kanonik_core.egg-info/dependency_links.txt +1 -0
  19. kanonik_core-0.4.2/kanonik_core.egg-info/entry_points.txt +3 -0
  20. kanonik_core-0.4.2/kanonik_core.egg-info/requires.txt +13 -0
  21. kanonik_core-0.4.2/kanonik_core.egg-info/top_level.txt +4 -0
  22. kanonik_core-0.4.2/kg/kg/__init__.py +5 -0
  23. kanonik_core-0.4.2/kg/kg/api_spec.py +403 -0
  24. kanonik_core-0.4.2/kg/kg/bridge.py +231 -0
  25. kanonik_core-0.4.2/kg/kg/cli.py +129 -0
  26. kanonik_core-0.4.2/kg/kg/codelists.py +128 -0
  27. kanonik_core-0.4.2/kg/kg/concepts.py +439 -0
  28. kanonik_core-0.4.2/kg/kg/glossar_bericht.py +86 -0
  29. kanonik_core-0.4.2/kg/kg/graph.py +297 -0
  30. kanonik_core-0.4.2/kg/kg/lexicon.py +219 -0
  31. kanonik_core-0.4.2/kg/kg/matching.py +439 -0
  32. kanonik_core-0.4.2/kg/kg/message_json.py +146 -0
  33. kanonik_core-0.4.2/kg/kg/model.py +89 -0
  34. kanonik_core-0.4.2/kg/kg/namen.py +20 -0
  35. kanonik_core-0.4.2/kg/kg/pipeline.py +467 -0
  36. kanonik_core-0.4.2/kg/kg/report.py +208 -0
  37. kanonik_core-0.4.2/kg/kg/shacl.py +230 -0
  38. kanonik_core-0.4.2/kg/kg/text.py +121 -0
  39. kanonik_core-0.4.2/kg/kg/va.py +205 -0
  40. kanonik_core-0.4.2/kg/kg/wsdl_xsd.py +468 -0
  41. kanonik_core-0.4.2/pyproject.toml +58 -0
  42. kanonik_core-0.4.2/quellcode/__init__.py +3 -0
  43. kanonik_core-0.4.2/quellcode/aufrufgraph.py +287 -0
  44. kanonik_core-0.4.2/quellcode/java_leser.py +668 -0
  45. kanonik_core-0.4.2/quellcode/schnittstellen_aus_code.py +535 -0
  46. kanonik_core-0.4.2/setup.cfg +4 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,30 @@
1
+ Kanonik Core (kanonik-core)
2
+ Copyright (c) 2026 Mykhaylo Khazanovych
3
+
4
+ Lizenziert unter der Apache License, Version 2.0 (Apache-2.0), siehe LICENSE.
5
+
6
+ Dieses Paket enthält keinen fremden Quellcode. Es nutzt zur Laufzeit folgende Pakete, die getrennt installiert werden.
7
+ Lizenzbericht: Paketmetadaten einer frischen Installation (pip install -e ".[test]", Python 3.13 und 3.10),
8
+ geprüft am 26.11.2026 – alle Lizenzen sind mit Apache-2.0 vereinbar (keine Copyleft-Lizenz).
9
+
10
+ Laufzeit (direkt)
11
+ rdflib 7.6 BSD-3-Clause https://github.com/RDFLib/rdflib
12
+ RapidFuzz 3.14 MIT https://github.com/rapidfuzz/RapidFuzz
13
+ scikit-learn 1.9 BSD-3-Clause https://github.com/scikit-learn/scikit-learn
14
+ PyYAML 6.0 MIT https://github.com/yaml/pyyaml
15
+ Laufzeit (indirekt)
16
+ numpy BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0; scipy BSD-3-Clause; joblib BSD-3-Clause;
17
+ threadpoolctl BSD-3-Clause; pyparsing MIT; html5rdf MIT; pytz MIT; narwhals MIT
18
+
19
+ optional (Extra neo4j, nur für kanonik-kg --neo4j-uri)
20
+ neo4j (Treiber) 6.4 Apache-2.0 AND Python-2.0 https://github.com/neo4j/neo4j-python-driver
21
+
22
+ nur für Tests (Extra "test")
23
+ pytest MIT https://github.com/pytest-dev/pytest
24
+ pyshacl Apache-2.0 https://github.com/RDFLib/pySHACL
25
+ regex Apache-2.0 AND CNRI-Python https://github.com/mrabarnett/mrab-regex
26
+ rstr BSD-3-Clause https://github.com/leapfrogonline/rstr
27
+ indirekt: owlrl W3C-20150513, prettytable BSD-3-Clause, packaging Apache-2.0 OR BSD-2-Clause, pluggy MIT,
28
+ iniconfig MIT, Pygments BSD-2-Clause, wcwidth MIT
29
+
30
+ Die Beispielprojekte in den Testordnern (bpmn_code/tests/beispiel, kg/tests/beispiel_wsdl, kg/tests) sind erfunden.
@@ -0,0 +1,205 @@
1
+ Metadata-Version: 2.4
2
+ Name: kanonik-core
3
+ Version: 0.4.2
4
+ Summary: Find where BPMN/DMN models and code disagree (Camunda 7 and 8) – deterministic, local, CI-ready; map interface fields to a glossary
5
+ Author: Mykhaylo Khazanovych
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://kanonik.eu
8
+ Project-URL: Source, https://github.com/der-weisse-schwan/kanonik-core
9
+ Project-URL: Changelog, https://github.com/der-weisse-schwan/kanonik-core/blob/main/CHANGELOG.md
10
+ Keywords: bpmn,dmn,camunda,zeebe,static-analysis,process-automation,glossary,wsdl,openapi,shacl
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Quality Assurance
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ License-File: NOTICE
20
+ Requires-Dist: rdflib>=7
21
+ Requires-Dist: rapidfuzz>=3
22
+ Requires-Dist: scikit-learn>=1.3
23
+ Requires-Dist: pyyaml>=6
24
+ Provides-Extra: neo4j
25
+ Requires-Dist: neo4j>=5; extra == "neo4j"
26
+ Provides-Extra: test
27
+ Requires-Dist: pytest>=8; extra == "test"
28
+ Requires-Dist: pyshacl>=0.26; extra == "test"
29
+ Requires-Dist: regex; extra == "test"
30
+ Requires-Dist: rstr; extra == "test"
31
+ Dynamic: license-file
32
+
33
+ # Kanonik Core
34
+
35
+ **Find the places where your BPMN models and your code no longer agree – before production does.**
36
+
37
+ A job type with a typo. A worker that was switched off and never switched on again. A decision table the process
38
+ calls but nobody deployed. A process variable spelled `mitarbeiterID` in one class and `mitarbeiterId` in another.
39
+ None of this breaks the build, the unit tests usually pass, and reviewers rarely read BPMN XML. In production the
40
+ instance just stops.
41
+
42
+ Kanonik Core reads your repository – BPMN, DMN and code – and lists every such mismatch with the file and place to fix.
43
+ It runs locally or in CI, needs no access to a Camunda cluster, uses no AI and sends no data anywhere. Same input, same
44
+ result.
45
+
46
+ ## See it in 30 seconds
47
+
48
+ ```bash
49
+ pip install kanonik-core
50
+ git clone https://github.com/der-weisse-schwan/kanonik-core && cd kanonik-core # for the examples
51
+ kanonik-pruefen --repo examples/kreditantrag
52
+ ```
53
+
54
+ ```markdown
55
+ # BPMN ↔ code: findings
56
+
57
+ 4 findings · 1 process and 3 decisions in the models · 2 classes in the code
58
+
59
+ | Rule | Findings | What happens in production |
60
+ |-------------------------|----------|---------------------------------------------------------|
61
+ | Job without worker | 1 | Instances get stuck at this step. |
62
+ | Variable name mismatch | 1 | The value never arrives; decisions work with empty data.|
63
+ | Decision missing | 1 | The business rule task fails at runtime. |
64
+ | Decision never called | 1 | Outdated rule – or a call is missing. |
65
+
66
+ ## Job without worker
67
+ - B03 Job notify-customer has no worker (missing, fix in: code)
68
+ 'Kunden benachrichtigen' (kreditantrag.bpmn) expects a worker for the job type notify-customer; no code
69
+ handles it – the process stops at this point. A worker for it is disabled (enabled = false):
70
+ KreditWorker.notifyCustomer.
71
+ ```
72
+
73
+ The full report: [examples/kreditantrag/expected/findings.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/kreditantrag/expected/findings.md).
74
+
75
+ ## What it finds
76
+
77
+ | Finding | Example | In production |
78
+ |---|---|---|
79
+ | **Job without worker** | the model expects `ship-goods`, no worker handles it (or it is disabled) | instances get stuck |
80
+ | **Worker without model** | a worker for `refund-payment` that no model uses | dead code – or a typo on one side |
81
+ | **Process start without model** | code starts `bestellung-v2`, the model is `bestellung` | every start fails |
82
+ | **Message without sender** | the process waits for `PaymentReceived`, nobody sends it | instances wait forever |
83
+ | **Variable name mismatch** | `remaimingAmount` read, `remainingAmount` written (also case: `ID` vs `Id`) | the value never arrives |
84
+ | **Decision missing** | a business rule task calls a decision no DMN file contains | the step fails |
85
+ | **Decision never called** | a decision in a DMN file that nothing calls | outdated rule – or a forgotten call |
86
+ | **Placeholder instead of logic** | an empty worker, a gateway that always takes the same path | results silently missing |
87
+ | **Naming mismatch** | task “Send receipt” sends the message `InvoiceSent` | model and code mean different things |
88
+ | **Hard-coded data** | a REST endpoint that ignores its input and sends fixed values | every call sends the same data |
89
+ | **Model not readable** | a BPMN/DMN file that is not valid XML | cannot be deployed |
90
+
91
+ Measured on public projects (camunda-8-examples, camunda-bpm-examples, Camunda Marketplace blueprints with code): every
92
+ finding was a real defect, no false alarms; nearly all deliberately planted defects were found
93
+ ([details](https://github.com/der-weisse-schwan/kanonik-core/blob/main/bpmn_code/README.md)).
94
+
95
+ ## Try it on your project
96
+
97
+ ```bash
98
+ pip install kanonik-core # Python 3.10 or newer
99
+ kanonik-pruefen --repo path/to/your-project # report: ./kanonik-befunde/befunde.md (and befunde.json)
100
+ ```
101
+
102
+ Options: `--sprache de` for a German report, `--out <folder>`, `--dienst name=path` (several times) for a repository
103
+ with several services, `--streng` to exit with code 1 when there are findings.
104
+
105
+ ## Use it in CI
106
+
107
+ ### GitHub Actions
108
+
109
+ ```yaml
110
+ name: Kanonik
111
+ on: [pull_request]
112
+ jobs:
113
+ check:
114
+ runs-on: ubuntu-latest
115
+ steps:
116
+ - uses: actions/checkout@v5
117
+ - uses: der-weisse-schwan/kanonik-core@v0.4.2
118
+ ```
119
+
120
+ Every finding appears as an annotation on the changed file in the pull request – on the BPMN element or the Java
121
+ method –, the full report lands in the job summary and as artifact `kanonik-befunde`.
122
+
123
+ | Input | Default | Meaning |
124
+ |---|---|---|
125
+ | `path` | `.` | folder to check |
126
+ | `language` | `en` | report and annotations in `en` or `de` |
127
+ | `fail-on` | `error` | fail on findings that break at runtime (`error`), on any finding (`warning`) or `never` |
128
+ | `services` | – | one `name=path` per line for a repository with several services |
129
+ | `upload-sarif` | `false` | also send the findings to GitHub Code Scanning (needs `security-events: write`; private repositories need GitHub Advanced Security) |
130
+ | `upload-report` | `true` | upload the report folder as artifact |
131
+
132
+ Outputs: `findings`, `errors`, `report`, `sarif`.
133
+
134
+ ### Any other CI
135
+
136
+ ```bash
137
+ pip install kanonik-core
138
+ kanonik-pruefen --repo . --streng # exit code 1 when there are findings
139
+ ```
140
+
141
+ The report folder `kanonik-befunde/` contains `befunde.md` (for people), `befunde.json` (for scripts; each finding has
142
+ a stable key `schluessel`, so runs can be compared) and `befunde.sarif` (SARIF 2.1.0 for code scanning tools and IDEs).
143
+
144
+ ## Examples
145
+
146
+ Four fictitious projects with planted defects – each runs in seconds ([overview](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/README.md)):
147
+
148
+ | Example | Stack | Shows |
149
+ |---|---|---|
150
+ | [Credit application](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/kreditantrag/) | Camunda 8, DMN, Java and Go workers | decisions checked against process and code |
151
+ | [Online order](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bestellung/) | Camunda 8, Spring Boot microservices | the full range of checks |
152
+ | [Leave request](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/urlaubsantrag/) | Camunda 7, Spring delegates | Camunda 7 support |
153
+ | [Library interface](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bibliothek-schnittstelle/) | WSDL/XSD, code lists, glossary | which glossary terms the interface really contains |
154
+
155
+ ## The second tool: glossary ↔ interface
156
+
157
+ Business and IT often use different words for the same thing. `kanonik-kg` reads your interfaces (WSDL/XSD, OpenAPI,
158
+ AsyncAPI, JSON Schema) and your glossary (CSV, YAML or JSON) and shows which terms the interface really contains,
159
+ which terms are missing and which fields have no agreed term – plus the interface as a graph with SHACL shapes. The graph is written as CSV and Cypher; to load it straight into Neo4j
160
+ (`--neo4j-uri`), install the driver with `pip install "kanonik-core[neo4j]"`.
161
+
162
+ ```bash
163
+ kanonik-kg run --wsdl examples/bibliothek-schnittstelle/dienste --codelists examples/bibliothek-schnittstelle/codelisten \
164
+ --glossar examples/bibliothek-schnittstelle/glossar.csv --out out/
165
+ ```
166
+
167
+ Report: [examples/bibliothek-schnittstelle/expected/glossary.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bibliothek-schnittstelle/expected/glossary.md)
168
+ (`--sprache de` for German). Details: [kg/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/kg/README.md).
169
+
170
+ ## What it reads
171
+
172
+ - **Camunda 8:** Spring `@JobWorker` (with or without `type`, `enabled = false`), Java client `.jobType(…)`, workers in
173
+ Go, C#, Node and Python (job type), execution and task listeners, connectors (element templates, `io.camunda:…`),
174
+ business rule tasks and DMN.
175
+ - **Camunda 7:** `JavaDelegate` and listeners (class, `${bean}`, `${bean.method(…)}`), external tasks, `decisionRef`.
176
+ - **Code:** Java (Spring, Kafka, REST), process variables, messages, process starts.
177
+
178
+ ## Limits
179
+
180
+ - The code is read as text, not compiled. Job types computed at runtime (`type="=variable"`) cannot be checked.
181
+ - Workers in languages other than Java are recognised by their job type only.
182
+ - Names in the models (task names, ids) appear in the report as written; rule keys and some identifiers are German
183
+ (`job_ohne_worker`) – the report shows an English name next to them.
184
+
185
+ ## FAQ
186
+
187
+ **Does it need my Camunda cluster or credentials?** No. It only reads files in the repository.
188
+
189
+ **Does it send code anywhere or use an LLM?** No. Everything runs locally and deterministically.
190
+
191
+ **What if a finding is intended?** Thresholds and word lists are configurable (`python -m kanonik.annahmen`); each
192
+ finding has a stable key you can filter on in CI.
193
+
194
+ **How does it relate to Kanonik?** Kanonik Core is the open part of [Kanonik](https://kanonik.eu). Kanonik additionally
195
+ checks models, code and interfaces against the business specification itself – which requirement is implemented
196
+ where, and what is missing.
197
+
198
+ ## More
199
+
200
+ - Technical reference: [bpmn_code/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/bpmn_code/README.md) (rules, readers, measurement),
201
+ [kg/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/kg/README.md) (interfaces, glossary, graph)
202
+ - [CHANGELOG.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/CHANGELOG.md) · [CONTRIBUTING.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/CONTRIBUTING.md) · [SECURITY.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/SECURITY.md) · [NOTICE](https://github.com/der-weisse-schwan/kanonik-core/blob/main/NOTICE)
203
+ - Deutsch: [README.de.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/README.de.md)
204
+
205
+ License: Apache-2.0 ([LICENSE](https://github.com/der-weisse-schwan/kanonik-core/blob/main/LICENSE)).
@@ -0,0 +1,173 @@
1
+ # Kanonik Core
2
+
3
+ **Find the places where your BPMN models and your code no longer agree – before production does.**
4
+
5
+ A job type with a typo. A worker that was switched off and never switched on again. A decision table the process
6
+ calls but nobody deployed. A process variable spelled `mitarbeiterID` in one class and `mitarbeiterId` in another.
7
+ None of this breaks the build, the unit tests usually pass, and reviewers rarely read BPMN XML. In production the
8
+ instance just stops.
9
+
10
+ Kanonik Core reads your repository – BPMN, DMN and code – and lists every such mismatch with the file and place to fix.
11
+ It runs locally or in CI, needs no access to a Camunda cluster, uses no AI and sends no data anywhere. Same input, same
12
+ result.
13
+
14
+ ## See it in 30 seconds
15
+
16
+ ```bash
17
+ pip install kanonik-core
18
+ git clone https://github.com/der-weisse-schwan/kanonik-core && cd kanonik-core # for the examples
19
+ kanonik-pruefen --repo examples/kreditantrag
20
+ ```
21
+
22
+ ```markdown
23
+ # BPMN ↔ code: findings
24
+
25
+ 4 findings · 1 process and 3 decisions in the models · 2 classes in the code
26
+
27
+ | Rule | Findings | What happens in production |
28
+ |-------------------------|----------|---------------------------------------------------------|
29
+ | Job without worker | 1 | Instances get stuck at this step. |
30
+ | Variable name mismatch | 1 | The value never arrives; decisions work with empty data.|
31
+ | Decision missing | 1 | The business rule task fails at runtime. |
32
+ | Decision never called | 1 | Outdated rule – or a call is missing. |
33
+
34
+ ## Job without worker
35
+ - B03 Job notify-customer has no worker (missing, fix in: code)
36
+ 'Kunden benachrichtigen' (kreditantrag.bpmn) expects a worker for the job type notify-customer; no code
37
+ handles it – the process stops at this point. A worker for it is disabled (enabled = false):
38
+ KreditWorker.notifyCustomer.
39
+ ```
40
+
41
+ The full report: [examples/kreditantrag/expected/findings.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/kreditantrag/expected/findings.md).
42
+
43
+ ## What it finds
44
+
45
+ | Finding | Example | In production |
46
+ |---|---|---|
47
+ | **Job without worker** | the model expects `ship-goods`, no worker handles it (or it is disabled) | instances get stuck |
48
+ | **Worker without model** | a worker for `refund-payment` that no model uses | dead code – or a typo on one side |
49
+ | **Process start without model** | code starts `bestellung-v2`, the model is `bestellung` | every start fails |
50
+ | **Message without sender** | the process waits for `PaymentReceived`, nobody sends it | instances wait forever |
51
+ | **Variable name mismatch** | `remaimingAmount` read, `remainingAmount` written (also case: `ID` vs `Id`) | the value never arrives |
52
+ | **Decision missing** | a business rule task calls a decision no DMN file contains | the step fails |
53
+ | **Decision never called** | a decision in a DMN file that nothing calls | outdated rule – or a forgotten call |
54
+ | **Placeholder instead of logic** | an empty worker, a gateway that always takes the same path | results silently missing |
55
+ | **Naming mismatch** | task “Send receipt” sends the message `InvoiceSent` | model and code mean different things |
56
+ | **Hard-coded data** | a REST endpoint that ignores its input and sends fixed values | every call sends the same data |
57
+ | **Model not readable** | a BPMN/DMN file that is not valid XML | cannot be deployed |
58
+
59
+ Measured on public projects (camunda-8-examples, camunda-bpm-examples, Camunda Marketplace blueprints with code): every
60
+ finding was a real defect, no false alarms; nearly all deliberately planted defects were found
61
+ ([details](https://github.com/der-weisse-schwan/kanonik-core/blob/main/bpmn_code/README.md)).
62
+
63
+ ## Try it on your project
64
+
65
+ ```bash
66
+ pip install kanonik-core # Python 3.10 or newer
67
+ kanonik-pruefen --repo path/to/your-project # report: ./kanonik-befunde/befunde.md (and befunde.json)
68
+ ```
69
+
70
+ Options: `--sprache de` for a German report, `--out <folder>`, `--dienst name=path` (several times) for a repository
71
+ with several services, `--streng` to exit with code 1 when there are findings.
72
+
73
+ ## Use it in CI
74
+
75
+ ### GitHub Actions
76
+
77
+ ```yaml
78
+ name: Kanonik
79
+ on: [pull_request]
80
+ jobs:
81
+ check:
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - uses: actions/checkout@v5
85
+ - uses: der-weisse-schwan/kanonik-core@v0.4.2
86
+ ```
87
+
88
+ Every finding appears as an annotation on the changed file in the pull request – on the BPMN element or the Java
89
+ method –, the full report lands in the job summary and as artifact `kanonik-befunde`.
90
+
91
+ | Input | Default | Meaning |
92
+ |---|---|---|
93
+ | `path` | `.` | folder to check |
94
+ | `language` | `en` | report and annotations in `en` or `de` |
95
+ | `fail-on` | `error` | fail on findings that break at runtime (`error`), on any finding (`warning`) or `never` |
96
+ | `services` | – | one `name=path` per line for a repository with several services |
97
+ | `upload-sarif` | `false` | also send the findings to GitHub Code Scanning (needs `security-events: write`; private repositories need GitHub Advanced Security) |
98
+ | `upload-report` | `true` | upload the report folder as artifact |
99
+
100
+ Outputs: `findings`, `errors`, `report`, `sarif`.
101
+
102
+ ### Any other CI
103
+
104
+ ```bash
105
+ pip install kanonik-core
106
+ kanonik-pruefen --repo . --streng # exit code 1 when there are findings
107
+ ```
108
+
109
+ The report folder `kanonik-befunde/` contains `befunde.md` (for people), `befunde.json` (for scripts; each finding has
110
+ a stable key `schluessel`, so runs can be compared) and `befunde.sarif` (SARIF 2.1.0 for code scanning tools and IDEs).
111
+
112
+ ## Examples
113
+
114
+ Four fictitious projects with planted defects – each runs in seconds ([overview](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/README.md)):
115
+
116
+ | Example | Stack | Shows |
117
+ |---|---|---|
118
+ | [Credit application](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/kreditantrag/) | Camunda 8, DMN, Java and Go workers | decisions checked against process and code |
119
+ | [Online order](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bestellung/) | Camunda 8, Spring Boot microservices | the full range of checks |
120
+ | [Leave request](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/urlaubsantrag/) | Camunda 7, Spring delegates | Camunda 7 support |
121
+ | [Library interface](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bibliothek-schnittstelle/) | WSDL/XSD, code lists, glossary | which glossary terms the interface really contains |
122
+
123
+ ## The second tool: glossary ↔ interface
124
+
125
+ Business and IT often use different words for the same thing. `kanonik-kg` reads your interfaces (WSDL/XSD, OpenAPI,
126
+ AsyncAPI, JSON Schema) and your glossary (CSV, YAML or JSON) and shows which terms the interface really contains,
127
+ which terms are missing and which fields have no agreed term – plus the interface as a graph with SHACL shapes. The graph is written as CSV and Cypher; to load it straight into Neo4j
128
+ (`--neo4j-uri`), install the driver with `pip install "kanonik-core[neo4j]"`.
129
+
130
+ ```bash
131
+ kanonik-kg run --wsdl examples/bibliothek-schnittstelle/dienste --codelists examples/bibliothek-schnittstelle/codelisten \
132
+ --glossar examples/bibliothek-schnittstelle/glossar.csv --out out/
133
+ ```
134
+
135
+ Report: [examples/bibliothek-schnittstelle/expected/glossary.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/examples/bibliothek-schnittstelle/expected/glossary.md)
136
+ (`--sprache de` for German). Details: [kg/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/kg/README.md).
137
+
138
+ ## What it reads
139
+
140
+ - **Camunda 8:** Spring `@JobWorker` (with or without `type`, `enabled = false`), Java client `.jobType(…)`, workers in
141
+ Go, C#, Node and Python (job type), execution and task listeners, connectors (element templates, `io.camunda:…`),
142
+ business rule tasks and DMN.
143
+ - **Camunda 7:** `JavaDelegate` and listeners (class, `${bean}`, `${bean.method(…)}`), external tasks, `decisionRef`.
144
+ - **Code:** Java (Spring, Kafka, REST), process variables, messages, process starts.
145
+
146
+ ## Limits
147
+
148
+ - The code is read as text, not compiled. Job types computed at runtime (`type="=variable"`) cannot be checked.
149
+ - Workers in languages other than Java are recognised by their job type only.
150
+ - Names in the models (task names, ids) appear in the report as written; rule keys and some identifiers are German
151
+ (`job_ohne_worker`) – the report shows an English name next to them.
152
+
153
+ ## FAQ
154
+
155
+ **Does it need my Camunda cluster or credentials?** No. It only reads files in the repository.
156
+
157
+ **Does it send code anywhere or use an LLM?** No. Everything runs locally and deterministically.
158
+
159
+ **What if a finding is intended?** Thresholds and word lists are configurable (`python -m kanonik.annahmen`); each
160
+ finding has a stable key you can filter on in CI.
161
+
162
+ **How does it relate to Kanonik?** Kanonik Core is the open part of [Kanonik](https://kanonik.eu). Kanonik additionally
163
+ checks models, code and interfaces against the business specification itself – which requirement is implemented
164
+ where, and what is missing.
165
+
166
+ ## More
167
+
168
+ - Technical reference: [bpmn_code/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/bpmn_code/README.md) (rules, readers, measurement),
169
+ [kg/README.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/kg/README.md) (interfaces, glossary, graph)
170
+ - [CHANGELOG.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/CHANGELOG.md) · [CONTRIBUTING.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/CONTRIBUTING.md) · [SECURITY.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/SECURITY.md) · [NOTICE](https://github.com/der-weisse-schwan/kanonik-core/blob/main/NOTICE)
171
+ - Deutsch: [README.de.md](https://github.com/der-weisse-schwan/kanonik-core/blob/main/README.de.md)
172
+
173
+ License: Apache-2.0 ([LICENSE](https://github.com/der-weisse-schwan/kanonik-core/blob/main/LICENSE)).
@@ -0,0 +1,3 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # SPDX-FileCopyrightText: 2026 Mykhaylo Khazanovych
3
+ """BPMN ↔ Code prüfen (offener Kern)."""