@fluentcommerce/ai-skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +622 -0
  3. package/bin/cli.mjs +1973 -0
  4. package/content/cli/agents/fluent-cli/agent.json +149 -0
  5. package/content/cli/agents/fluent-cli.md +132 -0
  6. package/content/cli/skills/fluent-bootstrap/SKILL.md +181 -0
  7. package/content/cli/skills/fluent-cli-index/SKILL.md +63 -0
  8. package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +77 -0
  9. package/content/cli/skills/fluent-cli-reference/SKILL.md +1031 -0
  10. package/content/cli/skills/fluent-cli-retailer/SKILL.md +85 -0
  11. package/content/cli/skills/fluent-cli-settings/SKILL.md +106 -0
  12. package/content/cli/skills/fluent-connect/SKILL.md +886 -0
  13. package/content/cli/skills/fluent-module-deploy/SKILL.md +349 -0
  14. package/content/cli/skills/fluent-profile/SKILL.md +180 -0
  15. package/content/cli/skills/fluent-workflow/SKILL.md +310 -0
  16. package/content/dev/agents/fluent-dev/agent.json +88 -0
  17. package/content/dev/agents/fluent-dev.md +525 -0
  18. package/content/dev/reference-modules/catalog.json +4754 -0
  19. package/content/dev/skills/fluent-build/SKILL.md +192 -0
  20. package/content/dev/skills/fluent-connection-analysis/SKILL.md +386 -0
  21. package/content/dev/skills/fluent-custom-code/SKILL.md +895 -0
  22. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +714 -0
  23. package/content/dev/skills/fluent-e2e-test/SKILL.md +394 -0
  24. package/content/dev/skills/fluent-event-api/SKILL.md +945 -0
  25. package/content/dev/skills/fluent-feature-explain/SKILL.md +603 -0
  26. package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +695 -0
  27. package/content/dev/skills/fluent-feature-plan/SKILL.md +227 -0
  28. package/content/dev/skills/fluent-job-batch/SKILL.md +138 -0
  29. package/content/dev/skills/fluent-mermaid-validate/SKILL.md +86 -0
  30. package/content/dev/skills/fluent-module-scaffold/SKILL.md +1928 -0
  31. package/content/dev/skills/fluent-module-validate/SKILL.md +775 -0
  32. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1108 -0
  33. package/content/dev/skills/fluent-retailer-config/SKILL.md +1111 -0
  34. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +385 -0
  35. package/content/dev/skills/fluent-scope-decompose/SKILL.md +1021 -0
  36. package/content/dev/skills/fluent-session-audit-export/SKILL.md +632 -0
  37. package/content/dev/skills/fluent-session-summary/SKILL.md +195 -0
  38. package/content/dev/skills/fluent-settings/SKILL.md +1058 -0
  39. package/content/dev/skills/fluent-source-onboard/SKILL.md +632 -0
  40. package/content/dev/skills/fluent-system-monitoring/SKILL.md +767 -0
  41. package/content/dev/skills/fluent-test-data/SKILL.md +513 -0
  42. package/content/dev/skills/fluent-trace/SKILL.md +1143 -0
  43. package/content/dev/skills/fluent-transition-api/SKILL.md +346 -0
  44. package/content/dev/skills/fluent-version-manage/SKILL.md +744 -0
  45. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +959 -0
  46. package/content/dev/skills/fluent-workflow-builder/SKILL.md +319 -0
  47. package/content/dev/skills/fluent-workflow-deploy/SKILL.md +267 -0
  48. package/content/mcp-extn/agents/fluent-mcp.md +69 -0
  49. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +461 -0
  50. package/content/mcp-official/agents/fluent-mcp-core.md +91 -0
  51. package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -0
  52. package/content/rfl/agents/fluent-rfl.md +56 -0
  53. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -0
  54. package/docs/CAPABILITY_MAP.md +77 -0
  55. package/docs/CLI_COVERAGE.md +47 -0
  56. package/docs/DEV_WORKFLOW.md +802 -0
  57. package/docs/FLOW_RUN.md +142 -0
  58. package/docs/USE_CASES.md +404 -0
  59. package/metadata.json +156 -0
  60. package/package.json +51 -0
@@ -0,0 +1,1031 @@
1
+ ---
2
+ name: fluent-cli-reference
3
+ description: Complete Fluent Commerce CLI v2 command reference. Every command, every flag, every output format. The single source of truth for all CLI operations. Triggers on "fluent cli help", "cli reference", "cli commands", "how to use fluent cli", "fluent command".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ argument-hint: [command] [subcommand]
7
+ ---
8
+
9
+ # Fluent Commerce CLI v2 — Complete Reference
10
+
11
+ Single source of truth for every `fluent` CLI command, flag, and output format. Use this skill when you need the exact syntax for any CLI operation.
12
+
13
+ ## CLI Path & Version
14
+
15
+ ```bash
16
+ # Check version (all OS)
17
+ fluent --version
18
+ ```
19
+
20
+ Common locations:
21
+ - Windows (nvm4w): `C:/nvm4w/nodejs/fluent`
22
+ - macOS/Linux: use `which fluent` to resolve the active binary in PATH
23
+
24
+ **Required:** Node.js 20+
25
+
26
+ ## Global Options (all commands)
27
+
28
+ | Flag | Description |
29
+ |------|-------------|
30
+ | `-v, --version` | Print CLI version |
31
+ | `-d, --debug` | Enable verbose debug logging |
32
+ | `-q, --quiet` | Suppress non-essential output |
33
+ | `-h, --help` | Show command help |
34
+
35
+ ---
36
+
37
+ ## 1. `fluent profile` — Connection Management
38
+
39
+ Profiles store account credentials in `~/.fluentcommerce/<profile-name>/` (Windows resolves `~` to `C:/Users/<user>`).
40
+
41
+ ### `profile create <profile-name>`
42
+
43
+ Create a new profile for a Fluent account.
44
+
45
+ ```bash
46
+ fluent profile create <profile-name> \
47
+ --id <account-id> \
48
+ --base-url <base-url> \
49
+ --username <username> \
50
+ --password <password> \
51
+ --client-secret <client-secret>
52
+ ```
53
+
54
+ | Flag | Required | Description |
55
+ |------|----------|-------------|
56
+ | `--id` | Yes | Fluent account ID (same as client_id in OAuth) |
57
+ | `--base-url` | Yes | API base URL (e.g., `https://acme.sandbox.api.fluentretail.com`) |
58
+ | `--username` | Yes | Admin username |
59
+ | `--password` | Yes | Admin password |
60
+ | `--client-secret` | Yes | OAuth client secret |
61
+
62
+ **Files created:**
63
+ ```
64
+ ~/.fluentcommerce/<profile-name>/
65
+ profile.json # Account ID, base URL
66
+ user.<username>.json # Encrypted credentials
67
+ ```
68
+
69
+ ### `profile list`
70
+
71
+ List all local profiles.
72
+
73
+ ```bash
74
+ fluent profile list
75
+ ```
76
+
77
+ ### `profile active`
78
+
79
+ Show the currently active profile and retailer.
80
+
81
+ ```bash
82
+ fluent profile active
83
+ ```
84
+
85
+ ### `profile use <profile-name>`
86
+
87
+ Set the active profile (and optionally retailer).
88
+
89
+ ```bash
90
+ fluent profile use <profile-name>
91
+ fluent profile use <profile-name> --retailer <retailer-ref>
92
+ ```
93
+
94
+ | Flag | Required | Description |
95
+ |------|----------|-------------|
96
+ | `-r, --retailer` | No | Set active retailer context |
97
+
98
+ ### `profile update <profile-name>`
99
+
100
+ Update profile, user, or retailer credentials.
101
+
102
+ ```bash
103
+ # Update default user reference
104
+ fluent profile update <profile> --user <user-ref>
105
+
106
+ # Add/update user credentials
107
+ fluent profile update <profile> --user <user-ref> --username <username> --password <password>
108
+
109
+ # Add/update retailer (IMPORTANT: this is how you register a retailer locally)
110
+ fluent profile update <profile> --retailer <retailer-ref> --id <retailer-id>
111
+
112
+ # Add retailer with credentials
113
+ fluent profile update <profile> --retailer <retailer-ref> --id <retailer-id> \
114
+ --username <username> --password <password>
115
+
116
+ # Change retailer's default user
117
+ fluent profile update <profile> --retailer <retailer-ref> --user <user-ref>
118
+ ```
119
+
120
+ | Flag | Required | Description |
121
+ |------|----------|-------------|
122
+ | `--user` | Conditional | User reference to set as default |
123
+ | `--username` | Conditional | Username (requires --password) |
124
+ | `--password` | Conditional | Password (requires --username) |
125
+ | `--retailer` | Conditional | Retailer ref (required with --id) |
126
+ | `--id` | Conditional | Retailer numeric ID (required when adding retailer) |
127
+
128
+ ### `profile export <profile-name>`
129
+
130
+ Export profile as Postman environment.
131
+
132
+ ```bash
133
+ fluent profile export <profile-name> --format postman --retailer <retailer-ref>
134
+ ```
135
+
136
+ | Flag | Required | Description |
137
+ |------|----------|-------------|
138
+ | `--format` | Yes | Export format (only `postman` supported) |
139
+ | `--retailer` | No | Include retailer context (repeatable) |
140
+
141
+ **Output:** `postman.<profile>.<retailer>.environment.json`
142
+
143
+ ### `profile retailers [profile-name]`
144
+
145
+ List retailers configured for a profile.
146
+
147
+ ```bash
148
+ fluent profile retailers # uses active profile
149
+ fluent profile retailers <profile> # specific profile
150
+ ```
151
+
152
+ ### `profile clear`
153
+
154
+ Clear the active profile/retailer context.
155
+
156
+ ```bash
157
+ fluent profile clear
158
+ ```
159
+
160
+ ### `profile purge-sessions`
161
+
162
+ Remove stale session files from `~/.fluentcommerce/.sessions/`.
163
+
164
+ ```bash
165
+ fluent profile purge-sessions
166
+ ```
167
+
168
+ ### Profile File Structure
169
+
170
+ ```
171
+ ~/.fluentcommerce/
172
+ ├── <profile-name>/
173
+ │ ├── profile.json # { "accountId": "...", "baseUrl": "..." }
174
+ │ ├── user.<username>.json # { "username": "...", "password": "..." }
175
+ │ └── retailer.<retailer-ref>.json # { "id": "3", "ref": "Acme", "user": "admin" }
176
+ └── .sessions/
177
+ └── <session-files>
178
+ ```
179
+
180
+ **Manual retailer registration:** When the CLI doesn't know about a retailer (e.g., `fluent workflow list` fails with "retailer does not exist"), create the retailer JSON manually:
181
+
182
+ ```json
183
+ // ~/.fluentcommerce/<profile>/retailer.<retailer-ref>.json
184
+ {
185
+ "id": "<retailer-numeric-id>",
186
+ "ref": "<retailer-ref>",
187
+ "user": "<username>"
188
+ }
189
+ ```
190
+
191
+ Then retry the command. This is equivalent to `fluent profile update <profile> --retailer <ref> --id <id>`.
192
+
193
+ ---
194
+
195
+ ## 2. `fluent module` — Module Management
196
+
197
+ ### `module list`
198
+
199
+ List all installed modules on the account.
200
+
201
+ ```bash
202
+ fluent module list -p <profile>
203
+ ```
204
+
205
+ | Flag | Required | Description |
206
+ |------|----------|-------------|
207
+ | `-p, --profile` | Yes | Profile to use |
208
+
209
+ ### `module describe <module>`
210
+
211
+ Show module contents (assets, workflows, settings, rules).
212
+
213
+ ```bash
214
+ fluent module describe <module-source>
215
+ fluent module describe <module-source> --module-version 1.2.0
216
+ ```
217
+
218
+ | Flag | Required | Description |
219
+ |------|----------|-------------|
220
+ | `--base-dir` | No | Extraction directory (default: `.tmp`) |
221
+ | `--module-version` | No | Version for reference modules (default: `latest`) |
222
+
223
+ `<module-source>` can be: a reference name (`core`, `order`), a URL, or a local path.
224
+
225
+ ### `module config <module>`
226
+
227
+ Generate a module configuration file from the module's template.
228
+
229
+ ```bash
230
+ fluent module config <module-source> \
231
+ -p <profile> -r <retailer-ref>
232
+ ```
233
+
234
+ | Flag | Required | Description |
235
+ |------|----------|-------------|
236
+ | `-p, --profile` | Yes | Profile to use |
237
+ | `-r, --retailer` | Yes | Retailer context |
238
+ | `--base-dir` | No | Extraction directory (default: `.tmp`) |
239
+ | `--module-version` | No | Version for reference modules (default: `latest`) |
240
+
241
+ **Output:** `module.config.<retailer>.<module-name>.json`
242
+
243
+ **Always check for unreplaced tokens before installing:**
244
+ ```bash
245
+ rg '\[\[.*\]\]' module.config.*.json
246
+ ```
247
+
248
+ ```powershell
249
+ # PowerShell
250
+ Select-String -Path "module.config.*.json" -Pattern '\[\[.*\]\]'
251
+ ```
252
+
253
+ Common tokens: `[[retailer.id]]`, `[[productCatalogue.ref]]`, `[[network.ref.hd]]`, `[[network.ref.cc]]`, `[[virtualCatalogue.ref]]`, `[[inventoryCatalogue.ref]]`
254
+
255
+ ### `module install <module>`
256
+
257
+ Install a module to an account/retailer.
258
+
259
+ ```bash
260
+ fluent module install <module-source> \
261
+ -p <profile> -r <retailer-ref> \
262
+ -c <config-file> \
263
+ --exclude workflows \
264
+ --force
265
+ ```
266
+
267
+ | Flag | Required | Description |
268
+ |------|----------|-------------|
269
+ | `-p, --profile` | Yes | Profile to use |
270
+ | `-r, --retailer` | Yes | Target retailer |
271
+ | `-c, --config` | No | Config file (auto-discovers `module.config.<retailer>.<module>.json`) |
272
+ | `-w, --wait` | No | Wait between tasks in ms (default: `2000`) |
273
+ | `--base-dir` | No | Extraction directory (default: `.tmp`) |
274
+ | `--module-version` | No | Version for reference modules (default: `latest`) |
275
+ | `-i, --include` | No | Only install these assets (repeatable). Path inside module ZIP. |
276
+ | `-e, --exclude` | No | Skip these assets (repeatable). Path inside module ZIP. |
277
+ | `-f, --force` | No | Force reinstall even if same/higher version exists |
278
+
279
+ **Filter examples:**
280
+ ```bash
281
+ --exclude workflows # skip all workflows
282
+ --exclude settings # skip all settings
283
+ --include workflows/fc-workflow-order-hd.json # only this workflow
284
+ --exclude workflows --exclude settings # skip both
285
+ ```
286
+
287
+ **Version bumping for custom modules:** Same version = "already uploaded". Bump in: parent `pom.xml`, child `pom.xml` files, and `resources/module.json`.
288
+
289
+ ### `module create [template-path]`
290
+
291
+ Scaffold a new module from a template.
292
+
293
+ ```bash
294
+ fluent module create # use default Fluent template
295
+ fluent module create ./my-template.zip # use custom template
296
+ fluent module create -b ./modules -n my-ext # specify dir and name
297
+ ```
298
+
299
+ | Flag | Required | Description |
300
+ |------|----------|-------------|
301
+ | `-b, --base-dir` | No | Directory to create module in (default: `.`) |
302
+ | `-n, --name` | No | Module name (sets `module.json` name field) |
303
+
304
+ **Output:** Standard module directory structure with `resources/module.json`, plugin scaffold, etc.
305
+
306
+ ---
307
+
308
+ ## 3. `fluent retailer` — Retailer Management
309
+
310
+ ### `retailer create <retailer-ref>`
311
+
312
+ Create a new retailer on the account.
313
+
314
+ ```bash
315
+ fluent retailer create <retailer-ref> \
316
+ --email <email> \
317
+ -p <profile>
318
+ ```
319
+
320
+ | Flag | Required | Description |
321
+ |------|----------|-------------|
322
+ | `--email` | Yes | Retailer admin email |
323
+ | `-p, --profile` | Yes | Profile to use |
324
+ | `--trading-name` | No | Trading name (defaults to `<retailer-ref>`) |
325
+ | `--region` | No | Region |
326
+ | `--phone-number` | No | Phone number |
327
+ | `--website` | No | Website URL |
328
+
329
+ **IMPORTANT:** Always use the CLI for retailer creation. The `createRetailer` GraphQL mutation creates REST-only entities invisible to GraphQL queries.
330
+
331
+ ### `retailer list`
332
+
333
+ List all locally configured retailers across all profiles.
334
+
335
+ ```bash
336
+ fluent retailer list
337
+ ```
338
+
339
+ **Output:** Table with Profile ID, Retailer Ref, Retailer ID columns. This lists local config files, not remote retailers.
340
+
341
+ ---
342
+
343
+ ## 4. `fluent setting` — Settings Management
344
+
345
+ ### `setting list`
346
+
347
+ List settings (summary view: name, context, contextId, valueType).
348
+
349
+ ```bash
350
+ fluent setting list -p <profile> -r <retailer-ref>
351
+ fluent setting list -p <profile> -r <retailer-ref> --name "%manifest%"
352
+ fluent setting list -p <profile> -r <retailer-ref> --context retailer --json
353
+ ```
354
+
355
+ | Flag | Required | Description |
356
+ |------|----------|-------------|
357
+ | `-p, --profile` | Yes | Profile to use |
358
+ | `-r, --retailer` | Yes | Retailer context |
359
+ | `-n, --name` | No | Filter by name (`%` wildcards). Repeatable. |
360
+ | `-f, --first` | No | Limit results (disables auto-pagination) |
361
+ | `--context` | No | Filter: `account`, `retailer`, or `all` |
362
+ | `-j, --json` | No | Output as JSON (default: `false`) |
363
+
364
+ ### `setting get`
365
+
366
+ Get detailed settings including full values (id, name, context, contextId, valueType, value, lobValue).
367
+
368
+ ```bash
369
+ fluent setting get -p <profile> -r <retailer-ref>
370
+ fluent setting get -p <profile> -r <retailer-ref> --name "%order%" --json
371
+ ```
372
+
373
+ | Flag | Required | Description |
374
+ |------|----------|-------------|
375
+ | `-p, --profile` | Yes | Profile to use |
376
+ | `-r, --retailer` | Yes | Retailer context |
377
+ | `-n, --name` | No | Filter by name (`%` wildcards). Repeatable. |
378
+ | `-f, --first` | No | Limit results (disables auto-pagination) |
379
+ | `--context` | No | Filter: `account`, `retailer`, or `all` |
380
+ | `-j, --json` | No | Output as JSON (default: `true`) |
381
+
382
+ **Difference between `list` and `get`:** `list` shows summary (no values), `get` shows full detail including `value` and `lobValue` (large object value for JSON settings).
383
+
384
+ ---
385
+
386
+ ## 5. `fluent workflow` — Workflow Operations
387
+
388
+ ### `workflow list`
389
+
390
+ List all workflows for a retailer.
391
+
392
+ ```bash
393
+ fluent workflow list -p <profile> -r <retailer-ref>
394
+ fluent workflow list -p <profile> -r <retailer-ref> --json
395
+ ```
396
+
397
+ | Flag | Required | Description |
398
+ |------|----------|-------------|
399
+ | `-p, --profile` | Yes | Profile to use |
400
+ | `-r, --retailer` | Yes | Retailer context |
401
+ | `--json` | No | Output as JSON (for piping to jq) |
402
+
403
+ ### `workflow download`
404
+
405
+ Download one or all workflows.
406
+
407
+ ```bash
408
+ fluent workflow download -p <profile> -r <retailer-ref> -w ORDER::HD -o ./workflows/
409
+ fluent workflow download -p <profile> -r <retailer-ref> -w all -o ./workflows/
410
+ fluent workflow download -p <profile> -r <retailer-ref> -w all --json
411
+ ```
412
+
413
+ | Flag | Required | Description |
414
+ |------|----------|-------------|
415
+ | `-p, --profile` | Yes | Profile to use |
416
+ | `-r, --retailer` | Yes | Retailer context |
417
+ | `-w, --workflow` | No | Workflow name or `all` (default: `all`) |
418
+ | `-o, --output-folder` | No | Output directory (default: `.`) |
419
+ | `--json` | No | Write to stdout as JSON instead of files |
420
+
421
+ **Windows gotcha:** Workflow names contain `::` (e.g., `ORDER::HD`). Windows forbids `:` in filenames. Both `-w <name>` and `-w all` fail on Windows because the CLI writes filenames like `ORDER::HD.json`. Use `--json` to output to stdout, then split and save with sanitized filenames (for example `ORDER__HD.json`) and persist `workflow-file-map.json` (original name -> filename). If MCP servers are connected, prefer MCP-based download which returns JSON content without writing files.
422
+
423
+ ### `workflow merge <fragment> <target>`
424
+
425
+ Merge a workflow fragment into a base workflow.
426
+
427
+ ```bash
428
+ fluent workflow merge ./fragment.json ORDER::HD -p <profile> -r <retailer-ref>
429
+ fluent workflow merge ./fragment.json ./workflows/ORDER__HD.json # local file target
430
+ ```
431
+
432
+ | Flag | Required | Description |
433
+ |------|----------|-------------|
434
+ | `-p, --profile` | Conditional | Required when target is a workflow name (not file) |
435
+ | `-r, --retailer` | Conditional | Required when target is a workflow name |
436
+
437
+ **Output:** `<target>.merged.json`
438
+
439
+ **Known bug:** Merge works locally but fails to upload with `token:undefined`. Workaround: upload merged file via REST API.
440
+
441
+ ---
442
+
443
+ ## 6. `fluent workflowlog` — Workflow Modification History
444
+
445
+ Track which modules/fragments have been applied to workflows.
446
+
447
+ ### `workflowlog list`
448
+
449
+ ```bash
450
+ fluent workflowlog list -p <profile> -r <retailer-ref>
451
+ ```
452
+
453
+ ### `workflowlog describe <workflow-name> [position]`
454
+
455
+ ```bash
456
+ # Summary of all log entries
457
+ fluent workflowlog describe ORDER::HD -p <profile> -r <retailer-ref>
458
+
459
+ # Full detail of specific entry (0-based index)
460
+ fluent workflowlog describe ORDER::HD 0 -p <profile> -r <retailer-ref>
461
+ ```
462
+
463
+ Pipe through `jq '.workflow'` to extract the workflow JSON from a specific log entry.
464
+
465
+ ### `workflowlog insert <workflow-path> <module-name> <position>`
466
+
467
+ ```bash
468
+ fluent workflowlog insert ./my-fragment.json my-extension 1 \
469
+ -p <profile> -r <retailer-ref>
470
+ fluent workflowlog insert ./my-fragment.json my-extension 1 \
471
+ -p <profile> -r <retailer-ref> -c module.config.json
472
+ ```
473
+
474
+ | Flag | Required | Description |
475
+ |------|----------|-------------|
476
+ | `-p, --profile` | Yes | Profile to use |
477
+ | `-r, --retailer` | Yes | Retailer context |
478
+ | `-c, --config` | No | Module config file (for template variable substitution) |
479
+
480
+ ### `workflowlog delete <workflow-name> <position>`
481
+
482
+ ```bash
483
+ fluent workflowlog delete ORDER::HD 1 -p <profile> -r <retailer-ref>
484
+ ```
485
+
486
+ Position is 0-based. Use `workflowlog describe` to find the position first.
487
+
488
+ ---
489
+
490
+ ## 7. `fluent mcp` — MCP Server
491
+
492
+ ### `mcp server`
493
+
494
+ Start the built-in MCP server for IDE integration (Claude Code, Cursor, etc.).
495
+
496
+ ```bash
497
+ fluent mcp server --stdio
498
+ fluent mcp server --stdio --log-level debug
499
+ ```
500
+
501
+ | Flag | Required | Description |
502
+ |------|----------|-------------|
503
+ | `--stdio` | Yes | Use stdio transport (required for IDE integration) |
504
+ | `--log-level` | No | `trace`, `debug`, `info`, `warn`, `error` (default: `info`) |
505
+
506
+ **`.mcp.json` configuration:**
507
+ ```json
508
+ {
509
+ "mcpServers": {
510
+ "fluent-mcp": {
511
+ "command": "fluent",
512
+ "args": ["mcp", "server", "--stdio"],
513
+ "env": {
514
+ "FLUENT_PROFILE": "<profile-name>"
515
+ }
516
+ }
517
+ }
518
+ }
519
+ ```
520
+
521
+ The MCP server provides GraphQL query building, validation, workflow list/download, and health checks to AI coding assistants.
522
+
523
+ ---
524
+
525
+ ## REST API Fallback
526
+
527
+ When CLI commands fail or lack features, use the REST API directly.
528
+
529
+ > **Cross-platform note:** The REST API examples below use bash syntax and require bash, Git Bash, or WSL on Windows. The Fluent CLI and MCP tools (e.g., `graphql.query`, `event.send`) are the recommended cross-platform approach.
530
+
531
+ ### Get OAuth Token
532
+
533
+ ```bash
534
+ # IMPORTANT: Use $FLUENT_USERNAME, not $USER — $USER resolves to the OS login name on Unix/macOS.
535
+ TOKEN=$(curl -s -X POST "$BASE_URL/oauth/token" \
536
+ -H "Content-Type: application/x-www-form-urlencoded" \
537
+ -d "username=$FLUENT_USERNAME&password=$PASS&client_id=$ACCOUNT&client_secret=$SECRET&grant_type=password&scope=api" \
538
+ | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
539
+ # Note: Use `python` instead of `python3` on Windows if `python3` is not available.
540
+ ```
541
+
542
+ ```powershell
543
+ # PowerShell
544
+ # Use $FLUENT_USERNAME, not $USER (which resolves to OS login name)
545
+ $body = @{
546
+ username = $FLUENT_USERNAME
547
+ password = $PASS
548
+ client_id = $ACCOUNT
549
+ client_secret = $SECRET
550
+ grant_type = "password"
551
+ scope = "api"
552
+ }
553
+ $response = Invoke-RestMethod -Uri "$BASE_URL/oauth/token" -Method Post -Body $body -ContentType "application/x-www-form-urlencoded"
554
+ $TOKEN = $response.access_token
555
+ ```
556
+
557
+ ### Upload Workflow via REST
558
+
559
+ ```bash
560
+ curl -s -X PUT "$BASE_URL/api/v4.1/workflow" \
561
+ -H "Content-Type: application/json" \
562
+ -H "Authorization: Bearer $TOKEN" \
563
+ -H "fluent.account: $ACCOUNT" \
564
+ -d @workflow.json
565
+ ```
566
+
567
+ ```powershell
568
+ # PowerShell
569
+ $headers = @{
570
+ "Authorization" = "Bearer $TOKEN"
571
+ "fluent.account" = $ACCOUNT
572
+ }
573
+ $workflow = Get-Content "workflow.json" -Raw
574
+ Invoke-RestMethod -Uri "$BASE_URL/api/v4.1/workflow" -Method Put -Headers $headers -Body $workflow -ContentType "application/json"
575
+ ```
576
+
577
+ Requires a **retailer-scoped token** (not account-level).
578
+
579
+ ---
580
+
581
+ ## Account Identification from URL
582
+
583
+ The Fluent account name is extracted from the base URL, not from GraphQL:
584
+
585
+ ```
586
+ https://<account>[.<environment>].api.fluentretail.com
587
+ ```
588
+
589
+ | URL | Account | Environment |
590
+ |-----|---------|-------------|
591
+ | `https://acme.test.api.fluentretail.com` | `acme` | test |
592
+ | `https://acme.sandbox.api.fluentretail.com` | `acme` | sandbox |
593
+ | `https://acme.api.fluentretail.com` | `acme` | **production** |
594
+
595
+ No `.test.` or `.sandbox.` qualifier = **production** — proceed with caution.
596
+
597
+ ---
598
+
599
+ ## Cross-Cutting Gotchas
600
+
601
+ | Issue | Affected Commands | Workaround |
602
+ |-------|------------------|------------|
603
+ | `::` in filenames | `workflow download` | Both `-w <name>` and `-w all` fail on Windows; use `--json` flag or prefer MCP-based download |
604
+ | `token:undefined` on upload | `workflow merge` | Upload via REST API manually |
605
+ | Retailer not in local profile | `workflow list/download`, `setting list/get` | `fluent profile update <profile> --retailer <ref> --id <id>` or create `retailer.<ref>.json` manually |
606
+ | 403 on workflow upload | REST API | Use retailer-scoped token, not account-level |
607
+ | Module version unchanged | `module install` | Bump version in pom.xml + module.json, or use `--force` |
608
+ | Config tokens unreplaced | `module install` | Run `grep '\[\[.*\]\]'` on config files before install |
609
+ | `createRetailer` GraphQL | N/A | Always use `fluent retailer create` CLI instead |
610
+
611
+ ---
612
+
613
+ ## Module Types
614
+
615
+ Fluent modules fall into three categories:
616
+
617
+ | Type | Description | Contains Plugins? | Examples |
618
+ |------|-------------|-------------------|----------|
619
+ | **Reference** | Core Fluent-provided modules that deliver standard OMS functionality. Downloaded by name during `module install`. | Yes (OOTB rules) | `core`, `fulfilment`, `order`, `inventory` |
620
+ | **Extension** | Custom modules built by implementation teams. Contain Java plugin code (business rules), workflow fragments, settings, and data assets. | Yes (custom rules) | `fc-module-custom-extensions`, `fc-module-returns` |
621
+ | **Data** | Modules that carry only data assets (locations, products, inventory, settings) with no plugin code. Used for environment seeding, test data, or retailer-specific configuration. | No | `b2c-sample-data`, `product-catalog-data` |
622
+
623
+ **Reference modules** are versioned and hosted by Fluent. Install them by name:
624
+ ```bash
625
+ fluent module install core -p <profile> -r <retailer>
626
+ ```
627
+
628
+ **Extension and Data modules** are built locally and installed from a path or ZIP:
629
+ ```bash
630
+ fluent module install dist/my-module-1.0.0.zip -p <profile> -r <retailer> -c <config>
631
+ ```
632
+
633
+ ---
634
+
635
+ ## Module Dependencies
636
+
637
+ Reference modules have a strict install order. Installing out of order causes `Module dependency '<module>' not installed` errors.
638
+
639
+ | Order | Module | Dependencies | What It Provides |
640
+ |-------|--------|-------------|------------------|
641
+ | 1 | `core` | None | Base entity types, OOTB rules (SetState, SendEvent, etc.), core workflows |
642
+ | 2 | `fulfilment` | `core` | Fulfilment workflows, wave management, pick/pack rules |
643
+ | 3 | `order` | `core`, `fulfilment` | Order workflows (HD, CC), fulfilment options, sourcing |
644
+ | 4 | `inventory` | `core` | Inventory management, catalogue rules, stock adjustments |
645
+ | 5 | Custom extensions | Varies (check `module.json`) | Your business logic, custom rules, workflow fragments |
646
+
647
+ **Always verify dependencies before install:**
648
+ ```bash
649
+ fluent module describe <module-source> # shows module.json including dependencies
650
+ fluent module list -p <profile> # shows what is already installed
651
+ ```
652
+
653
+ **Common sequence for a new retailer:**
654
+ ```bash
655
+ fluent module install core -p <profile> -r <retailer> -c <core-config>
656
+ fluent module install fulfilment -p <profile> -r <retailer> -c <fulfilment-config>
657
+ fluent module install order -p <profile> -r <retailer> -c <order-config>
658
+ fluent module install inventory -p <profile> -r <retailer> -c <inventory-config>
659
+ fluent module install dist/my-extension.zip -p <profile> -r <retailer> -c <ext-config>
660
+ ```
661
+
662
+ ---
663
+
664
+ ## Config Prefix System
665
+
666
+ The CLI uses a **prefix system** in `module.config.<retailer>.<module>.json` files to scope variable values to specific asset contexts. This allows the same variable name to resolve to different values in workflows vs. settings vs. data assets.
667
+
668
+ ### Prefix Format
669
+
670
+ Config keys follow the pattern: `<prefix>:<variable.name>`
671
+
672
+ | Prefix | Applies To | Specificity | Example |
673
+ |--------|-----------|-------------|---------|
674
+ | `default:` | All assets (workflows, settings, data) | 0 (lowest, fallback) | `"default:network.ref": "NET_DEFAULT"` |
675
+ | `workflow:` | Workflows only | 0 | `"workflow:notification.enabled": "true"` |
676
+ | `workflow:<type>:` | Workflows matching entity type | 1 | `"workflow:order:network.ref": "NET_ORDER"` |
677
+ | `workflow:<type>:<subtype>:` | Workflows matching type + subtype | 2 (highest) | `"workflow:order:hd:carrier.ref": "HD_CARRIER"` |
678
+ | `setting:` | Settings only | 0 | `"setting:api.timeout": "30000"` |
679
+
680
+ ### Specificity Rules
681
+
682
+ The CLI counts colons in the prefix to determine specificity. More colons = higher priority. When two keys resolve to the same variable, the most specific wins. On a tie, the first key in the file wins.
683
+
684
+ **Example resolution for workflow `ORDER::HD`:**
685
+ ```json
686
+ {
687
+ "default:network.ref": "NET1", // specificity 0
688
+ "workflow:network.ref": "NET2", // specificity 0 (tie with default)
689
+ "workflow:order:network.ref": "NET3", // specificity 1
690
+ "workflow:order:hd:network.ref": "NET4" // specificity 2 — WINS
691
+ }
692
+ ```
693
+
694
+ Result: `[[network.ref]]` in the ORDER::HD workflow resolves to `"NET4"`.
695
+
696
+ ### Context-Based Filtering
697
+
698
+ The CLI filters recognized prefixes based on which asset folder is being processed:
699
+
700
+ | Asset Folder | Recognized Prefixes |
701
+ |-------------|---------------------|
702
+ | `assets/workflows/` | `default:`, `workflow:`, `workflow:<type>:`, `workflow:<type>:<subtype>:` |
703
+ | `assets/settings/` | `default:`, `setting:` |
704
+ | All other folders (locations, products, etc.) | `default:` only |
705
+
706
+ **Important:** Data assets (users, locations, networks, products, carriers, etc.) only recognize the `default:` prefix. There is no `location:`, `network:`, or `product:` prefix.
707
+
708
+ ### Built-in Auto-Injected Variables
709
+
710
+ These variables are always available without defining them in `module.config.json`:
711
+
712
+ | Variable | Description |
713
+ |----------|-------------|
714
+ | `account.id` | Account identifier (used in rule name prefixes) |
715
+ | `retailer.id` | Retailer numeric ID |
716
+ | `retailer.ref` | Retailer reference string |
717
+ | `retailer.name` | Retailer trading name |
718
+
719
+ **Note:** `account.host` is NOT auto-injected. Define it in config if needed (e.g., `"default:account.host": "acme.sandbox.api.fluentretail.com"`).
720
+
721
+ ### Config Example
722
+
723
+ **module.config.RETAILER_A.my-module.json:**
724
+ ```json
725
+ {
726
+ "default:network.ref": "NETWORK_DEFAULT",
727
+ "default:catalogue.ref": "PC:MASTER:5",
728
+
729
+ "workflow:order:network.ref": "NETWORK_FULFILMENT",
730
+ "workflow:order:hd:carrier.ref": "HD_CARRIER",
731
+ "workflow:order:cc:carrier.ref": "CC_CARRIER",
732
+
733
+ "setting:api.timeout": "30000",
734
+ "setting:retry.count": "3"
735
+ }
736
+ ```
737
+
738
+ ---
739
+
740
+ ## Variable Syntax
741
+
742
+ The CLI uses `[[variable]]` tokens in JSON and CSV asset files for environment-specific substitution during `module install`.
743
+
744
+ | Syntax | Used In | Example |
745
+ |--------|---------|---------|
746
+ | `[[variable]]` | JSON/CSV assets, workflow fragments | `[[retailer.id]]`, `[[network.ref]]`, `[[account.id]]` |
747
+
748
+ ### Substitution Rules
749
+
750
+ - **Only `[[...]]` is processed.** Other syntaxes (`${}`, `{{}}`) are NOT recognized.
751
+ - **Unresolved tokens are left as-is.** The CLI does not error on missing values — it silently keeps the `[[token]]` in the output. Always check for unreplaced tokens before installing: `rg '\[\[.*\]\]' module.config.*.json`
752
+ - **`module.config.json` is a values-only template.** Keys must be scoped with prefixes (`default:`, `workflow:`, `setting:`). Unscoped keys do not participate in substitution.
753
+ - **Config values must be scalars** (string, number, boolean). If your template uses metadata objects with `type`/`description` fields, replace them with real values before installing.
754
+
755
+ ### Variable Flow
756
+
757
+ 1. Define variables in `resources/module.config.json` (template)
758
+ 2. Use `[[variable]]` tokens in asset files under `resources/assets/`
759
+ 3. Run `fluent module config <module> -p <profile> -r <retailer>` to generate a config file
760
+ 4. Edit the generated `module.config.<retailer>.<module>.json` with real values
761
+ 5. Install with `fluent module install <module> -c <config-file> ...`
762
+
763
+ ---
764
+
765
+ ## Module Structure
766
+
767
+ Complete canonical directory layout for a Fluent CLI module:
768
+
769
+ ```
770
+ my-module/
771
+ |
772
+ +-- resources/ <- Module content root
773
+ | |
774
+ | +-- module.json <- Module metadata (name, version, dependencies)
775
+ | +-- module.config.json <- Variable template (required; can be empty {})
776
+ | |
777
+ | +-- assets/ <- All deployable assets
778
+ | +-- workflows/ <- Workflow JSON files (*.json)
779
+ | +-- settings/ <- Settings JSON files (*.json)
780
+ | +-- locations/ <- Location JSON files (*.json)
781
+ | +-- users/ <- User JSON files (*.json)
782
+ | +-- roles/ <- Role JSON files (*.json)
783
+ | +-- networks/ <- Network JSON files (*.json)
784
+ | +-- carriers/ <- Carrier JSON files (*.json)
785
+ | +-- product-catalogues/ <- Product catalogue JSON files (*.json)
786
+ | +-- categories/ <- Category CSV files (*.csv)
787
+ | +-- products/ <- Product CSV files (*.csv)
788
+ | +-- inventory-catalogues/ <- Inventory catalogue JSON files (*.json)
789
+ | +-- inventory/ <- Inventory CSV files (*.csv)
790
+ | +-- virtual-catalogues/ <- Virtual catalogue JSON files (*.json)
791
+ | +-- control-groups/ <- Control group JSON files (*.json)
792
+ | +-- controls/ <- Control JSON files (*.json)
793
+ | +-- storage-areas/ <- Storage area JSON files (*.json)
794
+ | +-- payment-service-providers/ <- PSP JSON files (*.json)
795
+ | +-- workflow-fragments/ <- Workflow fragment files (optional)
796
+ | +-- <workflow-name>/ <- Subfolder per target workflow
797
+ | +-- *.json
798
+ |
799
+ +-- plugins/ <- Java plugin code (optional, extension modules only)
800
+ | +-- pom.xml <- Maven parent POM
801
+ | +-- rules/ <- Business rule Java classes
802
+ | +-- types/ <- Model/DTO Java classes
803
+ | +-- util/ <- Utility Java classes
804
+ |
805
+ +-- scripts/
806
+ | +-- build-module.sh <- Build script
807
+ |
808
+ +-- dist/ <- Build output (created after build)
809
+ +-- my-module-1.0.0.zip <- Deployable module package
810
+ ```
811
+
812
+ **Key notes:**
813
+ - `module.config.json` is required even if empty (`{}`).
814
+ - `plugins/` is only present in extension modules with custom Java rules.
815
+ - Workflow fragments must be in subfolders under `workflow-fragments/` named after the target workflow. Files placed directly under `workflow-fragments/` are ignored.
816
+ - `module.json` defines `name`, `version`, `title`, `description`, `authors`, `dependencies`, and `contracts`.
817
+
818
+ **module.json example:**
819
+ ```json
820
+ {
821
+ "_schema": "1.0.0",
822
+ "name": "sample/custom-extensions",
823
+ "version": "1.0.0",
824
+ "title": "Custom Extensions",
825
+ "description": "Custom business rules and workflow extensions",
826
+ "authors": [{ "name": "Implementation Team" }],
827
+ "dependencies": [],
828
+ "contracts": []
829
+ }
830
+ ```
831
+
832
+ ---
833
+
834
+ ## Selective Asset Installation
835
+
836
+ Use `--include` and `--exclude` flags on `module install` to deploy only specific asset types. Paths match folder names inside the module's `assets/` directory.
837
+
838
+ ### Filterable Paths
839
+
840
+ | Path | Asset Type |
841
+ |------|-----------|
842
+ | `workflows` | Workflow JSON files |
843
+ | `settings` | Settings JSON files |
844
+ | `rules` | Java plugin JARs |
845
+ | `locations` | Location definitions |
846
+ | `users` | User definitions |
847
+ | `roles` | Role definitions |
848
+ | `networks` | Network definitions |
849
+ | `carriers` | Carrier definitions |
850
+ | `products` | Product CSV data |
851
+ | `categories` | Category CSV data |
852
+ | `inventory` | Inventory CSV data |
853
+ | `product-catalogues` | Product catalogue definitions |
854
+ | `inventory-catalogues` | Inventory catalogue definitions |
855
+ | `virtual-catalogues` | Virtual catalogue definitions |
856
+ | `workflow-fragments` | Workflow fragment files |
857
+
858
+ ### Common Scenarios
859
+
860
+ **Skip workflows for multi-retailer installs** (when each retailer has unique workflows):
861
+ ```bash
862
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> --exclude workflows
863
+ ```
864
+
865
+ **Plugin-only update** (recompiled Java rules, workflows/settings unchanged):
866
+ ```bash
867
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> --include rules --force
868
+ ```
869
+
870
+ **Workflows + settings only** (common update pattern):
871
+ ```bash
872
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> \
873
+ --include workflows settings --force
874
+ ```
875
+
876
+ **Production install without test data:**
877
+ ```bash
878
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> \
879
+ --exclude products inventory categories
880
+ ```
881
+
882
+ **Large dataset chunking** (avoid timeouts):
883
+ ```bash
884
+ # Step 1: Infrastructure (everything except bulk data)
885
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> --exclude products inventory
886
+
887
+ # Step 2: Products (with increased wait)
888
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> --include products --wait 5000
889
+
890
+ # Step 3: Inventory
891
+ fluent module install dist/my-module.zip -p <profile> -r <retailer> --include inventory --wait 5000
892
+ ```
893
+
894
+ **Fast dev iteration** (deploy only what changed):
895
+ ```bash
896
+ # Full install first time
897
+ fluent module install dist/my-module.zip -p dev -r DEV -c config.json
898
+
899
+ # Subsequent iterations — only changed assets
900
+ fluent module install dist/my-module.zip -p dev -r DEV --include workflows --force
901
+ ```
902
+
903
+ ---
904
+
905
+ ## Workflow Fragment Strategies
906
+
907
+ Workflow fragments use `mergeStrategy` on rulesets, rules, statuses, and triggers to control how they combine with the base workflow during `module install` or `workflow merge`.
908
+
909
+ | Strategy | Behavior | When to Use |
910
+ |----------|----------|-------------|
911
+ | **`merge`** | Adds or updates rules/triggers/userActions within an existing ruleset. New rulesets are added. Duplicate rules (same name + props) are ignored. Use `index` on rules to control insertion position. | Adding custom logic to reference module rulesets. Extending without breaking existing rules. |
912
+ | **`replace`** | Completely replaces the entire matched ruleset (or rule/status/trigger). The fragment's content becomes the new content. | Replacing obsolete logic. Taking full ownership of a ruleset. |
913
+ | **`keep`** | Preserves the original element from the base workflow. The fragment's element is ignored if a match exists. | Conditional additions — only add if not already present. Safe defaults. |
914
+ | **`delete`** | Removes the matched element from the workflow. No-op if the element does not exist. Processed before `replace` and `merge`. | Removing deprecated rulesets or rules. Cleanup during upgrades. |
915
+
916
+ ### Matching Keys
917
+
918
+ Elements are matched for strategy resolution using these keys:
919
+
920
+ | Element | Matching Key |
921
+ |---------|-------------|
922
+ | Rulesets | `name \| type \| subtype \| [trigger statuses]` |
923
+ | Statuses | `name \| entityType` |
924
+ | Triggers | `status` |
925
+ | User Actions | `context[0].label` |
926
+
927
+ ### Fragment Location in Modules
928
+
929
+ ```
930
+ resources/assets/workflow-fragments/<workflow-name>/*.json
931
+ ```
932
+
933
+ Fragments are sorted alphabetically by filename and processed in order. Files directly under `workflow-fragments/` (not in a subfolder) are ignored.
934
+
935
+ ### Fragment Template
936
+
937
+ ```json
938
+ {
939
+ "name": "ORDER::<SUBTYPE>",
940
+ "entityType": "ORDER",
941
+ "entitySubtype": "<SUBTYPE>",
942
+ "rulesets": [
943
+ {
944
+ "name": "<RULESET_NAME>",
945
+ "type": "ORDER",
946
+ "mergeStrategy": "merge",
947
+ "rules": [
948
+ {
949
+ "name": "[[account.id]].<module>.<RuleName>",
950
+ "mergeStrategy": "merge",
951
+ "index": 0,
952
+ "props": {
953
+ "yourProp": "<value>"
954
+ }
955
+ }
956
+ ],
957
+ "triggers": [{ "status": "CREATED" }],
958
+ "userActions": []
959
+ }
960
+ ]
961
+ }
962
+ ```
963
+
964
+ ---
965
+
966
+ ## Troubleshooting Quick Reference
967
+
968
+ Top error messages from the Fluent CLI with causes and fixes.
969
+
970
+ ### Critical Errors
971
+
972
+ | Error | Cause | Fix |
973
+ |-------|-------|-----|
974
+ | `Auth failed: 401 for <email>` | Invalid credentials or expired password | Update password: `fluent profile update <profile> --username <user> --password <new-pass>`. Purge sessions: `fluent profile purge-sessions`. |
975
+ | `Module dependency '<module>' not installed` | Required module not present on account | Install dependencies in order: `core` -> `fulfilment` -> `order` -> `inventory` -> custom. Check `module.json` dependencies. |
976
+ | `Invalid Module: core - a valid module should contain: assets folder, module.json file` | Module structure invalid or corrupt | Verify with `fluent module describe <module>`. Ensure `resources/module.json` and `resources/assets/` exist. |
977
+ | `Request timeout` / `connect ETIMEDOUT` | Network timeout or API unavailable | Check network connectivity. Verify API endpoint is reachable. Retry command. Use `--wait` to increase delays. |
978
+
979
+ ### High Priority Errors
980
+
981
+ | Error | Cause | Fix |
982
+ |-------|-------|-----|
983
+ | `Module not found: <module>` | Wrong module name or path | For reference modules use exact names: `core`, `fulfilment`, `order`. For local modules verify the path exists. |
984
+ | `Profile '<name>' not found` | Profile does not exist | List profiles: `fluent profile list`. Create: `fluent profile create <name> ...`. |
985
+ | `Retailer configuration is required but was not provided` | Missing `--retailer` flag or active context | Set active retailer: `fluent profile use <profile> --retailer <ref>`. Or add `--retailer <ref>` to the command. |
986
+ | `Token '<placeholder>' not resolved` | Missing variable in config file | Run `fluent module config <module> -p <profile> -r <retailer>` to regenerate config. Fill all `[[...]]` placeholders before install. |
987
+ | `Missing required option: --id` / `--email` | Required parameter omitted | Check command help: `fluent <command> --help`. Add the required flag. |
988
+
989
+ ### Medium Priority Errors
990
+
991
+ | Error | Cause | Fix |
992
+ |-------|-------|-----|
993
+ | `Setting '<name>' not found` | Setting does not exist or wrong name | List settings with wildcard: `fluent setting list -p <profile> -r <retailer> --name '%<pattern>%'`. Check spelling and context. |
994
+ | `Workflow '<name>' already exists` | Workflow conflict during install | Use `--exclude workflows` to skip, or `--force` to overwrite. |
995
+ | `Invalid workflow definition` | Workflow JSON has structural errors | Validate JSON syntax. Check required fields: `name`, `entityType`, `statuses`, `rulesets`. |
996
+ | `Workflow '<name>' not found` | Workflow does not exist in retailer | List workflows: `fluent workflow list -p <profile> -r <retailer>`. Verify spelling. |
997
+ | `Fragment workflow file does not exist` | Fragment file path invalid | Verify the file exists at the specified path. Use absolute or correct relative path. |
998
+
999
+ ### Low Priority Warnings
1000
+
1001
+ | Error | Cause | Fix |
1002
+ |-------|-------|-----|
1003
+ | `Command not found: fluent` | CLI not in PATH or not installed | Verify: `npm list -g fluent-cli`. Reinstall if needed. Check PATH includes npm global bin directory. |
1004
+ | `No active profile set` | No profile selected | Set active: `fluent profile use <profile> --retailer <retailer>`. |
1005
+ | `Module config file not found` | Config file missing or wrong name | Generate: `fluent module config <module> -p <profile> -r <retailer>`. Expected name: `module.config.<retailer>.<module>.json`. |
1006
+ | `Workflow log position '<pos>' not found` | Invalid log entry position | List logs: `fluent workflowlog describe <workflow> -p <profile> -r <retailer>`. Positions are 0-based. |
1007
+
1008
+ ### Quick Diagnostic Commands
1009
+
1010
+ ```bash
1011
+ fluent --version # Verify CLI installed
1012
+ fluent profile active # Check active profile/retailer
1013
+ fluent profile purge-sessions # Clear cached tokens (fixes many auth issues)
1014
+ fluent --debug <command> # Enable verbose debug output
1015
+ fluent module describe <module-path> # Validate module structure
1016
+ fluent module list -p <profile> # Check installed modules on account
1017
+ ```
1018
+
1019
+ ---
1020
+
1021
+ ## Quick Reference Card
1022
+
1023
+ ```
1024
+ fluent profile create|list|active|use|clear|update|export|purge-sessions|retailers
1025
+ fluent module config|create|describe|install|list
1026
+ fluent retailer create|list
1027
+ fluent setting get|list
1028
+ fluent workflow download|list|merge
1029
+ fluent workflowlog delete|describe|insert|list
1030
+ fluent mcp server
1031
+ ```