@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.

Files changed (168) hide show
  1. package/README.md +866 -622
  2. package/bin/cli.mjs +2112 -1973
  3. package/content/cli/agents/fluent-cli/agent.json +149 -149
  4. package/content/cli/agents/fluent-cli.md +132 -132
  5. package/content/cli/skills/fluent-bootstrap/SKILL.md +214 -181
  6. package/content/cli/skills/fluent-cli-index/SKILL.md +1 -1
  7. package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +117 -1
  8. package/content/cli/skills/fluent-cli-reference/SKILL.md +1040 -1031
  9. package/content/cli/skills/fluent-cli-retailer/SKILL.md +27 -2
  10. package/content/cli/skills/fluent-cli-settings/SKILL.md +21 -1
  11. package/content/cli/skills/fluent-connect/SKILL.md +937 -886
  12. package/content/cli/skills/fluent-module-deploy/SKILL.md +63 -5
  13. package/content/cli/skills/fluent-profile/SKILL.md +73 -0
  14. package/content/cli/skills/fluent-workflow/SKILL.md +360 -310
  15. package/content/dev/agents/fluent-backend-dev/AGENT.md +58 -0
  16. package/content/dev/agents/fluent-backend-dev/agent.json +69 -0
  17. package/content/dev/agents/fluent-backend-dev.md +287 -0
  18. package/content/dev/agents/fluent-dev/AGENT.md +98 -0
  19. package/content/dev/agents/fluent-dev/agent.json +14 -2
  20. package/content/dev/agents/fluent-dev.md +194 -525
  21. package/content/dev/agents/fluent-frontend-dev/AGENT.md +63 -0
  22. package/content/dev/agents/fluent-frontend-dev/agent.json +52 -0
  23. package/content/dev/agents/fluent-frontend-dev.md +323 -0
  24. package/content/dev/skills/fluent-archive/SKILL.md +234 -0
  25. package/content/dev/skills/fluent-build/SKILL.md +312 -192
  26. package/content/dev/skills/fluent-connection-analysis/SKILL.md +422 -386
  27. package/content/dev/skills/fluent-custom-code/SKILL.md +15 -9
  28. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +19 -2
  29. package/content/dev/skills/fluent-e2e-test/SKILL.md +501 -394
  30. package/content/dev/skills/fluent-event-api/SKILL.md +962 -945
  31. package/content/dev/skills/fluent-feature-explain/SKILL.md +680 -603
  32. package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +27 -2
  33. package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -227
  34. package/content/dev/skills/fluent-feature-status/SKILL.md +335 -0
  35. package/content/dev/skills/fluent-feedback/SKILL.md +221 -0
  36. package/content/dev/skills/fluent-implementation-map/SKILL.md +644 -0
  37. package/content/dev/skills/fluent-job-batch/SKILL.md +10 -0
  38. package/content/dev/skills/fluent-module-scaffold/SKILL.md +64 -2
  39. package/content/dev/skills/fluent-module-validate/SKILL.md +778 -775
  40. package/content/dev/skills/fluent-mystique-analyze/SKILL.md +817 -0
  41. package/content/dev/skills/fluent-mystique-builder/COMPONENT_TEMPLATE.md +81 -0
  42. package/content/dev/skills/fluent-mystique-builder/README.md +63 -0
  43. package/content/dev/skills/fluent-mystique-builder/SKILL.md +1294 -0
  44. package/content/dev/skills/fluent-mystique-builder/components/INDEX.md +92 -0
  45. package/content/dev/skills/fluent-mystique-builder/components/fc.accordion.md +48 -0
  46. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.fulfilmentpack.md +20 -0
  47. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.multiparcel.md +21 -0
  48. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.returnitems.md +21 -0
  49. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.wavepick.md +21 -0
  50. package/content/dev/skills/fluent-mystique-builder/components/fc.action.inline.md +24 -0
  51. package/content/dev/skills/fluent-mystique-builder/components/fc.activity.entity.md +25 -0
  52. package/content/dev/skills/fluent-mystique-builder/components/fc.analytics.viz.md +20 -0
  53. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.column.md +111 -0
  54. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.json.md +20 -0
  55. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.jsoneditor.md +54 -0
  56. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.locationId.md +51 -0
  57. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.retailerId.md +52 -0
  58. package/content/dev/skills/fluent-mystique-builder/components/fc.button.bar.md +57 -0
  59. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.download.md +53 -0
  60. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.compatibility.md +60 -0
  61. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.md +53 -0
  62. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.md +24 -0
  63. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.pick.md +61 -0
  64. package/content/dev/skills/fluent-mystique-builder/components/fc.buttons.add.reject.md +20 -0
  65. package/content/dev/skills/fluent-mystique-builder/components/fc.card.attribute.md +73 -0
  66. package/content/dev/skills/fluent-mystique-builder/components/fc.card.attributes.grid.md +40 -0
  67. package/content/dev/skills/fluent-mystique-builder/components/fc.card.image.md +37 -0
  68. package/content/dev/skills/fluent-mystique-builder/components/fc.card.map.point.md +24 -0
  69. package/content/dev/skills/fluent-mystique-builder/components/fc.card.multi.md +79 -0
  70. package/content/dev/skills/fluent-mystique-builder/components/fc.card.product.md +27 -0
  71. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.md +34 -0
  72. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.wrapper.feed.md +98 -0
  73. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.md +52 -0
  74. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.wrapper.source.md +104 -0
  75. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.md +28 -0
  76. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.wrapper.threshold.md +118 -0
  77. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.line.md +32 -0
  78. package/content/dev/skills/fluent-mystique-builder/components/fc.conditional.md +62 -0
  79. package/content/dev/skills/fluent-mystique-builder/components/fc.dashboard.threshold.md +65 -0
  80. package/content/dev/skills/fluent-mystique-builder/components/fc.daterange.wrapper.forwarder.md +56 -0
  81. package/content/dev/skills/fluent-mystique-builder/components/fc.drawer.button.md +21 -0
  82. package/content/dev/skills/fluent-mystique-builder/components/fc.event.detail.md +20 -0
  83. package/content/dev/skills/fluent-mystique-builder/components/fc.events.search.md +21 -0
  84. package/content/dev/skills/fluent-mystique-builder/components/fc.field.daterange.md +83 -0
  85. package/content/dev/skills/fluent-mystique-builder/components/fc.field.filterComplex.md +106 -0
  86. package/content/dev/skills/fluent-mystique-builder/components/fc.field.intrange.md +82 -0
  87. package/content/dev/skills/fluent-mystique-builder/components/fc.field.multistring.md +50 -0
  88. package/content/dev/skills/fluent-mystique-builder/components/fc.filterPanel.md +53 -0
  89. package/content/dev/skills/fluent-mystique-builder/components/fc.json.editor.md +22 -0
  90. package/content/dev/skills/fluent-mystique-builder/components/fc.json.viewer.md +21 -0
  91. package/content/dev/skills/fluent-mystique-builder/components/fc.list.customAction.md +79 -0
  92. package/content/dev/skills/fluent-mystique-builder/components/fc.list.md +116 -0
  93. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.bppmetrics.md +69 -0
  94. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.feed.md +65 -0
  95. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.source.md +64 -0
  96. package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.addItem.md +60 -0
  97. package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.md +21 -0
  98. package/content/dev/skills/fluent-mystique-builder/components/fc.mutation.inline.md +88 -0
  99. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.attributes.md +83 -0
  100. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.text.md +33 -0
  101. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.link.md +30 -0
  102. package/content/dev/skills/fluent-mystique-builder/components/fc.order.itemDetails.md +20 -0
  103. package/content/dev/skills/fluent-mystique-builder/components/fc.order.shipmentDetails.md +20 -0
  104. package/content/dev/skills/fluent-mystique-builder/components/fc.page.filter.select.md +87 -0
  105. package/content/dev/skills/fluent-mystique-builder/components/fc.page.md +64 -0
  106. package/content/dev/skills/fluent-mystique-builder/components/fc.page.refresh.md +48 -0
  107. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.column.md +71 -0
  108. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.header.md +61 -0
  109. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.md +59 -0
  110. package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.md +45 -0
  111. package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.summary.md +56 -0
  112. package/content/dev/skills/fluent-mystique-builder/components/fc.progress.circular.md +20 -0
  113. package/content/dev/skills/fluent-mystique-builder/components/fc.provider.graphql.md +71 -0
  114. package/content/dev/skills/fluent-mystique-builder/components/fc.quantity.list.md +87 -0
  115. package/content/dev/skills/fluent-mystique-builder/components/fc.repeater.md +56 -0
  116. package/content/dev/skills/fluent-mystique-builder/components/fc.reports.ipuipc.md +54 -0
  117. package/content/dev/skills/fluent-mystique-builder/components/fc.return.rowExpansion.md +19 -0
  118. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcode.md +21 -0
  119. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcodeFilter.md +72 -0
  120. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.camera.md +20 -0
  121. package/content/dev/skills/fluent-mystique-builder/components/fc.settingForm.md +64 -0
  122. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.drawer.button.md +19 -0
  123. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.modal.button.md +64 -0
  124. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.strategy.modal.button.md +20 -0
  125. package/content/dev/skills/fluent-mystique-builder/components/fc.stepper.md +20 -0
  126. package/content/dev/skills/fluent-mystique-builder/components/fc.tab.content.md +56 -0
  127. package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.card.md +64 -0
  128. package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.md +69 -0
  129. package/content/dev/skills/fluent-mystique-builder/components/fc.tile.metric.md +73 -0
  130. package/content/dev/skills/fluent-mystique-builder/components/fc.workflow.provider.md +77 -0
  131. package/content/dev/skills/fluent-mystique-builder/validate-docs.ps1 +260 -0
  132. package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +1830 -0
  133. package/content/dev/skills/fluent-mystique-validate/SKILL.md +646 -0
  134. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1144 -1108
  135. package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1111
  136. package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
  137. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -385
  138. package/content/dev/skills/fluent-scope-decompose/SKILL.md +1123 -1021
  139. package/content/dev/skills/fluent-session-audit-export/SKILL.md +880 -632
  140. package/content/dev/skills/fluent-session-summary/SKILL.md +320 -195
  141. package/content/dev/skills/fluent-settings/SKILL.md +160 -1
  142. package/content/dev/skills/fluent-source-onboard/SKILL.md +31 -3
  143. package/content/dev/skills/fluent-sourcing/SKILL.md +1185 -0
  144. package/content/dev/skills/fluent-system-monitoring/SKILL.md +771 -767
  145. package/content/dev/skills/fluent-test-data/SKILL.md +514 -513
  146. package/content/dev/skills/fluent-trace/SKILL.md +1169 -1143
  147. package/content/dev/skills/fluent-transition-api/SKILL.md +364 -346
  148. package/content/dev/skills/fluent-use-case-discover/SKILL.md +593 -0
  149. package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +281 -0
  150. package/content/dev/skills/fluent-version-manage/SKILL.md +53 -2
  151. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
  152. package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -319
  153. package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -267
  154. package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
  155. package/content/mcp-extn/agents/fluent-mcp.md +133 -69
  156. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -461
  157. package/content/mcp-official/agents/fluent-mcp-core.md +91 -91
  158. package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -94
  159. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -172
  160. package/docs/CAPABILITY_MAP.md +106 -77
  161. package/docs/DEPLOYMENT_PROMOTION_RUNBOOK.md +218 -0
  162. package/docs/DESIGN-implementation-map.md +698 -0
  163. package/docs/DEV_WORKFLOW.md +814 -802
  164. package/docs/FLOW_RUN.md +142 -142
  165. package/docs/GETTING_STARTED.md +427 -0
  166. package/docs/USE_CASES.md +909 -52
  167. package/metadata.json +184 -156
  168. package/package.json +3 -2
@@ -1,310 +1,360 @@
1
- ---
2
- name: fluent-workflow
3
- description: Manage Fluent Commerce workflows - list, download, merge fragments, and track modifications. Use for workflow operations, exporting workflow JSON, merging customizations, or viewing workflow logs. Triggers on "list workflows", "download workflow", "merge workflow", "workflow fragment".
4
- user-invocable: true
5
- allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
- argument-hint: <operation> [workflow-name]
7
- ---
8
-
9
- # Workflow Management
10
-
11
- List, download, merge, and manage Fluent Commerce workflows.
12
-
13
- ## When to Use
14
-
15
- - Listing deployed workflows
16
- - Downloading/exporting workflow definitions
17
- - Merging workflow fragments
18
- - Tracking workflow modification history
19
- - Debugging workflow issues
20
-
21
- ## Operations
22
-
23
- ### 1. List Workflows
24
-
25
- ```bash
26
- fluent workflow list -p <profile-name> -r <retailer-ref>
27
- ```
28
-
29
- **Output:**
30
- ```
31
- TYPE SUBTYPE NAME VERSION
32
- ORDER HD ORDER::HD 1.0.0
33
- ORDER CC ORDER::CC 1.0.0
34
- INVENTORY_CATALOGUE DEFAULT INVENTORY_CATALOGUE::* 1.0.0
35
- ```
36
-
37
- ### 2. Download Workflows
38
-
39
- **Recommended convention:** Store workflows under `accounts/<PROFILE>/workflows/<RETAILER_REF>/` to scope them by retailer. Workflows are retailer-specific in Fluent Commerce — a profile can serve multiple retailers, so scoping prevents mixing workflows from different retailers.
40
-
41
- **Single workflow:**
42
- ```bash
43
- mkdir -p accounts/<PROFILE>/workflows/<RETAILER_REF>
44
- fluent workflow download \
45
- -p <profile-name> \
46
- -r <retailer-ref> \
47
- -w <workflow-name> \
48
- -o accounts/<PROFILE>/workflows/<RETAILER_REF>/
49
- ```
50
-
51
- ```powershell
52
- # PowerShell
53
- New-Item -ItemType Directory -Force -Path "accounts\<PROFILE>\workflows\<RETAILER_REF>"
54
- fluent workflow download -p <profile-name> -r <retailer-ref> -w <workflow-name> -o "accounts\<PROFILE>\workflows\<RETAILER_REF>\"
55
- ```
56
-
57
- **All workflows (recommended for initial setup):**
58
- ```bash
59
- mkdir -p accounts/<PROFILE>/workflows/<RETAILER_REF>
60
- fluent workflow download \
61
- -p <profile-name> \
62
- -r <retailer-ref> \
63
- -w all \
64
- -o accounts/<PROFILE>/workflows/<RETAILER_REF>/
65
- ```
66
-
67
- **Example:**
68
- ```bash
69
- fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w all -o accounts/YOUR_PROFILE/workflows/YOUR_RETAILER_REF/
70
- fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w ORDER::HD -o accounts/YOUR_PROFILE/workflows/YOUR_RETAILER_REF/
71
- ```
72
-
73
- Write/update workflow context in the same folder:
74
-
75
- `accounts/<PROFILE>/workflows/<RETAILER_REF>/workflow-context.json`
76
-
77
- ```json
78
- {
79
- "profile": "<PROFILE>",
80
- "retailerRef": "<RETAILER_REF>",
81
- "downloadedAt": "<ISO-8601>"
82
- }
83
- ```
84
-
85
- Before merge/upload, verify your CLI target (`-p`, `-r`) matches this context.
86
-
87
- **Resolving workflow path:** When reading workflows, check in this order:
88
- 1. `accounts/<PROFILE>/workflows/<RETAILER_REF>/` — retailer-scoped (preferred)
89
- 2. `accounts/<PROFILE>/workflows/` legacy flat layout (fallback if `*.json` files exist directly here)
90
-
91
- ### 3. Merge Workflow Fragment
92
-
93
- Apply customizations to a base workflow:
94
-
95
- ```bash
96
- fluent workflow merge \
97
- <fragment-file> \
98
- <workflow-name> \
99
- -p <profile-name> \
100
- -r <retailer-ref>
101
- ```
102
-
103
- **Example:**
104
- ```bash
105
- fluent workflow merge \
106
- ./fragments/order-hd-validation.json \
107
- ORDER::HD \
108
- -p cli-b2c \
109
- -r b2c
110
- ```
111
-
112
- **Output:** `<workflow-name>.merged.json`
113
-
114
- **Fragment structure:**
115
- ```json
116
- {
117
- "name": "my-fragment",
118
- "description": "Add custom validation",
119
- "rulesets": [...],
120
- "states": [...]
121
- }
122
- ```
123
-
124
- ### 4. Workflow Log Management
125
-
126
- Track workflow modification history:
127
-
128
- **List workflow logs:**
129
- ```bash
130
- fluent workflowlog list -p <profile-name> -r <retailer-ref>
131
- ```
132
-
133
- **Describe log (see applied fragments):**
134
- ```bash
135
- fluent workflowlog describe <workflow-name> -p <profile-name> -r <retailer-ref>
136
- ```
137
-
138
- **Output:**
139
- ```
140
- POSITION MODULE NAME ASSET NAME RULESET COUNT
141
- 0 fluent/order fc-workflow-order-hd.json 25
142
- 1 my-extensions order-hd-validation.json 3
143
- ```
144
-
145
- **Insert fragment at position:**
146
- ```bash
147
- fluent workflowlog insert <workflow-path> <module-name> <position> \
148
- -p <profile-name> -r <retailer-ref>
149
- ```
150
-
151
- **Delete fragment from log:**
152
- ```bash
153
- fluent workflowlog delete <workflow-name> <position> \
154
- -p <profile-name> -r <retailer-ref>
155
- ```
156
-
157
- ## Common Workflows
158
-
159
- | Workflow | Purpose |
160
- |----------|---------|
161
- | `ORDER::HD` | Home delivery orders |
162
- | `ORDER::CC` | Click & collect orders |
163
- | `INVENTORY_CATALOGUE::*` | Inventory management |
164
- | `PRODUCT_CATALOGUE::*` | Product management |
165
- | `VIRTUAL_CATALOGUE::*` | Virtual catalogue |
166
- | `FULFILMENT::*` | Fulfilment processing |
167
- | `LOCATION::STORE` | Store locations |
168
- | `LOCATION::DC` | Distribution centers |
169
-
170
- ### 5. Upload Workflow via REST API
171
-
172
- When `fluent workflow merge` fails to upload (known bug), or when uploading a manually edited workflow:
173
-
174
- > **Cross-platform note:** The curl examples below use bash syntax and require bash, Git Bash, or WSL on Windows. The Fluent CLI and MCP tools (e.g., `graphql.query`) are the recommended cross-platform approach.
175
-
176
- ```bash
177
- # Authenticate (use retailer-scoped credentials, not account-level)
178
- # IMPORTANT: Use $FLUENT_USERNAME, not $USER — $USER resolves to the OS login name on Unix/macOS.
179
- TOKEN=$(curl -s -X POST "$BASE_URL/oauth/token" \
180
- -H "Content-Type: application/x-www-form-urlencoded" \
181
- -d "username=$FLUENT_USERNAME&password=$PASS&client_id=$ACCOUNT&client_secret=$SECRET&grant_type=password&scope=api" \
182
- | python -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
183
-
184
- # Upload workflow
185
- curl -s -X PUT "$BASE_URL/api/v4.1/workflow" \
186
- -H "Content-Type: application/json" \
187
- -H "Authorization: Bearer $TOKEN" \
188
- -H "fluent.account: $ACCOUNT" \
189
- -d @my-workflow.json
190
- ```
191
-
192
- ```powershell
193
- # PowerShell — Authenticate
194
- # Use $FLUENT_USERNAME, not $USER (which resolves to OS login name)
195
- $body = @{
196
- username = $FLUENT_USERNAME; password = $PASS; client_id = $ACCOUNT
197
- client_secret = $SECRET; grant_type = "password"; scope = "api"
198
- }
199
- $response = Invoke-RestMethod -Uri "$BASE_URL/oauth/token" -Method Post -Body $body -ContentType "application/x-www-form-urlencoded"
200
- $TOKEN = $response.access_token
201
-
202
- # Upload workflow
203
- $headers = @{ "Authorization" = "Bearer $TOKEN"; "fluent.account" = $ACCOUNT }
204
- $workflow = Get-Content "my-workflow.json" -Raw
205
- Invoke-RestMethod -Uri "$BASE_URL/api/v4.1/workflow" -Method Put -Headers $headers -Body $workflow -ContentType "application/json"
206
- ```
207
-
208
- The REST workflow API requires a **retailer-scoped token** (not account-level).
209
-
210
- ### 6. End-to-End Behavior Analysis (Workflow + Rules)
211
-
212
- When asked "what does this workflow do end-to-end?", do this in sequence:
213
-
214
- 1. Map triggers, statuses, and transitions from workflow JSON.
215
- 2. Map each ruleset rule to its implementing class (`<ACCOUNT>.<MODULE>.<RuleName>`).
216
- 3. Confirm runtime behavior against event history (`event.list` / `event.get`) and live entity state.
217
-
218
- If ruleset descriptions or rule names are too vague to infer intent confidently:
219
-
220
- 1. Ask for `module.json` and Java source for the mapped rule classes.
221
- 2. If source is unavailable, ask for module ZIP/JAR and decompile candidate classes.
222
- 3. Reconcile decompiled behavior with workflow props and observed event outcomes.
223
- 4. Mark confirmed behavior vs inferred behavior explicitly in the final analysis.
224
-
225
- Use `/fluent-trace` for the runtime correlation and root-cause decision tree.
226
-
227
- ## Workflow Entity Types
228
-
229
- | Entity Type | Workflow Naming | Example |
230
- |-------------|-----------------|---------|
231
- | `ORDER` | `ORDER::<subtype>` | `ORDER::HD`, `ORDER::CC`, `ORDER::MULTI` |
232
- | `FULFILMENT` | `FULFILMENT::<subtype>` | `FULFILMENT::HD_WH`, `FULFILMENT::CC_PFS` |
233
- | `RETURN_ORDER` | `RETURN_ORDER::<subtype>` | `RETURN_ORDER::DEFAULT` |
234
- | `LOCATION` | `LOCATION::<type>` | `LOCATION::STORE`, `LOCATION::DC` |
235
- | `PRODUCT_CATALOGUE` | `PRODUCT_CATALOGUE::*` | `PRODUCT_CATALOGUE::DEFAULT` |
236
- | `INVENTORY_CATALOGUE` | `INVENTORY_CATALOGUE::*` | `INVENTORY_CATALOGUE::DEFAULT` |
237
- | `VIRTUAL_CATALOGUE` | `VIRTUAL_CATALOGUE::*` | `VIRTUAL_CATALOGUE::DEFAULT` |
238
-
239
- Note: `RETURN_ORDER` uses an underscore in the workflow entity type (`RETURN_ORDER::<type>`), but the GraphQL type is `ReturnOrder` (no underscore, camelCase).
240
-
241
- ## Known Issues and Workarounds
242
-
243
- ### Windows `::` Filename Issue
244
-
245
- Fluent workflow names contain `::` (e.g., `ORDER::MULTI`). Windows disallows `:` in filenames, so `fluent workflow download` with a specific workflow name target fails on Windows.
246
-
247
- **Preferred: MCP-based download (cross-platform):**
248
-
249
- Use MCP tools to download workflows without writing `::` filenames:
250
-
251
- ```
252
- 1. workflow.list(profile, retailer) get all workflow names
253
- 2. For each name:
254
- a. workflow.download(profile, retailer, workflow: "<NAME>") JSON in response
255
- b. Sanitize filename: replace :: with __ (ORDER::HD → ORDER__HD.json)
256
- c. Save via Write tool to accounts/<PROFILE>/workflows/<RETAILER_REF>/<SAFE_NAME>.json
257
- 3. Write workflow-file-map.json: { "ORDER::HD": "ORDER__HD.json", ... }
258
- ```
259
-
260
- This works identically on Windows, macOS, and Linux.
261
-
262
- **CLI workaround (if MCP not available):**
263
-
264
- On Windows, both `-w <name>` and `-w all` fail because the CLI writes `ORDER::HD.json` which contains the reserved `:` character. Use `--json` to pipe to stdout instead:
265
-
266
- ```bash
267
- fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w all --json > accounts/<PROFILE>/workflows/<RETAILER_REF>/workflows-raw.json
268
- ```
269
-
270
- Then split the JSON array into one file per workflow with sanitized names (replace `::` with `__`) and persist `workflow-file-map.json` with original name to filename mapping.
271
-
272
- On macOS/Linux, `-w all -o <dir>` works directly since `:` is allowed in filenames.
273
- - When using `fluent workflow merge`, pass a **local file path** (not a workflow name) as the merge target:
274
-
275
- ```bash
276
- # Works on Windows — local file path avoids :: in filename
277
- fluent workflow merge fragment.json accounts/<PROFILE>/workflows/<RETAILER_REF>/ORDER__MULTI.json \
278
- -p YOUR_PROFILE -r YOUR_RETAILER_REF
279
- ```
280
-
281
- ### `workflow merge` Upload Auth Bug
282
-
283
- `fluent workflow merge` merges locally but fails to upload with `token:undefined`. The CLI doesn't authenticate before the upload REST call.
284
-
285
- **Workaround:** After merge completes locally, upload the merged file manually via REST API (see "Upload Workflow via REST API" above). The merged output file is named `<input-file>.merged.json`.
286
-
287
- ## Error Handling
288
-
289
- | Error | Solution |
290
- |-------|----------|
291
- | No workflows found | Install modules containing workflows |
292
- | Workflow not found | Check name spelling with `workflow list` |
293
- | Merge conflict | Rename ruleset in fragment or use update mode |
294
- | Invalid fragment JSON | Validate JSON syntax |
295
- | `token:undefined` on merge upload | Use REST API upload workaround (see above) |
296
- | `:` in filename (Windows) | Prefer MCP download (returns JSON, no file issue); or CLI `-w all`, or `--json` + filename normalization + `workflow-file-map.json`; use file paths for merge |
297
- | Workflow upload rejected (403) | Use retailer-scoped token, not account-level |
298
-
299
- ## Best Practices
300
-
301
- 1. **Scope workflows by retailer** — Store in `accounts/<PROFILE>/workflows/<RETAILER_REF>/` to avoid mixing retailers
302
- 2. **Download workflows before merging** — Keep backups
303
- 3. **Test fragments in dev** — Before applying to production
304
- 4. **Use workflow logs** — Track modification history
305
- 5. **Document fragment purpose** — In fragment description field
306
- 6. **Validate merged workflows** — Review before deployment
307
- 7. **Keep fragments in version control** — For reusability
308
- 8. **Bump `version` and `versionComment`** — In workflow JSON on every edit
309
- 9. **Use REST API upload** — When CLI merge upload fails
310
- 10. **Use retailer-scoped tokens** Account-level tokens lack workflow API access
1
+ ---
2
+ name: fluent-workflow
3
+ description: Manage Fluent Commerce workflows - list, download, merge fragments, and track modifications. Use for workflow operations, exporting workflow JSON, merging customizations, or viewing workflow logs. Triggers on "list workflows", "download workflow", "merge workflow", "workflow fragment".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ argument-hint: <operation> [workflow-name]
7
+ ---
8
+
9
+ # Workflow Management
10
+
11
+ List, download, merge, and manage Fluent Commerce workflows.
12
+
13
+ > **New to Fluent CLI?** Start with `/fluent-cli-index` for a complete command reference and routing guide.
14
+
15
+ ## When to Use
16
+
17
+ - Listing deployed workflows
18
+ - Downloading/exporting workflow definitions
19
+ - Merging workflow fragments
20
+ - Tracking workflow modification history
21
+ - Debugging workflow issues
22
+
23
+ ## Operations
24
+
25
+ ### 1. List Workflows
26
+
27
+ ```bash
28
+ fluent workflow list -p <profile-name> -r <retailer-ref>
29
+ ```
30
+
31
+ **Output:**
32
+ ```
33
+ TYPE SUBTYPE NAME VERSION
34
+ ORDER HD ORDER::HD 1.0.0
35
+ ORDER CC ORDER::CC 1.0.0
36
+ INVENTORY_CATALOGUE DEFAULT INVENTORY_CATALOGUE::* 1.0.0
37
+ ```
38
+
39
+ ### 2. Download Workflows
40
+
41
+ **Recommended convention:** Store workflows under `accounts/<PROFILE>/workflows/<RETAILER_REF>/` to scope them by retailer. Workflows are retailer-specific in Fluent Commerce — a profile can serve multiple retailers, so scoping prevents mixing workflows from different retailers.
42
+
43
+ **Single workflow:**
44
+ ```bash
45
+ mkdir -p accounts/<PROFILE>/workflows/<RETAILER_REF>
46
+ fluent workflow download \
47
+ -p <profile-name> \
48
+ -r <retailer-ref> \
49
+ -w <workflow-name> \
50
+ -o accounts/<PROFILE>/workflows/<RETAILER_REF>/
51
+ ```
52
+
53
+ ```powershell
54
+ # PowerShell
55
+ New-Item -ItemType Directory -Force -Path "accounts\<PROFILE>\workflows\<RETAILER_REF>"
56
+ fluent workflow download -p <profile-name> -r <retailer-ref> -w <workflow-name> -o "accounts\<PROFILE>\workflows\<RETAILER_REF>\"
57
+ ```
58
+
59
+ **All workflows (recommended for initial setup):**
60
+ ```bash
61
+ mkdir -p accounts/<PROFILE>/workflows/<RETAILER_REF>
62
+ fluent workflow download \
63
+ -p <profile-name> \
64
+ -r <retailer-ref> \
65
+ -w all \
66
+ -o accounts/<PROFILE>/workflows/<RETAILER_REF>/
67
+ ```
68
+
69
+ **Example:**
70
+ ```bash
71
+ fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w all -o accounts/YOUR_PROFILE/workflows/YOUR_RETAILER_REF/
72
+ fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w ORDER::HD -o accounts/YOUR_PROFILE/workflows/YOUR_RETAILER_REF/
73
+ ```
74
+
75
+ Write/update workflow context in the same folder:
76
+
77
+ `accounts/<PROFILE>/workflows/<RETAILER_REF>/workflow-context.json`
78
+
79
+ ```json
80
+ {
81
+ "profile": "<PROFILE>",
82
+ "retailerRef": "<RETAILER_REF>",
83
+ "downloadedAt": "<ISO-8601>"
84
+ }
85
+ ```
86
+
87
+ **Ownership:** `workflow-context.json` is created by `/fluent-connect` during workspace setup, or manually by the user when downloading workflows via `/fluent-workflow`. Any skill that downloads or re-downloads workflows should update this file. Skills that read workflows (e.g., `/fluent-workflow-analyzer`, `/fluent-workflow-builder`) should verify the context matches the active profile/retailer before proceeding.
88
+
89
+ Before merge/upload, verify your CLI target (`-p`, `-r`) matches this context.
90
+
91
+ **Resolving workflow path:** Read workflows from `accounts/<PROFILE>/workflows/<RETAILER_REF>/` only.
92
+
93
+ ### Windows Filename Handling
94
+
95
+ Fluent workflow names use `::` as separator (e.g., `ORDER::HD`), but Windows does not allow `:` in filenames. The CLI automatically replaces `::` with `__` when saving (e.g., `ORDER__HD.json`).
96
+
97
+ Skills that read workflows should check for `workflow-file-map.json` to resolve the original workflow name from the filename.
98
+
99
+ ### Auto-Generate Workflow File Map
100
+
101
+ After every workflow download (single or batch, CLI or MCP), automatically generate `workflow-file-map.json` in the target directory. This maps original workflow names (containing `::`) to sanitized filenames (using `__`):
102
+
103
+ ```bash
104
+ # Generate workflow-file-map.json from downloaded files
105
+ cd accounts/<PROFILE>/workflows/<RETAILER_REF>/
106
+ node -e "
107
+ const fs = require('fs');
108
+ const files = fs.readdirSync('.').filter(f => f.endsWith('.json') && f !== 'workflow-context.json' && f !== 'workflow-file-map.json');
109
+ const map = {};
110
+ for (const f of files) {
111
+ const original = f.replace('.json', '').replace(/__/g, '::');
112
+ map[original] = f;
113
+ }
114
+ fs.writeFileSync('workflow-file-map.json', JSON.stringify(map, null, 2));
115
+ console.log('Generated workflow-file-map.json with ' + Object.keys(map).length + ' entries');
116
+ "
117
+ ```
118
+
119
+ **Result:**
120
+ ```json
121
+ {
122
+ "ORDER::HD": "ORDER__HD.json",
123
+ "FULFILMENT::CC": "FULFILMENT__CC.json"
124
+ }
125
+ ```
126
+
127
+ This enables downstream skills to resolve `ORDER::HD` to `ORDER__HD.json` without manual tracking. The map is regenerated on each download. Always generate the map even on macOS/Linux for cross-platform portability.
128
+
129
+ ### 3. Merge Workflow Fragment
130
+
131
+ Apply customizations to a base workflow:
132
+
133
+ ```bash
134
+ fluent workflow merge \
135
+ <fragment-file> \
136
+ <workflow-name> \
137
+ -p <profile-name> \
138
+ -r <retailer-ref>
139
+ ```
140
+
141
+ **Example:**
142
+ ```bash
143
+ fluent workflow merge \
144
+ ./fragments/order-hd-validation.json \
145
+ ORDER::HD \
146
+ -p cli-b2c \
147
+ -r b2c
148
+ ```
149
+
150
+ **Output:** `<workflow-name>.merged.json`
151
+
152
+ **Fragment structure:**
153
+ ```json
154
+ {
155
+ "name": "my-fragment",
156
+ "description": "Add custom validation",
157
+ "rulesets": [...],
158
+ "states": [...]
159
+ }
160
+ ```
161
+
162
+ ### 4. Workflow Log Management
163
+
164
+ Track workflow modification history:
165
+
166
+ **List workflow logs:**
167
+ ```bash
168
+ fluent workflowlog list -p <profile-name> -r <retailer-ref>
169
+ ```
170
+
171
+ **Describe log (see applied fragments):**
172
+ ```bash
173
+ fluent workflowlog describe <workflow-name> -p <profile-name> -r <retailer-ref>
174
+ ```
175
+
176
+ **Output:**
177
+ ```
178
+ POSITION MODULE NAME ASSET NAME RULESET COUNT
179
+ 0 fluent/order fc-workflow-order-hd.json 25
180
+ 1 my-extensions order-hd-validation.json 3
181
+ ```
182
+
183
+ **Insert fragment at position:**
184
+ ```bash
185
+ fluent workflowlog insert <workflow-path> <module-name> <position> \
186
+ -p <profile-name> -r <retailer-ref>
187
+ ```
188
+
189
+ **Delete fragment from log:**
190
+ ```bash
191
+ fluent workflowlog delete <workflow-name> <position> \
192
+ -p <profile-name> -r <retailer-ref>
193
+ ```
194
+
195
+ ## Common Workflows
196
+
197
+ | Workflow | Purpose |
198
+ |----------|---------|
199
+ | `ORDER::HD` | Home delivery orders |
200
+ | `ORDER::CC` | Click & collect orders |
201
+ | `INVENTORY_CATALOGUE::*` | Inventory management |
202
+ | `PRODUCT_CATALOGUE::*` | Product management |
203
+ | `VIRTUAL_CATALOGUE::*` | Virtual catalogue |
204
+ | `FULFILMENT::*` | Fulfilment processing |
205
+ | `LOCATION::STORE` | Store locations |
206
+ | `LOCATION::DC` | Distribution centers |
207
+
208
+ ### 5. Upload Workflow via REST API
209
+
210
+ When `fluent workflow merge` fails to upload (known bug), or when uploading a manually edited workflow:
211
+
212
+ > **Cross-platform note:** The curl examples below use bash syntax and require bash, Git Bash, or WSL on Windows. The Fluent CLI and MCP tools (e.g., `graphql.query`) are the recommended cross-platform approach.
213
+
214
+ ```bash
215
+ # Authenticate (use retailer-scoped credentials, not account-level)
216
+ # IMPORTANT: Use $FLUENT_USERNAME, not $USER $USER resolves to the OS login name on Unix/macOS.
217
+ TOKEN=$(curl -s -X POST "$BASE_URL/oauth/token" \
218
+ -H "Content-Type: application/x-www-form-urlencoded" \
219
+ -d "username=$FLUENT_USERNAME&password=$PASS&client_id=$ACCOUNT&client_secret=$SECRET&grant_type=password&scope=api" \
220
+ | python -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
221
+
222
+ # Upload workflow
223
+ curl -s -X PUT "$BASE_URL/api/v4.1/workflow" \
224
+ -H "Content-Type: application/json" \
225
+ -H "Authorization: Bearer $TOKEN" \
226
+ -H "fluent.account: $ACCOUNT" \
227
+ -d @my-workflow.json
228
+ ```
229
+
230
+ ```powershell
231
+ # PowerShell Authenticate
232
+ # Use $FLUENT_USERNAME, not $USER (which resolves to OS login name)
233
+ $body = @{
234
+ username = $FLUENT_USERNAME; password = $PASS; client_id = $ACCOUNT
235
+ client_secret = $SECRET; grant_type = "password"; scope = "api"
236
+ }
237
+ $response = Invoke-RestMethod -Uri "$BASE_URL/oauth/token" -Method Post -Body $body -ContentType "application/x-www-form-urlencoded"
238
+ $TOKEN = $response.access_token
239
+
240
+ # Upload workflow
241
+ $headers = @{ "Authorization" = "Bearer $TOKEN"; "fluent.account" = $ACCOUNT }
242
+ $workflow = Get-Content "my-workflow.json" -Raw
243
+ Invoke-RestMethod -Uri "$BASE_URL/api/v4.1/workflow" -Method Put -Headers $headers -Body $workflow -ContentType "application/json"
244
+ ```
245
+
246
+ The REST workflow API requires a **retailer-scoped token** (not account-level).
247
+
248
+ ### 6. End-to-End Behavior Analysis (Workflow + Rules)
249
+
250
+ When asked "what does this workflow do end-to-end?", do this in sequence:
251
+
252
+ 1. Map triggers, statuses, and transitions from workflow JSON.
253
+ 2. Map each ruleset rule to its implementing class (`<ACCOUNT>.<MODULE>.<RuleName>`).
254
+ 3. Confirm runtime behavior against event history (`event.list` / `event.get`) and live entity state.
255
+
256
+ If ruleset descriptions or rule names are too vague to infer intent confidently:
257
+
258
+ 1. Ask for `module.json` and Java source for the mapped rule classes.
259
+ 2. If source is unavailable, ask for module ZIP/JAR and decompile candidate classes.
260
+ 3. Reconcile decompiled behavior with workflow props and observed event outcomes.
261
+ 4. Mark confirmed behavior vs inferred behavior explicitly in the final analysis.
262
+
263
+ Use `/fluent-trace` for the runtime correlation and root-cause decision tree.
264
+
265
+ ## Workflow Entity Types
266
+
267
+ | Entity Type | Workflow Naming | Example |
268
+ |-------------|-----------------|---------|
269
+ | `ORDER` | `ORDER::<subtype>` | `ORDER::HD`, `ORDER::CC`, `ORDER::MULTI` |
270
+ | `FULFILMENT` | `FULFILMENT::<subtype>` | `FULFILMENT::HD_WH`, `FULFILMENT::CC_PFS` |
271
+ | `RETURN_ORDER` | `RETURN_ORDER::<subtype>` | `RETURN_ORDER::DEFAULT` |
272
+ | `LOCATION` | `LOCATION::<type>` | `LOCATION::STORE`, `LOCATION::DC` |
273
+ | `PRODUCT_CATALOGUE` | `PRODUCT_CATALOGUE::*` | `PRODUCT_CATALOGUE::DEFAULT` |
274
+ | `INVENTORY_CATALOGUE` | `INVENTORY_CATALOGUE::*` | `INVENTORY_CATALOGUE::DEFAULT` |
275
+ | `VIRTUAL_CATALOGUE` | `VIRTUAL_CATALOGUE::*` | `VIRTUAL_CATALOGUE::DEFAULT` |
276
+
277
+ Note: `RETURN_ORDER` uses an underscore in the workflow entity type (`RETURN_ORDER::<type>`), but the GraphQL type is `ReturnOrder` (no underscore, camelCase).
278
+
279
+ ## Known Issues and Workarounds
280
+
281
+ ### Windows `::` Filename Issue
282
+
283
+ Fluent workflow names contain `::` (e.g., `ORDER::MULTI`). Windows disallows `:` in filenames, so `fluent workflow download` with a specific workflow name target fails on Windows.
284
+
285
+ **Preferred: MCP-based download (cross-platform):**
286
+
287
+ Use MCP tools to download workflows without writing `::` filenames:
288
+
289
+ ```
290
+ 1. workflow.list(profile, retailer) → get all workflow names
291
+ 2. For each name:
292
+ a. workflow.download(profile, retailer, workflow: "<NAME>") JSON in response
293
+ b. Sanitize filename: replace :: with __ (ORDER::HD ORDER__HD.json)
294
+ c. Save via Write tool to accounts/<PROFILE>/workflows/<RETAILER_REF>/<SAFE_NAME>.json
295
+ 3. Write workflow-file-map.json: { "ORDER::HD": "ORDER__HD.json", ... }
296
+ ```
297
+
298
+ This works identically on Windows, macOS, and Linux.
299
+
300
+ **Auto-generate `workflow-file-map.json`:** After downloading workflows (by any method), always write `workflow-file-map.json` to the workflow directory. This file maps Fluent workflow names (with `::`) to sanitized filenames (with `__`), enabling other skills to resolve workflow names to local files cross-platform:
301
+
302
+ ```json
303
+ {
304
+ "ORDER::HD": "ORDER__HD.json",
305
+ "ORDER::CC": "ORDER__CC.json",
306
+ "FULFILMENT::HD_WH": "FULFILMENT__HD_WH.json"
307
+ }
308
+ ```
309
+
310
+ If downloading on macOS/Linux where `::` filenames are valid, still write the map for portability.
311
+
312
+ **CLI workaround (if MCP not available):**
313
+
314
+ On Windows, both `-w <name>` and `-w all` fail because the CLI writes `ORDER::HD.json` which contains the reserved `:` character. Use `--json` to pipe to stdout instead:
315
+
316
+ ```bash
317
+ fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER_REF -w all --json > accounts/<PROFILE>/workflows/<RETAILER_REF>/workflows-raw.json
318
+ ```
319
+
320
+ Then split the JSON array into one file per workflow with sanitized names (replace `::` with `__`) and persist `workflow-file-map.json` with original name to filename mapping.
321
+
322
+ On macOS/Linux, `-w all -o <dir>` works directly since `:` is allowed in filenames.
323
+ - When using `fluent workflow merge`, pass a **local file path** (not a workflow name) as the merge target:
324
+
325
+ ```bash
326
+ # Works on Windows — local file path avoids :: in filename
327
+ fluent workflow merge fragment.json accounts/<PROFILE>/workflows/<RETAILER_REF>/ORDER__MULTI.json \
328
+ -p YOUR_PROFILE -r YOUR_RETAILER_REF
329
+ ```
330
+
331
+ ### `workflow merge` Upload Auth Bug
332
+
333
+ `fluent workflow merge` merges locally but fails to upload with `token:undefined`. The CLI doesn't authenticate before the upload REST call.
334
+
335
+ **Workaround:** After merge completes locally, upload the merged file manually via REST API (see "Upload Workflow via REST API" above). The merged output file is named `<input-file>.merged.json`.
336
+
337
+ ## Error Handling
338
+
339
+ | Error | Solution |
340
+ |-------|----------|
341
+ | No workflows found | Install modules containing workflows |
342
+ | Workflow not found | Check name spelling with `workflow list` |
343
+ | Merge conflict | Rename ruleset in fragment or use update mode |
344
+ | Invalid fragment JSON | Validate JSON syntax |
345
+ | `token:undefined` on merge upload | Use REST API upload workaround (see above) |
346
+ | `:` in filename (Windows) | Prefer MCP download (returns JSON, no file issue); or CLI `-w all`, or `--json` + filename normalization + `workflow-file-map.json`; use file paths for merge |
347
+ | Workflow upload rejected (403) | Use retailer-scoped token, not account-level |
348
+
349
+ ## Best Practices
350
+
351
+ 1. **Scope workflows by retailer** — Store in `accounts/<PROFILE>/workflows/<RETAILER_REF>/` to avoid mixing retailers
352
+ 2. **Download workflows before merging** — Keep backups
353
+ 3. **Test fragments in dev** — Before applying to production
354
+ 4. **Use workflow logs** — Track modification history
355
+ 5. **Document fragment purpose** — In fragment description field
356
+ 6. **Validate merged workflows** — Review before deployment
357
+ 7. **Keep fragments in version control** — For reusability
358
+ 8. **Bump `version` and `versionComment`** — In workflow JSON on every edit
359
+ 9. **Use REST API upload** — When CLI merge upload fails
360
+ 10. **Use retailer-scoped tokens** — Account-level tokens lack workflow API access