@bpmnkit/cli 0.0.27 → 0.0.29

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.
@@ -0,0 +1,267 @@
1
+ # BPMNKit AIKit — Tool Reference
2
+
3
+ This file is installed to `.claude/aikit.md` by `casen skills install`.
4
+ The skill files (`/design`, `/implement`, etc.) reference it with `@.claude/aikit.md`.
5
+
6
+ ---
7
+
8
+ ## MCP server
9
+
10
+ All tools are exposed by the `bpmnkit-aikit` MCP server configured in `.claude/mcp.json`.
11
+ Tool names follow the pattern `mcp__bpmnkit-aikit__<tool_name>`.
12
+
13
+ ---
14
+
15
+ ## BPMN tools
16
+
17
+ ### `bpmn_create`
18
+
19
+ Generate a new BPMN process from a natural language description.
20
+
21
+ - Automatically loads a matching domain pattern for context before calling the AI.
22
+ - Writes the `.bpmn` file to disk.
23
+
24
+ **Parameters**
25
+ | Name | Required | Description |
26
+ |---|---|---|
27
+ | `description` | yes | Natural language description of the process. Include actors, decision points, and expected outcomes. The richer the description, the better the diagram. |
28
+ | `outputDir` | no | Directory to write the file (default: current working directory). |
29
+
30
+ **Returns** `{ path: string, patternMatched: string | null }`
31
+
32
+ **Good description example:**
33
+ > "Invoice approval process with a clerk review step, automatic approval under €500, manager approval for higher amounts, and email notification on rejection."
34
+
35
+ ---
36
+
37
+ ### `bpmn_read`
38
+
39
+ Read a BPMN file and return its compact JSON representation.
40
+
41
+ **Parameters**
42
+ | Name | Required | Description |
43
+ |---|---|---|
44
+ | `path` | yes | Path to the `.bpmn` file. |
45
+
46
+ **Returns** Compact JSON with shape:
47
+ ```json
48
+ {
49
+ "id": "process-id",
50
+ "processes": [{
51
+ "id": "...", "name": "...",
52
+ "elements": [
53
+ { "type": "startEvent", "id": "...", "name": "..." },
54
+ { "type": "serviceTask", "id": "...", "name": "...", "jobType": "com.example:do-thing:1" },
55
+ { "type": "userTask", "id": "...", "name": "...", "formId": "approve-form" },
56
+ { "type": "businessRuleTask", "id": "...", "name": "...", "decisionId": "credit-check" },
57
+ { "type": "exclusiveGateway", "id": "...", "name": "..." },
58
+ { "type": "endEvent", "id": "...", "name": "..." }
59
+ ]
60
+ }]
61
+ }
62
+ ```
63
+
64
+ Use `jobType` to identify service tasks for worker scaffolding. Use `formId` / `decisionId` to know which tasks need forms/DMN tables.
65
+
66
+ ---
67
+
68
+ ### `bpmn_update`
69
+
70
+ Update an existing BPMN by describing the change in natural language.
71
+
72
+ **Parameters**
73
+ | Name | Required | Description |
74
+ |---|---|---|
75
+ | `path` | yes | Path to the `.bpmn` file. |
76
+ | `instruction` | yes | What to change, e.g. "Add an error boundary event on the payment task that routes to a manual review lane." |
77
+
78
+ **Returns** `{ path: string, updated: true }`
79
+
80
+ ---
81
+
82
+ ### `bpmn_validate`
83
+
84
+ Validate a BPMN file using the BPMNKit pattern advisor.
85
+
86
+ **Parameters**
87
+ | Name | Required | Description |
88
+ |---|---|---|
89
+ | `path` | yes | Path to the `.bpmn` file. |
90
+
91
+ **Returns**
92
+ ```json
93
+ {
94
+ "summary": { "total": 3, "errors": 1, "warnings": 1, "info": 1, "autoFixable": 2 },
95
+ "findings": [
96
+ {
97
+ "severity": "error" | "warning" | "info",
98
+ "category": "string",
99
+ "message": "string",
100
+ "suggestion": "string",
101
+ "elementIds": ["..."],
102
+ "autoFixable": true
103
+ }
104
+ ]
105
+ }
106
+ ```
107
+
108
+ Errors block deployment. Warnings and info are advisory.
109
+
110
+ ---
111
+
112
+ ### `bpmn_deploy`
113
+
114
+ Deploy a BPMN process to a running engine.
115
+
116
+ **Parameters**
117
+ | Name | Required | Description |
118
+ |---|---|---|
119
+ | `path` | yes | Path to the `.bpmn` file. |
120
+ | `target` | yes | `"local"` — local reebe instance (uses `ZEEBE_ADDRESS`). `"camunda8"` — active Camunda 8 profile (set with `casen profile create`). |
121
+
122
+ **Returns** `{ success: true, target: string, result: object }`
123
+
124
+ ---
125
+
126
+ ### `bpmn_simulate`
127
+
128
+ Structural analysis: validation findings + worker coverage check.
129
+
130
+ > **Note:** Phase 1 only — structural analysis. Full process execution simulation is planned for a future phase.
131
+
132
+ **Parameters**
133
+ | Name | Required | Description |
134
+ |---|---|---|
135
+ | `path` | yes | Path to the `.bpmn` file. |
136
+
137
+ **Returns**
138
+ ```json
139
+ {
140
+ "validation": { "errors": 0, "findings": [] },
141
+ "workerCoverage": {
142
+ "total": 3,
143
+ "covered": 2,
144
+ "missing": ["com.example:send-invoice:1"]
145
+ }
146
+ }
147
+ ```
148
+
149
+ ---
150
+
151
+ ### `bpmn_run_history`
152
+
153
+ Query recent process executions from the local proxy.
154
+
155
+ **Parameters**
156
+ | Name | Required | Description |
157
+ |---|---|---|
158
+ | `processId` | no | Filter by process definition ID. |
159
+
160
+ **Returns** `{ runs: [...] }` — up to 20 recent executions.
161
+
162
+ ---
163
+
164
+ ## Worker tools
165
+
166
+ ### `worker_list`
167
+
168
+ List all available workers: built-in BPMNKit workers and any scaffolded workers found in `./workers/`.
169
+
170
+ **Parameters** none
171
+
172
+ **Returns** `{ workers: [{ jobType, name, description, ... }], total: number }`
173
+
174
+ ---
175
+
176
+ ### `worker_scaffold`
177
+
178
+ Scaffold a TypeScript worker for a Zeebe job type. Generates `index.ts`, `package.json`, `tsconfig.json`, `README.md` in `./workers/<slug>/`.
179
+
180
+ **Parameters**
181
+ | Name | Required | Description |
182
+ |---|---|---|
183
+ | `jobType` | yes | Zeebe job type string, e.g. `com.example:send-invoice:1`. |
184
+ | `description` | no | What this worker does. |
185
+ | `inputs` | no | Object mapping input variable names to type descriptions, e.g. `{ "invoiceId": "string", "amount": "number" }`. |
186
+ | `outputs` | no | Object mapping output variable names to type descriptions. |
187
+
188
+ **Returns** `{ path: string, files: [...], jobType: string, note: string }`
189
+
190
+ After scaffolding: `cd workers/<slug> && npm install && npm start`. Edit `index.ts` to implement `handle()`.
191
+
192
+ ---
193
+
194
+ ## Form & DMN tools
195
+
196
+ ### `form_create`
197
+
198
+ Generate Camunda form JSON for all `userTask` elements in a BPMN that have a `formId`. Writes one `.form` file per task.
199
+
200
+ **Parameters**
201
+ | Name | Required | Description |
202
+ |---|---|---|
203
+ | `bpmnPath` | yes | Path to the `.bpmn` file. |
204
+ | `outputDir` | no | Where to write form files (default: same directory as the BPMN). |
205
+
206
+ **Returns**
207
+ ```json
208
+ {
209
+ "forms": [
210
+ { "taskId": "...", "taskName": "...", "formId": "...", "path": "path/to/form-id.form" }
211
+ ]
212
+ }
213
+ ```
214
+
215
+ Returns `{ "forms": [] }` if no user tasks with `formId` are found.
216
+
217
+ ---
218
+
219
+ ### `dmn_create`
220
+
221
+ Generate DMN decision table XML for all `businessRuleTask` elements in a BPMN that have a `decisionId`. Writes one `.dmn` file per task.
222
+
223
+ **Parameters**
224
+ | Name | Required | Description |
225
+ |---|---|---|
226
+ | `bpmnPath` | yes | Path to the `.bpmn` file. |
227
+ | `outputDir` | no | Where to write DMN files (default: same directory as the BPMN). |
228
+
229
+ **Returns**
230
+ ```json
231
+ {
232
+ "decisions": [
233
+ { "taskId": "...", "taskName": "...", "decisionId": "...", "path": "path/to/decision-id.dmn" }
234
+ ]
235
+ }
236
+ ```
237
+
238
+ Returns `{ "decisions": [] }` if no business rule tasks with `decisionId` are found.
239
+
240
+ ---
241
+
242
+ ## Pattern tools
243
+
244
+ ### `pattern_list`
245
+
246
+ List all available domain process patterns.
247
+
248
+ **Parameters** none
249
+
250
+ **Returns** `{ patterns: [{ id, name, description, keywords }], total: number }`
251
+
252
+ Call this at the start of any skill to check whether a domain pattern applies. Match by comparing keywords against the user's request.
253
+
254
+ ---
255
+
256
+ ### `pattern_get`
257
+
258
+ Get the full content of a domain pattern: readme, worker specs, variations, and a compact BPMN template.
259
+
260
+ **Parameters**
261
+ | Name | Required | Description |
262
+ |---|---|---|
263
+ | `domain` | yes | Pattern id (e.g. `"invoice-approval"`) or free-text query (e.g. `"employee onboarding"`). |
264
+
265
+ **Returns** `{ id, name, description, keywords, readme, workers, variations, template }`
266
+
267
+ Pass `pattern.readme` and `pattern.workers` as additional context in the `description` parameter of `bpmn_create`.
package/skills/deploy.md CHANGED
@@ -2,6 +2,8 @@
2
2
  description: Deploy a BPMN process to local reebe or Camunda 8
3
3
  ---
4
4
 
5
+ @.claude/aikit.md
6
+
5
7
  Deploy the BPMN process at the given path.
6
8
 
7
9
  ## File to deploy
package/skills/design.md CHANGED
@@ -2,6 +2,8 @@
2
2
  description: Design a BPMN process — flow, forms, and decision tables. No workers, no deployment.
3
3
  ---
4
4
 
5
+ @.claude/aikit.md
6
+
5
7
  You are designing a BPMN process using BPMNKit AIKit tools. Work through these steps in order.
6
8
 
7
9
  ## Request
@@ -2,6 +2,8 @@
2
2
  description: Implement a BPMN process end-to-end from a natural language description
3
3
  ---
4
4
 
5
+ @.claude/aikit.md
6
+
5
7
  You are implementing a BPMN process end-to-end using BPMNKit AIKit tools. Work through these steps in order.
6
8
 
7
9
  ## Request
package/skills/review.md CHANGED
@@ -2,6 +2,8 @@
2
2
  description: Review a BPMN file and report findings with severity and fix suggestions
3
3
  ---
4
4
 
5
+ @.claude/aikit.md
6
+
5
7
  Review the BPMN file at the given path using BPMNKit's pattern advisor.
6
8
 
7
9
  ## File to review
package/skills/test.md CHANGED
@@ -2,6 +2,8 @@
2
2
  description: Analyse a BPMN process — check worker coverage and validation findings
3
3
  ---
4
4
 
5
+ @.claude/aikit.md
6
+
5
7
  Analyse the BPMN process at the given path.
6
8
 
7
9
  ## File to test