@bpmnkit/cli 0.0.36 → 0.1.0

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/skills/review.md CHANGED
@@ -1,35 +1,41 @@
1
1
  ---
2
- description: Review a BPMN file and report findings with severity and fix suggestions
2
+ description: Review a BPMN file and report findings with severity and an explicit deploy-ready verdict.
3
3
  ---
4
4
 
5
5
  @.claude/aikit.md
6
6
 
7
- Review the BPMN file at the given path using BPMNKit's pattern advisor.
7
+ Review the BPMN file: $ARGUMENTS
8
8
 
9
- ## File to review
9
+ If no file is given, find the single `.bpmn` in cwd or ask.
10
10
 
11
- $ARGUMENTS
11
+ ## Step 1 — Run both profiles
12
12
 
13
- ---
13
+ ```sh
14
+ casen lint lint <file>.bpmn --profile deploy --format json
15
+ casen lint lint <file>.bpmn --format json
16
+ ```
14
17
 
15
- 1. Call `mcp__bpmnkit-aikit__bpmn_validate` on the path above.
18
+ ## Step 2 Present findings grouped by severity
16
19
 
17
- 2. Present findings grouped by severity:
20
+ **Errors** (must fix before deploy)
21
+ - `[element-id]` `[category]` message. Fix: suggestion, if present.
18
22
 
19
- **Errors** (block deployment or indicate broken process flow)
20
- - For each error: element IDs, message, suggested fix
23
+ **Warnings** (should fix)
24
+ - ...
21
25
 
22
- **Warnings** (best-practice violations, missing patterns)
23
- - For each warning: element IDs, message, suggested fix
26
+ **Info** (consider)
27
+ - ...
24
28
 
25
- **Info** (improvement suggestions)
26
- - For each info item: message
29
+ ## Step 3 — Offer auto-fix
27
30
 
28
- 3. Show a summary:
29
- ```
30
- Total: <n> findings — <errors> errors, <warnings> warnings, <info> info
31
- Auto-fixable: <n>
31
+ If there are any findings, offer:
32
+
33
+ ```sh
34
+ casen lint lint <file>.bpmn --fix
32
35
  ```
33
36
 
34
- 4. If there are auto-fixable findings, ask: **"Apply auto-fixes?"**
35
- If yes, call `mcp__bpmnkit-aikit__bpmn_update` with instruction: "Apply all auto-fixable pattern advisor suggestions"
37
+ Re-run Step 1 afterward to confirm.
38
+
39
+ ## Step 4 — Explicit verdict
40
+
41
+ End with: **"Deploy-ready: yes"** (zero errors from the deploy profile) or **"Deploy-ready: no — N error(s)"**.
package/skills/test.md CHANGED
@@ -1,38 +1,36 @@
1
1
  ---
2
- description: Analyse a BPMN process check worker coverage and validation findings
2
+ description: Run scenario tests on a BPMN process file and report path coverage.
3
3
  ---
4
4
 
5
5
  @.claude/aikit.md
6
6
 
7
- Analyse the BPMN process at the given path.
7
+ Run scenario tests: $ARGUMENTS
8
8
 
9
- ## File to test
9
+ If no file is given, find the single `.bpmn` in cwd or ask.
10
10
 
11
- $ARGUMENTS
11
+ ## Step 1 — Ensure scenarios exist
12
12
 
13
- ---
13
+ Look for `<file>.bpmn.tests.json` (written automatically by `casen synth` from a plan's `tests` array). If missing: `casen plan extract <file>.bpmn`, add a `tests` array covering the happy path and every branch/boundary, then `casen synth <plan>.json --merge <file>.bpmn` to regenerate it — or hand-write the sidecar directly (array of `{ id, name, inputs?, mocks?, expect? }`).
14
14
 
15
- 1. Call `mcp__bpmnkit-aikit__bpmn_read` to understand the process structure (elements, service tasks, gateways, event types).
15
+ ## Step 2 Run
16
16
 
17
- 2. Call `mcp__bpmnkit-aikit__bpmn_simulate` with the path and an empty scenarios array to get worker coverage and validation analysis.
17
+ ```sh
18
+ casen test <file>.bpmn
19
+ ```
18
20
 
19
- 3. Call `mcp__bpmnkit-aikit__worker_list` to show the full worker catalog.
21
+ ## Step 3 Report
20
22
 
21
- 4. Present the results:
23
+ ```
24
+ | Scenario | Result | Details |
25
+ |----------|--------|---------|
26
+ | happy-path | ✓ PASS | (Nms) |
27
+ | error-path | ✗ FAIL | field: expected X, got Y |
28
+ ```
22
29
 
23
- **Process structure**
24
- - Pools / participants
25
- - Service tasks and their job types
26
- - Decision gateways and branch conditions
27
- - Event types (timer, message, error, escalation)
30
+ ## Step 4 — Coverage
28
31
 
29
- **Worker coverage**
30
- - ✓ Covered job types (matched to built-in or scaffolded workers)
31
- - ✗ Missing job types (no worker found — scaffold with worker_scaffold)
32
+ Cross-reference gateway branches and error/timer boundaries against which scenarios exercise them; report anything uncovered.
32
33
 
33
- **Validation findings**
34
- - Errors and warnings from the pattern advisor
34
+ ## Step 5 — Summary
35
35
 
36
- **Suggested test scenarios** (derived from the BPMN structure)
37
- - Happy path: <describe the main success path>
38
- - Edge cases: <describe key branches, timeouts, error conditions>
36
+ "X/Y scenarios passed. N branch(es)/boundary(ies) uncovered."
package/skills/design.md DELETED
@@ -1,87 +0,0 @@
1
- ---
2
- description: Design a BPMN process — flow, forms, and decision tables. No workers, no deployment.
3
- ---
4
-
5
- @.claude/aikit.md
6
-
7
- You are designing a BPMN process using BPMNKit AIKit tools. Work through these steps in order.
8
-
9
- ## Request
10
-
11
- $ARGUMENTS
12
-
13
- ---
14
-
15
- ## Step 1 — Check for a domain pattern
16
-
17
- Call `mcp__bpmnkit-aikit__pattern_list` to see available domain patterns.
18
- If any pattern keywords match the request, call `mcp__bpmnkit-aikit__pattern_get` to load the full pattern as context.
19
-
20
- ---
21
-
22
- ## Step 2 — Create the BPMN
23
-
24
- Spawn a subagent with this task:
25
-
26
- > Using `mcp__bpmnkit-aikit__bpmn_create`, generate a BPMN process for: **$ARGUMENTS**
27
- >
28
- > If a pattern was loaded in Step 1, pass its readme and worker specs as context in the description parameter.
29
- >
30
- > Return the file path of the generated BPMN.
31
-
32
- ---
33
-
34
- ## Step 3 — Generate forms
35
-
36
- Spawn a subagent with this task:
37
-
38
- > Call `mcp__bpmnkit-aikit__form_create` with the BPMN path from Step 2.
39
- >
40
- > Return: list of `{ taskId, formId, path }` for each form created, or an empty list if no user tasks with formId were found.
41
-
42
- ---
43
-
44
- ## Step 4 — Generate DMN tables
45
-
46
- Spawn a subagent with this task:
47
-
48
- > Call `mcp__bpmnkit-aikit__dmn_create` with the BPMN path from Step 2.
49
- >
50
- > Return: list of `{ taskId, decisionId, path }` for each DMN file created, or an empty list if no business rule tasks with decisionId were found.
51
-
52
- ---
53
-
54
- ## Step 5 — Validate
55
-
56
- Spawn a subagent with this task:
57
-
58
- > Call `mcp__bpmnkit-aikit__bpmn_validate` on the BPMN file from Step 2.
59
- >
60
- > Return: `{ errors: [...], warnings: [...] }`
61
-
62
- ---
63
-
64
- ## Step 6 — Present design summary
65
-
66
- Collect all results and present:
67
-
68
- ```
69
- BPMN: <path>
70
- Pattern: <id or "none">
71
-
72
- Forms (<count>):
73
- <formId> → <path>
74
- (or "none" if empty)
75
-
76
- DMN tables (<count>):
77
- <decisionId> → <path>
78
- (or "none" if empty)
79
-
80
- Validation:
81
- Errors: <count> — <list if any>
82
- Warnings: <count> — <list if any>
83
- ```
84
-
85
- Then say: **"Use `/implement` to add workers, or `/deploy` when ready."**
86
-
87
- Do NOT offer to deploy.