@fluentcommerce/ai-skills 0.1.0 → 0.3.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.
Potentially problematic release.
This version of @fluentcommerce/ai-skills might be problematic. Click here for more details.
- package/README.md +866 -622
- package/bin/cli.mjs +2112 -1973
- package/content/cli/agents/fluent-cli/agent.json +149 -149
- package/content/cli/agents/fluent-cli.md +132 -132
- package/content/cli/skills/fluent-bootstrap/SKILL.md +214 -181
- package/content/cli/skills/fluent-cli-index/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +117 -1
- package/content/cli/skills/fluent-cli-reference/SKILL.md +1040 -1031
- package/content/cli/skills/fluent-cli-retailer/SKILL.md +27 -2
- package/content/cli/skills/fluent-cli-settings/SKILL.md +21 -1
- package/content/cli/skills/fluent-connect/SKILL.md +937 -886
- package/content/cli/skills/fluent-module-deploy/SKILL.md +63 -5
- package/content/cli/skills/fluent-profile/SKILL.md +73 -0
- package/content/cli/skills/fluent-workflow/SKILL.md +360 -310
- package/content/dev/agents/fluent-backend-dev/AGENT.md +58 -0
- package/content/dev/agents/fluent-backend-dev/agent.json +69 -0
- package/content/dev/agents/fluent-backend-dev.md +287 -0
- package/content/dev/agents/fluent-dev/AGENT.md +98 -0
- package/content/dev/agents/fluent-dev/agent.json +14 -2
- package/content/dev/agents/fluent-dev.md +194 -525
- package/content/dev/agents/fluent-frontend-dev/AGENT.md +63 -0
- package/content/dev/agents/fluent-frontend-dev/agent.json +52 -0
- package/content/dev/agents/fluent-frontend-dev.md +323 -0
- package/content/dev/skills/fluent-archive/SKILL.md +234 -0
- package/content/dev/skills/fluent-build/SKILL.md +312 -192
- package/content/dev/skills/fluent-connection-analysis/SKILL.md +422 -386
- package/content/dev/skills/fluent-custom-code/SKILL.md +15 -9
- package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +19 -2
- package/content/dev/skills/fluent-e2e-test/SKILL.md +501 -394
- package/content/dev/skills/fluent-event-api/SKILL.md +962 -945
- package/content/dev/skills/fluent-feature-explain/SKILL.md +680 -603
- package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +27 -2
- package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -227
- package/content/dev/skills/fluent-feature-status/SKILL.md +335 -0
- package/content/dev/skills/fluent-feedback/SKILL.md +221 -0
- package/content/dev/skills/fluent-implementation-map/SKILL.md +644 -0
- package/content/dev/skills/fluent-job-batch/SKILL.md +10 -0
- package/content/dev/skills/fluent-module-scaffold/SKILL.md +64 -2
- package/content/dev/skills/fluent-module-validate/SKILL.md +778 -775
- package/content/dev/skills/fluent-mystique-analyze/SKILL.md +817 -0
- package/content/dev/skills/fluent-mystique-builder/COMPONENT_TEMPLATE.md +81 -0
- package/content/dev/skills/fluent-mystique-builder/README.md +63 -0
- package/content/dev/skills/fluent-mystique-builder/SKILL.md +1294 -0
- package/content/dev/skills/fluent-mystique-builder/components/INDEX.md +92 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.accordion.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.fulfilmentpack.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.multiparcel.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.returnitems.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.wavepick.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.inline.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.activity.entity.md +25 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.analytics.viz.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.column.md +111 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.json.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.jsoneditor.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.locationId.md +51 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.retailerId.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.bar.md +57 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.download.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.compatibility.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.pick.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.buttons.add.reject.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attribute.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attributes.grid.md +40 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.image.md +37 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.map.point.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.multi.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.product.md +27 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.md +34 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.wrapper.feed.md +98 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.wrapper.source.md +104 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.md +28 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.wrapper.threshold.md +118 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.line.md +32 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.conditional.md +62 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.dashboard.threshold.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.daterange.wrapper.forwarder.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.drawer.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.event.detail.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.events.search.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.daterange.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.filterComplex.md +106 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.intrange.md +82 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.multistring.md +50 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.filterPanel.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.editor.md +22 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.viewer.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.customAction.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.md +116 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.bppmetrics.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.feed.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.source.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.addItem.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mutation.inline.md +88 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.attributes.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.text.md +33 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.link.md +30 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.itemDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.shipmentDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.filter.select.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.refresh.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.column.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.header.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.md +59 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.md +45 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.summary.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.progress.circular.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.provider.graphql.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.quantity.list.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.repeater.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.reports.ipuipc.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.return.rowExpansion.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcode.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcodeFilter.md +72 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.camera.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.settingForm.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.drawer.button.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.modal.button.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.strategy.modal.button.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.stepper.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tab.content.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.card.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tile.metric.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.workflow.provider.md +77 -0
- package/content/dev/skills/fluent-mystique-builder/validate-docs.ps1 +260 -0
- package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +1830 -0
- package/content/dev/skills/fluent-mystique-validate/SKILL.md +646 -0
- package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1144 -1108
- package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1111
- package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -385
- package/content/dev/skills/fluent-scope-decompose/SKILL.md +1123 -1021
- package/content/dev/skills/fluent-session-audit-export/SKILL.md +880 -632
- package/content/dev/skills/fluent-session-summary/SKILL.md +320 -195
- package/content/dev/skills/fluent-settings/SKILL.md +160 -1
- package/content/dev/skills/fluent-source-onboard/SKILL.md +31 -3
- package/content/dev/skills/fluent-sourcing/SKILL.md +1185 -0
- package/content/dev/skills/fluent-system-monitoring/SKILL.md +771 -767
- package/content/dev/skills/fluent-test-data/SKILL.md +514 -513
- package/content/dev/skills/fluent-trace/SKILL.md +1169 -1143
- package/content/dev/skills/fluent-transition-api/SKILL.md +364 -346
- package/content/dev/skills/fluent-use-case-discover/SKILL.md +593 -0
- package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +281 -0
- package/content/dev/skills/fluent-version-manage/SKILL.md +53 -2
- package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
- package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -319
- package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -267
- package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
- package/content/mcp-extn/agents/fluent-mcp.md +133 -69
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -461
- package/content/mcp-official/agents/fluent-mcp-core.md +91 -91
- package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -94
- package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -172
- package/docs/CAPABILITY_MAP.md +106 -77
- package/docs/DEPLOYMENT_PROMOTION_RUNBOOK.md +218 -0
- package/docs/DESIGN-implementation-map.md +698 -0
- package/docs/DEV_WORKFLOW.md +814 -802
- package/docs/FLOW_RUN.md +142 -142
- package/docs/GETTING_STARTED.md +427 -0
- package/docs/USE_CASES.md +909 -52
- package/metadata.json +184 -156
- package/package.json +3 -2
|
@@ -1,319 +1,668 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fluent-workflow-builder
|
|
3
|
-
description: Create and edit Fluent Commerce workflow JSON definitions. Build rulesets, states, transitions, and triggers. Validate structure before upload. Triggers on "build workflow", "create workflow", "add ruleset", "edit workflow", "workflow json".
|
|
4
|
-
user-invocable: true
|
|
5
|
-
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
-
argument-hint: <operation> [workflow-name]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Workflow Builder
|
|
10
|
-
|
|
11
|
-
Create, edit, and validate Fluent Commerce workflow JSON definitions.
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
1
|
+
---
|
|
2
|
+
name: fluent-workflow-builder
|
|
3
|
+
description: Create and edit Fluent Commerce workflow JSON definitions. Build rulesets, states, transitions, and triggers. Validate structure before upload. Triggers on "build workflow", "create workflow", "add ruleset", "edit workflow", "workflow json".
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
+
argument-hint: <operation> [workflow-name]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Workflow Builder
|
|
10
|
+
|
|
11
|
+
Create, edit, and validate Fluent Commerce workflow JSON definitions.
|
|
12
|
+
|
|
13
|
+
## Pre-flight: Feedback Check
|
|
14
|
+
|
|
15
|
+
Before starting, check for past learnings from this skill:
|
|
16
|
+
|
|
17
|
+
1. Check if `accounts/<PROFILE>/feedback/fluent-workflow-builder.jsonl` exists
|
|
18
|
+
2. If yes, read last 20 records
|
|
19
|
+
3. Filter to: same entity type/subtype if known, FAILURE or USER_CORRECTED outcomes, confidence = CONFIRMED or PROMOTED
|
|
20
|
+
4. Extract top 3 relevant learnings — use as internal "WATCH OUT" guidance during execution
|
|
21
|
+
5. Do NOT show raw feedback to the user — silently adjust approach based on past issues
|
|
22
|
+
|
|
23
|
+
## Planning Gate
|
|
24
|
+
|
|
25
|
+
### Pre-flight: Plan Verification
|
|
26
|
+
|
|
27
|
+
Before proceeding, check for an existing approved plan:
|
|
28
|
+
|
|
29
|
+
1. **Search** `accounts/<PROFILE>/features/*/status.json` for an entry with `plan: "APPROVED"` that covers this workflow, OR check `accounts/<PROFILE>/tasks/` for a task plan with `Status: APPROVED`
|
|
30
|
+
2. **If multi-artifact work** (workflow + rules + settings): STOP. Invoke `/fluent-feature-plan` first — this skill cannot be used for multi-artifact work without a feature plan
|
|
31
|
+
3. **If approved plan found:** Skip to implementation, referencing the plan's §4 (Workflows), §5 (Statuses), and §6 (Rulesets) sections
|
|
32
|
+
4. **If single-workflow-only work with no plan:** Continue to the Planning Gate below to write a plan for this skill
|
|
33
|
+
|
|
34
|
+
**Before creating or modifying any workflow, write a plan using the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill.** Every table row must carry a Source column (NEW/EXISTING/MODIFIED/REUSED/OOTB).
|
|
35
|
+
|
|
36
|
+
**If this workflow change is part of a larger feature** (rules + settings + webhooks), use `/fluent-feature-plan` first. Then reference the approved plan during implementation.
|
|
37
|
+
|
|
38
|
+
**Workflow-builder specific emphasis — ensure these are covered:**
|
|
39
|
+
|
|
40
|
+
1. **Business Context (§1)** — what business flow this workflow enables or modifies
|
|
41
|
+
2. **State machine (§3.1)** — Mermaid `stateDiagram-v2` with ALL statuses; annotate `:::added`, `:::removed`, `:::modified`. Validate syntax per `/fluent-mermaid-validate`
|
|
42
|
+
3. **Cross-entity flow (§3.2)** — Mermaid `sequenceDiagram` for cross-entity event chains, webhooks, external systems. Validate syntax per `/fluent-mermaid-validate`
|
|
43
|
+
4. **Before/After diff (§3.4)** — if modifying, show changes (or use `workflow.diff`)
|
|
44
|
+
5. **Workflows (§4)** — every workflow created or modified with Source column and current version
|
|
45
|
+
6. **Statuses (§5)** — new/modified statuses with Source column, entity type, which ruleset adds them
|
|
46
|
+
7. **Rulesets (§6)** — rulesets with Source column, trigger event, from/to status, ordered rule list with NEW/OOTB/EXISTING annotations
|
|
47
|
+
8. **Rules Inventory (§7)** — all rules with Source classification
|
|
48
|
+
9. **Settings (§9)** — settings with Source column, context, value type, JSON example for NEW
|
|
49
|
+
10. **Webhooks (§10)** — setting name, method, payload shape, trigger rule
|
|
50
|
+
11. **Scheduled Events (§11)** — event name, delay, purpose
|
|
51
|
+
12. **GraphQL Operations (§12)** — queries/mutations marked as NEW or REUSED pattern
|
|
52
|
+
13. **Deployment Sequence (§17)** — modules before workflows that reference new rules
|
|
53
|
+
|
|
54
|
+
**Write the plan to:** `accounts/<PROFILE>/tasks/<YYYY-MM-DD>-workflow-builder-<slug>.md`. Set `Status: PENDING`.
|
|
55
|
+
|
|
56
|
+
Present the full plan content to the user and wait for approval before writing any workflow JSON. On approval, update the file to `Status: APPROVED`. If the user says "just do it", proceed directly (still write the file for audit trail).
|
|
57
|
+
|
|
58
|
+
## Post-Build: Workflow Validation
|
|
59
|
+
|
|
60
|
+
After building or modifying any workflow JSON, **always recommend running `/fluent-workflow-analyzer`** to validate for:
|
|
61
|
+
- Orphaned rulesets (triggers that can never fire)
|
|
62
|
+
- Trigger conflicts (duplicate event+status combinations)
|
|
63
|
+
- Missing rule references (rules not in `plugin.list`)
|
|
64
|
+
- Structural issues (statuses without transitions, unreachable states)
|
|
65
|
+
|
|
66
|
+
If the user skips this step, `/fluent-pre-deploy-check` will enforce it before deployment. But catching issues early avoids wasted deploy cycles.
|
|
67
|
+
|
|
68
|
+
## Ownership Boundary
|
|
69
|
+
|
|
70
|
+
This skill owns workflow structure/design guidance and validation checklists.
|
|
71
|
+
|
|
72
|
+
Operational workflow commands are owned by `/fluent-workflow`:
|
|
73
|
+
|
|
74
|
+
- `workflow list`
|
|
75
|
+
- `workflow download`
|
|
76
|
+
- `workflow merge`
|
|
77
|
+
- `workflowlog` operations
|
|
78
|
+
|
|
79
|
+
## Pre-flight: Custom Rule Availability
|
|
80
|
+
|
|
81
|
+
Before building or modifying a workflow that references custom rules, verify those rules are deployed:
|
|
82
|
+
|
|
83
|
+
1. **Identify custom rules** in the plan's §7 (Rules Inventory) — any rule with Source = NEW, MODIFIED, or EXISTING that is NOT `FLUENTRETAIL.*`
|
|
84
|
+
2. **For each custom rule**, query: `plugin.list({ name: "<RuleName>" })`
|
|
85
|
+
3. **If ALL custom rules found:** Proceed — rules are registered and available.
|
|
86
|
+
4. **If ANY custom rule is MISSING:** **STOP.** Inform the user: *"Custom rule `<RuleName>` is not registered. Deploy the module first via `/fluent-build` → `/fluent-module-deploy`, then resume workflow editing."*
|
|
87
|
+
5. **Exception:** If the workflow is being built as part of a feature plan where module deployment comes later (§17 Deployment Sequence), note the dependency and proceed — but add a `DEPLOYMENT_ORDER_WARNING` comment in the plan.
|
|
88
|
+
|
|
89
|
+
This check prevents deploying workflows that reference unregistered rules, which causes runtime `NO_MATCH` failures.
|
|
90
|
+
|
|
91
|
+
## Pre-Check: Load Source Analysis
|
|
92
|
+
|
|
93
|
+
Before adding custom rules to a workflow, check if `/fluent-custom-code` analysis artifacts exist:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
accounts/<PROFILE>/analysis/code/workflow-rule-map.json
|
|
97
|
+
accounts/<PROFILE>/analysis/code/source-map.json
|
|
98
|
+
accounts/<PROFILE>/analysis/code/constraints.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
If found, use them to:
|
|
102
|
+
- `source-map.json` → `modules[].rules[]` — available custom rules, their parameters, and entity types
|
|
103
|
+
- `workflow-rule-map.json` → existing rule-to-workflow bindings (avoid duplicates)
|
|
104
|
+
- `constraints.json` → extension constraints and risks
|
|
105
|
+
|
|
106
|
+
If not found, fall back to workflow JSON analysis only. Treat artifact-gate failures the same as "not found" (for example missing required files, missing hashes, or blocking `missingSources` in `constraints.json`). Suggest running `/fluent-custom-code <PROFILE>` first when adding custom rules.
|
|
107
|
+
|
|
108
|
+
## Handoff Protocol
|
|
109
|
+
|
|
110
|
+
### Signals emitted by this skill
|
|
111
|
+
|
|
112
|
+
| Signal | Condition | Example |
|
|
113
|
+
|--------|-----------|---------|
|
|
114
|
+
| `-> READY: <path>` | Workflow JSON created/modified | `-> READY: accounts/HMDEV/workflows/HM_TEST/ORDER__HD.json` |
|
|
115
|
+
| `-> NEXT: /fluent-<skill>` | Always validate after build | `-> NEXT: /fluent-workflow-analyzer` |
|
|
116
|
+
| `-> BLOCKED: <reason>` | Prerequisite missing | `-> BLOCKED: PREREQ_MISSING — Custom rule CancelOrderRule not registered. Run /fluent-build + /fluent-module-deploy` |
|
|
117
|
+
| `-> SKIP: <reason>` | No workflow changes needed | `-> SKIP: No workflow changes in this feature plan` |
|
|
118
|
+
|
|
119
|
+
### Error codes
|
|
120
|
+
|
|
121
|
+
| Code | Condition | Recovery |
|
|
122
|
+
|------|-----------|----------|
|
|
123
|
+
| `PLAN_REQUIRED` | Multi-artifact work attempted without approved plan | Run `/fluent-feature-plan` first |
|
|
124
|
+
| `PREREQ_MISSING` | Custom rules not deployed or source analysis missing | Deploy module first via `/fluent-build` + `/fluent-module-deploy` |
|
|
125
|
+
| `VALIDATION_FAILED` | Workflow JSON structure invalid | Fix JSON structure per validation checklist |
|
|
126
|
+
|
|
127
|
+
## When to Use
|
|
128
|
+
|
|
129
|
+
- Creating a new workflow from scratch
|
|
130
|
+
- Adding rulesets or states to an existing workflow
|
|
131
|
+
- Editing triggers, rules, or gate conditions
|
|
132
|
+
- Validating workflow JSON before upload
|
|
133
|
+
- Generating workflow fragments for merge operations
|
|
134
|
+
|
|
135
|
+
## Progress
|
|
136
|
+
|
|
137
|
+
Emit this block at each phase transition to show progress:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
▸ /fluent-workflow-builder [1/5]
|
|
141
|
+
✓ Entity type & subtype → Design state machine
|
|
142
|
+
○ Build rulesets ○ Add gate rulesets
|
|
143
|
+
○ Validate structure
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Update the block as each phase completes — mark completed phases with `✓`, the active phase with `→`, and remaining phases with `○`. Replace `[1/5]` with the current phase number.
|
|
147
|
+
|
|
148
|
+
## Workflow JSON Structure
|
|
149
|
+
|
|
150
|
+
Every Fluent workflow follows this schema:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"retailerId": "<retailer-id>",
|
|
155
|
+
"version": "<semver>",
|
|
156
|
+
"entityType": "ORDER | FULFILMENT | RETURN_ORDER | ARTICLE | WAVE | ...",
|
|
157
|
+
"entitySubtype": "<subtype matching workflow name after ::>",
|
|
158
|
+
"name": "<ENTITY_TYPE>::<SUBTYPE>",
|
|
159
|
+
"description": "<human-readable description>",
|
|
160
|
+
"versionComment": "<what changed in this version>",
|
|
161
|
+
"createdBy": "<retailer-ref>",
|
|
162
|
+
"rulesets": [ ... ],
|
|
163
|
+
"statuses": [ ... ]
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Ruleset Structure
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"name": "<RulesetName>",
|
|
172
|
+
"description": "[<ENTITY_TYPE>] What this ruleset does",
|
|
173
|
+
"type": "<ENTITY_TYPE>",
|
|
174
|
+
"subtype": "<ENTITY_SUBTYPE>",
|
|
175
|
+
"eventType": "NORMAL",
|
|
176
|
+
"rules": [
|
|
177
|
+
{
|
|
178
|
+
"name": "<ACCOUNT>.<MODULE>.<RuleName>",
|
|
179
|
+
"props": {
|
|
180
|
+
"key": "value"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"triggers": [
|
|
185
|
+
{ "status": "<STATUS>" }
|
|
186
|
+
],
|
|
187
|
+
"userActions": []
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Trigger Types
|
|
192
|
+
|
|
193
|
+
Rulesets are triggered by one of:
|
|
194
|
+
|
|
195
|
+
| Trigger | When it fires |
|
|
196
|
+
|---------|---------------|
|
|
197
|
+
| `{ "status": "CREATED" }` | Entity enters CREATED status (platform CREATE event) |
|
|
198
|
+
| `{ "status": "ON_VALIDATION" }` | Entity enters ON_VALIDATION status |
|
|
199
|
+
| No status trigger | Ruleset is triggered by a named event matching the ruleset name |
|
|
200
|
+
|
|
201
|
+
**Convention:** If a ruleset has no `status` trigger, it fires when an event with `name` matching the ruleset name arrives. For example, ruleset `ConfirmValidation` fires on event `ConfirmValidation`.
|
|
202
|
+
|
|
203
|
+
### User Actions
|
|
204
|
+
|
|
205
|
+
User actions link UI buttons to workflow rulesets. When a user clicks the button, an event is sent via `/event/sync` to trigger the ruleset.
|
|
206
|
+
|
|
207
|
+
**Schema:**
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"userActions": [
|
|
212
|
+
{
|
|
213
|
+
"eventName": "<EventName>",
|
|
214
|
+
"context": [
|
|
215
|
+
{
|
|
216
|
+
"label": "<Button Label>",
|
|
217
|
+
"type": "PRIMARY",
|
|
218
|
+
"modules": ["adminconsole"],
|
|
219
|
+
"confirm": true
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"attributes": []
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Field reference:**
|
|
229
|
+
|
|
230
|
+
| Field | Type | Required | Description |
|
|
231
|
+
|-------|------|----------|-------------|
|
|
232
|
+
| `eventName` | String | No | Event name sent when button is clicked. If omitted, defaults to the **ruleset name**. Strict recommendation: set it explicitly for every user action and keep it aligned with the ruleset name unless intentionally different. |
|
|
233
|
+
| `context` | Array | Yes | Where and how the button appears. At least one entry required. |
|
|
234
|
+
| `context[].label` | String | Yes | Button text shown in the UI |
|
|
235
|
+
| `context[].type` | String | Yes | `"PRIMARY"` (prominent) or `"SECONDARY"` (overflow menu / ellipsis) |
|
|
236
|
+
| `context[].modules` | Array | Yes | Which UI apps show the button: `"adminconsole"` (OMS), `"store"` (Store App), `"servicepoint"` (Service Point), or any custom manifest app name (the suffix after `fc.mystique.manifest.`) |
|
|
237
|
+
| `context[].confirm` | Boolean | Yes | Whether the UI shows a confirmation dialog before sending the event |
|
|
238
|
+
| `attributes` | Array | No | Attributes collected via the confirmation dialog. Empty array if no input needed. |
|
|
239
|
+
|
|
240
|
+
### Strict User Action Contract (Non-Negotiable)
|
|
241
|
+
|
|
242
|
+
Use these guardrails to prevent configuration drift and hallucinated schema fields.
|
|
243
|
+
|
|
244
|
+
1. `userActions` MUST be inside the ruleset object (never at workflow root).
|
|
245
|
+
2. Ruleset MUST include `subtype`, and it MUST match workflow `entitySubtype` for UI actions to appear.
|
|
246
|
+
3. Set `userActions[].eventName` explicitly and keep it equal to the ruleset `name` unless a deliberate alternate routing is required.
|
|
247
|
+
4. Each `context[]` object MUST include: `label`, `type`, `modules`, `confirm`.
|
|
248
|
+
5. `context[].modules` values MUST be valid app names: `adminconsole`, `store`, `servicepoint`, or known custom manifest app suffixes from `fc.mystique.apps`.
|
|
249
|
+
6. `attributes` is optional; when present, each attribute MUST include `name`, `label`, `type`, and `mandatory`.
|
|
250
|
+
7. Do NOT invent undocumented keys (for example: `actionLabel`, `moduleName`, `requiresConfirmation`, `buttonType`).
|
|
251
|
+
8. User actions are sync UI transitions (`/event/sync`). Keep payloads minimal and schema-accurate.
|
|
252
|
+
|
|
253
|
+
**Attribute schema** (when confirmation collects user input):
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"attributes": [
|
|
258
|
+
{
|
|
259
|
+
"name": "controlValue",
|
|
260
|
+
"label": "Control Value",
|
|
261
|
+
"type": "INTEGER",
|
|
262
|
+
"source": "",
|
|
263
|
+
"defaultValue": 0,
|
|
264
|
+
"mandatory": true
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
| Field | Type | Description |
|
|
271
|
+
|-------|------|-------------|
|
|
272
|
+
| `name` | String | Attribute key passed in the event payload |
|
|
273
|
+
| `label` | String | Label shown in the confirmation dialog |
|
|
274
|
+
| `type` | String | `STRING`, `INTEGER`, `BOOLEAN`, `FLOAT` |
|
|
275
|
+
| `source` | String | Setting key to populate dropdown options (e.g., `"settings.cancellationReasons"`). Empty string for free-text input. |
|
|
276
|
+
| `defaultValue` | Any | Pre-filled value in the dialog |
|
|
277
|
+
| `mandatory` | Boolean | Whether the field must be filled before confirming |
|
|
278
|
+
|
|
279
|
+
**Key rules:**
|
|
280
|
+
|
|
281
|
+
- The ruleset MUST have a `subtype` (matching the workflow's entity subtype) for the user action to display in the UI.
|
|
282
|
+
- `eventName` is optional -- if omitted, the event name defaults to the ruleset name. Set it explicitly only when the event name differs.
|
|
283
|
+
- A ruleset can be both event-triggered AND have user actions (dual classification). For example, `CancelOrder` can be triggered by a user action button AND by an automated event from another ruleset.
|
|
284
|
+
- `modules` values map to Mystique manifest app names. The `fc.mystique.apps` account-level setting controls which apps are available for selection. To add a user action to `fc.mystique.manifest.custom`, use `"custom"` in the modules array.
|
|
285
|
+
- User actions send events via the synchronous endpoint (`/event/sync`), not the async endpoint. This means the UI blocks until the event is processed.
|
|
286
|
+
|
|
287
|
+
#### User Action Validation Checklist (MANDATORY)
|
|
288
|
+
|
|
289
|
+
**Before outputting ANY ruleset with `userActions`, run every check. If any fails, fix before presenting.**
|
|
290
|
+
|
|
291
|
+
| # | Check | Fail = | Common mistake |
|
|
292
|
+
|---|-------|--------|----------------|
|
|
293
|
+
| UA01 | Ruleset has `subtype` matching workflow entity subtype | Button invisible in UI | Forgetting `"subtype": "HD"` — #1 cause of missing buttons |
|
|
294
|
+
| UA02 | `context` is an **array** (not object) | Runtime error | `"context": {...}` instead of `"context": [{...}]` |
|
|
295
|
+
| UA03 | Every context entry has ALL 4 fields: `label`, `type`, `modules`, `confirm` | Invisible / broken | Omitting `confirm` or `modules` |
|
|
296
|
+
| UA04 | `type` is exactly `"PRIMARY"` or `"SECONDARY"` (uppercase) | Button invisible | `"primary"`, `"default"`, `"action"` — none valid |
|
|
297
|
+
| UA05 | `modules` is **non-empty array** of valid app names | Button invisible | Empty `[]` or wrong name |
|
|
298
|
+
| UA06 | Module values: `"adminconsole"` (OMS), `"store"` (Store), `"servicepoint"` (SP), or custom manifest suffix | Wrong app | `"oms"`, `"fluent-oms"`, `"console"` — not valid |
|
|
299
|
+
| UA07 | `confirm` is **boolean** (`true`/`false`), not string | Dialog broken | `"confirm": "true"` |
|
|
300
|
+
| UA08 | If `attributes` has entries, each has `name`, `label`, `type` | Dialog broken | Missing `name` = no key in event payload |
|
|
301
|
+
| UA09 | Attribute `type`: `STRING`, `INTEGER`, `BOOLEAN`, `FLOAT` (uppercase) | Wrong input | `"string"`, `"text"`, `"number"` — not valid |
|
|
302
|
+
| UA10 | Attribute `source`: empty `""` for free-text, `"settings.<key>"` for dropdown | Dropdown empty | Missing `settings.` prefix |
|
|
303
|
+
| UA11 | `userActions` is array at **ruleset top level** | Silently ignored | Inside `props` or `rules` — wrong |
|
|
304
|
+
| UA12 | `eventName` matches ruleset `name` OR explicitly set to different event | Wrong event | Typo sends event no ruleset catches |
|
|
305
|
+
|
|
306
|
+
**Hard-forbidden patterns (never generate):**
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
WRONG: "modules": ["oms"] → RIGHT: "modules": ["adminconsole"]
|
|
310
|
+
WRONG: "modules": ["fluent-store"] → RIGHT: "modules": ["store"]
|
|
311
|
+
WRONG: "type": "primary" → RIGHT: "type": "PRIMARY"
|
|
312
|
+
WRONG: "type": "button" → RIGHT: "type": "PRIMARY" or "SECONDARY"
|
|
313
|
+
WRONG: "confirm": "true" → RIGHT: "confirm": true
|
|
314
|
+
WRONG: "context": { ... } → RIGHT: "context": [{ ... }]
|
|
315
|
+
WRONG: attribute "type": "string" → RIGHT: attribute "type": "STRING"
|
|
316
|
+
WRONG: "source": "cancellationReasons" → RIGHT: "source": "settings.cancellationReasons"
|
|
317
|
+
WRONG: userActions inside "rules" → RIGHT: userActions at ruleset top level
|
|
318
|
+
WRONG: ruleset without "subtype" → RIGHT: always include "subtype" matching workflow
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**Post-output verification:** After generating a user action, verify: (1) Does this ruleset have `subtype`? (2) Does `modules` use the correct app name? (3) Is `context` an array with all 4 fields? If any answer is no, fix before presenting.
|
|
322
|
+
|
|
323
|
+
**Troubleshooting:** When a user action fires, the browser sends a `POST /api/v4.1/event/sync` call. Use browser DevTools (Network tab) to inspect the request payload, bearer token, and response `eventStatus`. The token is the logged-in user's token -- useful for debugging permission issues.
|
|
324
|
+
|
|
325
|
+
**When to use user actions:**
|
|
326
|
+
- Manual workflow transitions that require human decision (cancel, reject, approve, confirm)
|
|
327
|
+
- Collecting information from the user at transition time (cancellation reason, tracking number)
|
|
328
|
+
- Actions that should appear as buttons in Fluent OMS or Store apps
|
|
329
|
+
|
|
330
|
+
**When NOT to use:**
|
|
331
|
+
- Automated status transitions -- use `triggers` with status-based firing
|
|
332
|
+
- System-to-system integrations -- use `SendEvent` rules or the async event API
|
|
333
|
+
- Scheduled/delayed actions -- use `ScheduleEvent` rule
|
|
334
|
+
- Transitions that happen without user involvement (e.g., all fulfilments complete → advance order)
|
|
335
|
+
|
|
336
|
+
**Common user action patterns:**
|
|
337
|
+
|
|
338
|
+
| Pattern | eventName | modules | confirm | Typical attributes |
|
|
339
|
+
|---------|-----------|---------|---------|-------------------|
|
|
340
|
+
| Cancel order | `CancelOrder` | `["adminconsole"]` | true | cancellationReason (DROPDOWN from settings) |
|
|
341
|
+
| Confirm order | `ConfirmOrder` | `["adminconsole"]` | true | none |
|
|
342
|
+
| Reject fulfilment | `RejectFulfilment` | `["store"]` | true | rejectionReason (DROPDOWN) |
|
|
343
|
+
| Pick item | `PickItem` | `["store"]` | false | none |
|
|
344
|
+
| Pack fulfilment | `PackFulfilment` | `["store"]` | false | none |
|
|
345
|
+
| Dispatch fulfilment | `DispatchFulfilment` | `["store"]` | true | trackingNumber (STRING), carrier (DROPDOWN) |
|
|
346
|
+
| Approve return | `ApproveReturn` | `["adminconsole"]` | true | none |
|
|
347
|
+
|
|
348
|
+
**Complete example -- Cancel Order with reason collection:**
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{
|
|
352
|
+
"name": "CancelOrder",
|
|
353
|
+
"description": "[ORDER] Cancel order from OMS with reason",
|
|
354
|
+
"type": "ORDER",
|
|
355
|
+
"subtype": "HD",
|
|
356
|
+
"eventType": "NORMAL",
|
|
357
|
+
"rules": [
|
|
358
|
+
{
|
|
359
|
+
"name": "<ACCOUNT>.core.SetState",
|
|
360
|
+
"props": { "status": "CANCELLED" }
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"triggers": [],
|
|
364
|
+
"userActions": [
|
|
365
|
+
{
|
|
366
|
+
"eventName": "CancelOrder",
|
|
367
|
+
"context": [
|
|
368
|
+
{
|
|
369
|
+
"label": "Cancel Order",
|
|
370
|
+
"type": "PRIMARY",
|
|
371
|
+
"modules": ["adminconsole"],
|
|
372
|
+
"confirm": true
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"attributes": [
|
|
376
|
+
{
|
|
377
|
+
"name": "cancellationReason",
|
|
378
|
+
"label": "Cancellation Reason",
|
|
379
|
+
"type": "STRING",
|
|
380
|
+
"source": "settings.cancellationReasons",
|
|
381
|
+
"defaultValue": "",
|
|
382
|
+
"mandatory": true
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "cancellationNote",
|
|
386
|
+
"label": "Notes",
|
|
387
|
+
"type": "STRING",
|
|
388
|
+
"source": "",
|
|
389
|
+
"defaultValue": "",
|
|
390
|
+
"mandatory": false
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Verifying user actions after deployment:**
|
|
399
|
+
|
|
400
|
+
1. Query the Transition API for the entity status where the button should appear:
|
|
401
|
+
```
|
|
402
|
+
workflow.transitions entityType=ORDER subtype=HD status=BOOKED retailerId=2
|
|
403
|
+
```
|
|
404
|
+
Response `userActions[]` should contain the configured action with `eventName`, `context`, and `attributes`.
|
|
405
|
+
|
|
406
|
+
2. If `userActions` is empty: check `subtype` on the ruleset (most common cause), verify `modules` matches the manifest app name, confirm the entity is in the correct status.
|
|
407
|
+
|
|
408
|
+
**Strict validation checklist (run before upload):**
|
|
409
|
+
|
|
410
|
+
1. Confirm each ruleset with `userActions` has `type` + `subtype`, and `subtype` equals workflow `entitySubtype`.
|
|
411
|
+
2. Confirm `userActions[].eventName` is explicitly set and aligns to ruleset `name` (unless intentionally different).
|
|
412
|
+
3. Confirm every `context[].modules` value is valid for the target UI app.
|
|
413
|
+
4. Run `workflow.transitions` twice:
|
|
414
|
+
- once with `module: "all"` (truth-source view),
|
|
415
|
+
- once with the target module (visibility check).
|
|
416
|
+
5. Trigger from UI and inspect `POST /api/v4.1/event/sync` in browser DevTools (payload + response `eventStatus`).
|
|
417
|
+
|
|
418
|
+
### Statuses Array
|
|
419
|
+
|
|
420
|
+
```json
|
|
421
|
+
{
|
|
422
|
+
"statuses": [
|
|
423
|
+
{ "name": "CREATED", "category": "BOOKING", "entityType": "ORDER" },
|
|
424
|
+
{ "name": "ON_VALIDATION", "category": "BOOKING", "entityType": "ORDER" },
|
|
425
|
+
{ "name": "COMPLETE", "category": "DONE", "entityType": "ORDER" }
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Categories: `BOOKING`, `FULFILMENT`, `DONE`, `PAYMENT`
|
|
431
|
+
|
|
432
|
+
## Common Rule Patterns
|
|
433
|
+
|
|
434
|
+
### Core Rules (provided by Fluent platform)
|
|
435
|
+
|
|
436
|
+
| Rule | Props | Purpose |
|
|
437
|
+
|------|-------|---------|
|
|
438
|
+
| `<ACCOUNT>.core.SetState` | `status` | Transition entity to new status |
|
|
439
|
+
| `<ACCOUNT>.core.SendEvent` | `eventName` | Fire a named event on current entity |
|
|
440
|
+
| `<ACCOUNT>.core.SendEventOnVerifyingEntityStatus` | `eventName`, `statuses` (comma-separated) | Fire event only if entity is in one of the listed statuses |
|
|
441
|
+
| `<ACCOUNT>.core.SendEventOnVerifyingAllFcStatus` | `eventName`, `statuses` (comma-separated) | Gate: fire event when ALL fulfilment choices reach one of the listed statuses |
|
|
442
|
+
| `<ACCOUNT>.core.ScheduleEvent` | `eventName`, `delay` (seconds) | Schedule a delayed event |
|
|
443
|
+
| `<ACCOUNT>.core.IfEventAttributeValueIsEqual` | `eventAttributeName`, `eventAttributeValue`, `eventName` | Conditional: fire event if attribute matches |
|
|
444
|
+
|
|
445
|
+
### Extension Rules (from custom extension module)
|
|
446
|
+
|
|
447
|
+
| Rule | Key Props | Purpose |
|
|
448
|
+
|------|-----------|---------|
|
|
449
|
+
| `<ACCOUNT>.<MODULE>.UpdateStatusHistory` | `toStatus` | Track status transition in attribute |
|
|
450
|
+
| `<ACCOUNT>.<MODULE>.SendWebhookWithDynamicAttributes` | `setting` | Send webhook with config from Setting |
|
|
451
|
+
| `<ACCOUNT>.<MODULE>.UpdateEntityFromSetting` | `setting` | Batch-update entity from event data via Setting |
|
|
452
|
+
| `<ACCOUNT>.<MODULE>.CreateFulfilmentFromSourcingLocation` | *(from event attrs)* | Create fulfilment from sourcing data |
|
|
453
|
+
| `<ACCOUNT>.<MODULE>.UpsertAttribute` | `attributeName`, `attributeType`, `attributeValue` | Set entity attribute |
|
|
454
|
+
| `<ACCOUNT>.<MODULE>.UpsertAttributeFromPath` | `jsonpath`, `attributeName`, `attributeType` | Extract value via JSON path and set as attribute |
|
|
455
|
+
|
|
456
|
+
## Plan Before Building
|
|
457
|
+
|
|
458
|
+
**Before creating or editing any workflow, present an implementation plan to the user.** The plan should include:
|
|
459
|
+
|
|
460
|
+
1. **State machine design** — All statuses and transitions, shown as a Mermaid `stateDiagram-v2`
|
|
461
|
+
2. **Ruleset inventory** — Every ruleset with its trigger condition, rules, and purpose
|
|
462
|
+
3. **Settings dependencies** — Any settings referenced by rules (webhook URLs, thresholds, feature flags)
|
|
463
|
+
4. **Custom rule requirements** — Any new Java rules needed (entity type, parameters, behavior)
|
|
464
|
+
5. **Cross-entity interactions** — How this workflow interacts with other entity workflows (e.g., ORDER → FULFILMENT)
|
|
465
|
+
6. **Deployment sequence** — What gets deployed in what order
|
|
466
|
+
|
|
467
|
+
For workflow edits, additionally show:
|
|
468
|
+
- **Before/after diff** — What rulesets are being added, removed, or modified
|
|
469
|
+
- **Before/after Mermaid diagrams** — Visual comparison of the state machine changes
|
|
470
|
+
- **Risk assessment** — Impact of changes on existing live entities
|
|
471
|
+
|
|
472
|
+
**Wait for user approval before making any changes to workflow JSON files.**
|
|
473
|
+
|
|
474
|
+
## Building a New Workflow
|
|
475
|
+
|
|
476
|
+
### Step 1: Determine entity type and subtype
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
Workflow name = <ENTITY_TYPE>::<SUBTYPE>
|
|
480
|
+
Example: ORDER::HD, FULFILMENT::DEFAULT, RETURN_ORDER::DEFAULT
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### Step 2: Design the state machine
|
|
484
|
+
|
|
485
|
+
List all statuses and the events/rules that transition between them. Example:
|
|
486
|
+
|
|
487
|
+
```
|
|
488
|
+
CREATED → [CREATE ruleset] → ON_VALIDATION
|
|
489
|
+
ON_VALIDATION → [ConfirmValidation event] → IN_PROGRESS
|
|
490
|
+
IN_PROGRESS → [ConfirmShipment event] → SHIPPED
|
|
491
|
+
SHIPPED → [ConfirmDelivery event] → COMPLETE
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Step 3: Build each ruleset
|
|
495
|
+
|
|
496
|
+
For each transition, create a ruleset with:
|
|
497
|
+
1. The rules to execute (in order — rules run sequentially)
|
|
498
|
+
2. A trigger (status trigger for the first ruleset, event-name trigger for the rest)
|
|
499
|
+
|
|
500
|
+
### Step 4: Add gate rulesets (if needed)
|
|
501
|
+
|
|
502
|
+
Gates check child entity statuses before advancing parent. Example:
|
|
503
|
+
|
|
504
|
+
```json
|
|
505
|
+
{
|
|
506
|
+
"name": "NotifyFCComplete",
|
|
507
|
+
"description": "Gate: advance order when all FCs reach terminal status",
|
|
508
|
+
"type": "ORDER",
|
|
509
|
+
"eventType": "NORMAL",
|
|
510
|
+
"rules": [
|
|
511
|
+
{
|
|
512
|
+
"name": "ACCT.core.SendEventOnVerifyingAllFcStatus",
|
|
513
|
+
"props": {
|
|
514
|
+
"eventName": "SourceOrder",
|
|
515
|
+
"statuses": "ASSIGNED,CANCELLED,ESCALATED"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"triggers": [],
|
|
520
|
+
"userActions": []
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### Step 5: Validate structure
|
|
525
|
+
|
|
526
|
+
Before uploading, verify:
|
|
527
|
+
- [ ] Every status referenced in triggers exists in the `statuses` array
|
|
528
|
+
- [ ] Every `SetState` target status exists in the `statuses` array
|
|
529
|
+
- [ ] Every `SendEvent` target has a matching ruleset name (or is handled elsewhere)
|
|
530
|
+
- [ ] Rule names follow `<ACCOUNT>.<MODULE>.<RuleName>` format
|
|
531
|
+
- [ ] No duplicate ruleset names
|
|
532
|
+
- [ ] Version is bumped from previous
|
|
533
|
+
|
|
534
|
+
## Editing an Existing Workflow
|
|
535
|
+
|
|
536
|
+
### Get current workflow first
|
|
537
|
+
|
|
538
|
+
Use `/fluent-workflow` for download/list operations, then apply this skill's structure and validation patterns.
|
|
539
|
+
|
|
540
|
+
### Make changes
|
|
541
|
+
|
|
542
|
+
Edit the JSON directly. Common operations:
|
|
543
|
+
|
|
544
|
+
**Add a new ruleset:**
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"name": "NewRulesetName",
|
|
548
|
+
"description": "[ORDER] What it does",
|
|
549
|
+
"type": "ORDER",
|
|
550
|
+
"eventType": "NORMAL",
|
|
551
|
+
"rules": [ ... ],
|
|
552
|
+
"triggers": [ { "status": "IN_PROGRESS" } ],
|
|
553
|
+
"userActions": []
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
**Add a rule to existing ruleset:**
|
|
558
|
+
Find the ruleset in the `rulesets` array, append to its `rules` array.
|
|
559
|
+
|
|
560
|
+
**Change a gate condition:**
|
|
561
|
+
Find the gate ruleset, update the `statuses` prop value.
|
|
562
|
+
|
|
563
|
+
### Upload/merge
|
|
564
|
+
|
|
565
|
+
Use `/fluent-workflow-deploy` for uploading workflows to environments (MCP tool primary, REST API fallback). Use `/fluent-workflow` for listing, downloading, and merging workflows. Use `/fluent-module-deploy` for deploying full module bundles (JAR + settings + workflows together).
|
|
566
|
+
|
|
567
|
+
**Important:** If the workflow references new custom rules, deploy the module first via `/fluent-module-deploy` before uploading the workflow. Unregistered rules cause NO_MATCH events at runtime.
|
|
568
|
+
|
|
569
|
+
## Workflow Fragments
|
|
570
|
+
|
|
571
|
+
Fragments are partial workflow definitions used with `fluent workflow merge`:
|
|
572
|
+
|
|
573
|
+
```json
|
|
574
|
+
{
|
|
575
|
+
"name": "my-customization",
|
|
576
|
+
"description": "Add custom validation step",
|
|
577
|
+
"rulesets": [
|
|
578
|
+
{
|
|
579
|
+
"name": "CustomValidation",
|
|
580
|
+
"description": "Custom validation ruleset",
|
|
581
|
+
"type": "ORDER",
|
|
582
|
+
"eventType": "NORMAL",
|
|
583
|
+
"rules": [ ... ],
|
|
584
|
+
"triggers": [ ... ],
|
|
585
|
+
"userActions": []
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"statuses": [
|
|
589
|
+
{ "name": "CUSTOM_VALIDATING", "category": "BOOKING", "entityType": "ORDER" }
|
|
590
|
+
]
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Merge adds the fragment's rulesets and statuses to the base workflow. Use this for modular customizations.
|
|
595
|
+
|
|
596
|
+
## Session Tracking
|
|
597
|
+
|
|
598
|
+
When invoked, log the following to the session tracking protocol (consumed by `/fluent-session-summary` and `/fluent-session-audit-export`):
|
|
599
|
+
|
|
600
|
+
**On entry:**
|
|
601
|
+
```json
|
|
602
|
+
{ "skill": "<this-skill-name>", "timestamp": "<ISO-8601>", "arguments": { "<key>": "<value>", "...": "..." } }
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
**On exit:**
|
|
606
|
+
```json
|
|
607
|
+
{ "skill": "<this-skill-name>", "outcome": "<completed|failed|skipped>", "changesProduced": ["<seq-numbers>"], "toolCallsProduced": ["<seq-numbers>"], "nextRecommended": "<from-handoff-section>" }
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
All MCP tool calls made during execution should include `"skill": "<this-skill-name>"` in their tracking record for attribution. The `arguments` object should capture the key parameters actually passed (profile, retailer, entity type, etc.) — not a fixed schema. The `nextRecommended` value comes from the Handoff section below.
|
|
611
|
+
|
|
612
|
+
## Handoff
|
|
613
|
+
|
|
614
|
+
| Output Artifact | Consumed By | Path |
|
|
615
|
+
|----------------|-------------|------|
|
|
616
|
+
| Workflow JSON file | `/fluent-workflow-analyzer` (validation) | `accounts/<PROFILE>/workflows/<RETAILER_REF>/<ENTITY_TYPE>__<SUBTYPE>.json` |
|
|
617
|
+
| Workflow JSON file | `/fluent-workflow-deploy` (deployment) | `accounts/<PROFILE>/workflows/<RETAILER_REF>/<ENTITY_TYPE>__<SUBTYPE>.json` |
|
|
618
|
+
| Workflow JSON file | `/fluent-pre-deploy-check` (gate check) | `accounts/<PROFILE>/workflows/<RETAILER_REF>/<ENTITY_TYPE>__<SUBTYPE>.json` |
|
|
619
|
+
|
|
620
|
+
## Error Reporting
|
|
621
|
+
|
|
622
|
+
Errors from this skill follow the standard format:
|
|
623
|
+
|
|
624
|
+
| Field | Description |
|
|
625
|
+
|-------|-------------|
|
|
626
|
+
| `phase` | Skill phase where error occurred (e.g., `pre-flight`, `design`, `generation`, `validation`) |
|
|
627
|
+
| `severity` | `CRITICAL` (blocks downstream), `HIGH` (needs fix), `MEDIUM` (advisory), `LOW` (informational) |
|
|
628
|
+
| `message` | Human-readable error description |
|
|
629
|
+
| `resolution` | Suggested fix or downstream skill to invoke |
|
|
630
|
+
|
|
631
|
+
## Validation Checklist
|
|
632
|
+
|
|
633
|
+
Run through this before uploading any workflow:
|
|
634
|
+
|
|
635
|
+
1. **JSON syntax** — Valid JSON (no trailing commas, correct brackets)
|
|
636
|
+
2. **Required fields** — `retailerId`, `version`, `entityType`, `entitySubtype`, `name`, `rulesets`
|
|
637
|
+
3. **Status coverage** — Every SetState target exists in `statuses`
|
|
638
|
+
4. **Event coverage** — Every SendEvent target has a matching ruleset (or is expected inbound)
|
|
639
|
+
5. **Trigger consistency** — Only one ruleset per status trigger (avoid conflicts)
|
|
640
|
+
6. **Rule naming** — `<ACCOUNT>.<MODULE>.<RuleName>` format, all referenced rules exist in platform
|
|
641
|
+
7. **Gate logic** — Gate statuses include all terminal states for child entities
|
|
642
|
+
8. **Version bump** — Version is higher than currently deployed version
|
|
643
|
+
9. **Description** — `versionComment` describes what changed
|
|
644
|
+
|
|
645
|
+
## Post-Execution: Feedback Capture
|
|
646
|
+
|
|
647
|
+
After completing this skill (whether success or failure), write a feedback record:
|
|
648
|
+
|
|
649
|
+
1. **Classify outcome:** `SUCCESS` (clean build), `PARTIAL_SUCCESS` (built after fixing issues), `FAILURE` (could not complete), `BLOCKED` (prereq missing), `USER_CORRECTED` (user overrode approach)
|
|
650
|
+
2. **Build record:** Create a `feedback-record-v1` JSON object with:
|
|
651
|
+
- `skill`: `"fluent-workflow-builder"`
|
|
652
|
+
- `feature`: feature slug if working within a feature, null otherwise
|
|
653
|
+
- `entityType` / `entitySubtype`: from the workflow being built (e.g., `ORDER`, `HD`)
|
|
654
|
+
- `phases`: trace of each phase (pre-flight, plan, build-rulesets, build-statuses, validate, etc.) with PASS/FAIL/SKIP
|
|
655
|
+
- `learnings`: any gotchas discovered during execution
|
|
656
|
+
- `userCorrections`: any corrections the user provided
|
|
657
|
+
3. **Redact secrets:** Strip tokens, passwords, API keys. Keep business identifiers.
|
|
658
|
+
4. **Append** one JSON line to `accounts/<PROFILE>/feedback/fluent-workflow-builder.jsonl`
|
|
659
|
+
5. **Update** `accounts/<PROFILE>/feedback/index.json` counters (create file and directory with `mkdir -p` if missing)
|
|
660
|
+
|
|
661
|
+
**Skip capture if:** The execution was trivially simple (e.g., user just asked a question about workflows, no actual build/edit happened).
|
|
662
|
+
|
|
663
|
+
## Known Pitfalls
|
|
664
|
+
<!-- feedback-promoted: managed section, updated by feedback loop -->
|
|
665
|
+
|
|
666
|
+
_(No promoted learnings yet.)_
|
|
667
|
+
|
|
668
|
+
<!-- end feedback-promoted -->
|