You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#257: no longer require checks to have a parameters input
Checks with no caller-supplied parameters now omit the tParameters type,
parameters inputData element, and parameters key from the OpenAPI spec.
Also makes checkResult default to null (not false) when situation fields are absent.
Copy file name to clipboardExpand all lines: .claude/commands/new-dmn-check.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ If either is missing, ask the user for:
17
17
1.**Check name** — PascalCase, globally unique (e.g. `PersonMinIncome`). Derive the file name by converting to kebab-case (e.g. `person-min-income.dmn`) and the service name by appending `Service` (e.g. `PersonMinIncomeService`).
18
18
2.**Category** — existing (`age`, `enrollment`) or a new category name.
19
19
3.**Description** — one sentence describing what eligibility condition is checked.
20
-
4.**Parameters** beyond `situation` — for each: name, FEEL type (`string`, `number`, `date`, `boolean`), and purpose.
20
+
4.**Parameters** beyond `situation` — for each: name, FEEL type (`string`, `number`, `date`, `boolean`), and purpose. If there are none, the `parameters` input will be omitted entirely from the DMN model.
21
21
5.**FEEL logic** — either a FEEL expression or a plain-English description. Describe which `situation` fields are used (e.g. `situation.people`, `situation.enrollments`, `situation.simpleChecks.*`).
22
22
6.**Does the logic need intermediate values?** — Yes → context-chain pattern; No → simple literal expression pattern.
23
23
@@ -51,7 +51,7 @@ If a match is found, warn the user and stop. The name must be globally unique.
51
51
- Decision Service name: exactly `{CheckName}Service`.
52
52
- Decision Service output type: `BDT.tCheckResponse`.
53
53
- The output decision must be named `checkResult` with `typeRef="boolean"`.
54
-
-`tParameters` item definition includes all check-specific parameters.
54
+
-**Parameters**: if the check needs caller-supplied values, define a `tParameters` item definition and include the `parameters` inputData node, its `dmn:informationRequirement`, and its DMNDI shape/edge. If the check has no parameters, omit all of these entirely — no `tParameters` type, no `parameters` inputData element. This way the generated OpenAPI schema accurately reflects that the endpoint takes only `situation`.
55
55
-`tSituation` item definition includes only the fields the check actually reads (keep it minimal — don't copy BDT's full tSituation).
56
56
- If a `tSituation` field is itself a complex type (e.g. `simpleChecks`), define a **local** version of that nested type containing only the specific properties this check uses. Reference the local type, not the BDT one. Example: if the check reads only `situation.simpleChecks.ownerOccupant`, define a local `tSimpleChecks` with just `ownerOccupant: boolean`, and use `typeRef="tSimpleChecks"` in `tSituation` (not `BDT.tSimpleChecks`).
57
57
@@ -105,6 +105,7 @@ Based on `person-enrolled-in-benefit.dmn`:
@@ -226,10 +233,10 @@ Based on `person-enrolled-in-benefit.dmn`:
226
233
-`{DS_X_RIGHT}` — `DS_X + DS_WIDTH`
227
234
-`{DECISION_X}` — `DS_X + (DS_WIDTH - 88) / 2` (horizontally centers the 88px decision inside the service box); y is always **147** — this leaves a 41px gap below the service box top (y=106) so the service name label doesn't overlap the decision node
228
235
-`{DECISION_CENTER_X}` — `DECISION_X + 44`
229
-
-`{SITUATION_X}` — `DS_X` (align with left edge of service box)
230
-
-`{PARAMS_X}` — `DS_X + DS_WIDTH - 100` (align with right edge of service box) or spaced evenly
236
+
-`{SITUATION_X}` — with parameters: `DS_X` (left-align); without parameters: `DS_X + (DS_WIDTH - 100) / 2` (center under service box)
237
+
-`{PARAMS_X}` — `DS_X + DS_WIDTH - 100` (right-align with service box); omit if no parameters
231
238
-`{SITUATION_CENTER_X}` — `SITUATION_X + 50`
232
-
-`{PARAMS_CENTER_X}` — `PARAMS_X + 50`
239
+
-`{PARAMS_CENTER_X}` — `PARAMS_X + 50`; omit if no parameters
233
240
234
241
**DMNDI rules** (always enforce):
235
242
- Input nodes (`situation`, `parameters`) must be at a higher y-value than the service box (i.e. below it visually). Use y=336 when the service box occupies y=106–305.
0 commit comments