@fluentcommerce/ai-skills 0.2.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 -616
- 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 -190
- 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 -623
- 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 +181 -17
- 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 -76
- package/content/dev/agents/fluent-dev/agent.json +24 -2
- package/content/dev/agents/fluent-dev.md +194 -524
- 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 -170
- 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 +731 -0
- 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 +40 -11
- package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -221
- 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 +134 -3
- 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 -1090
- package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1120
- package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -394
- 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 +151 -2
- package/content/dev/skills/fluent-source-onboard/SKILL.md +23 -4
- package/content/dev/skills/fluent-sourcing/SKILL.md +14 -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 -471
- package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +22 -1
- package/content/dev/skills/fluent-version-manage/SKILL.md +44 -3
- package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
- package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -326
- package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -0
- package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
- package/content/mcp-extn/agents/fluent-mcp.md +133 -132
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -800
- 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 -73
- 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 +906 -50
- package/metadata.json +184 -155
- package/package.json +7 -2
- package/docs/USE_CASES.pdf +0 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fluent-workflow-deploy
|
|
3
|
+
description: Strict anti-hallucination workflow deployment protocol. Uses verified Fluent CLI capabilities, hard preflight gates, and explicit fallback upload paths. Triggers on "deploy workflow", "upload workflow", "push workflow", "workflow deploy".
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
+
argument-hint: <workflow-file> [--profile <name>] [--retailer <ref>] [--dry-run]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Workflow Deployer (Strict)
|
|
10
|
+
|
|
11
|
+
Deploy Fluent Commerce workflow definitions with a verification-first protocol that prevents invented commands and enforces safe upload behavior.
|
|
12
|
+
|
|
13
|
+
## CRITICAL: No `fluent workflow upload` Command
|
|
14
|
+
|
|
15
|
+
The Fluent CLI has **NO `workflow upload` command**. The only workflow subcommands are:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
fluent workflow download # Download workflow JSON
|
|
19
|
+
fluent workflow list # List workflows for a retailer
|
|
20
|
+
fluent workflow merge # Merge fragment into workflow (auto-uploads, buggy)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**To upload a workflow via CLI, you MUST use `fluent module install`** — package the workflow JSON into a temporary module directory and install it. This is not a workaround; it is the designed mechanism. See [Strategy 1](#strategy-1-primary-cli-fluent-module-install) below.
|
|
24
|
+
|
|
25
|
+
## Pre-flight: Feedback Check
|
|
26
|
+
|
|
27
|
+
Before starting, check for past learnings from this skill:
|
|
28
|
+
|
|
29
|
+
1. Check if `accounts/<PROFILE>/feedback/fluent-workflow-deploy.jsonl` exists
|
|
30
|
+
2. If yes, read last 20 records
|
|
31
|
+
3. Filter to: same entity type/subtype if known, FAILURE or USER_CORRECTED outcomes, confidence = CONFIRMED or PROMOTED
|
|
32
|
+
4. Extract top 3 relevant learnings — use as internal "WATCH OUT" guidance during execution
|
|
33
|
+
5. Do NOT show raw feedback to the user — silently adjust approach based on past issues
|
|
34
|
+
|
|
35
|
+
## Non-Negotiable Guardrails
|
|
36
|
+
|
|
37
|
+
1. Never invent workflow CLI commands or flags.
|
|
38
|
+
2. Never claim `fluent workflow upload` exists.
|
|
39
|
+
3. Hard-forbidden commands:
|
|
40
|
+
- `fluent workflow upload`
|
|
41
|
+
- `fluent workflow deploy`
|
|
42
|
+
- `fluent workflow push`
|
|
43
|
+
- `fluent workflow apply`
|
|
44
|
+
4. If custom rules in the workflow are not present in `plugin.list`, stop deployment and deploy the module first.
|
|
45
|
+
5. If `fluent workflow merge` fails with `token:undefined`, do not retry blindly; use fallback upload strategy.
|
|
46
|
+
|
|
47
|
+
## Planning Gate
|
|
48
|
+
|
|
49
|
+
### Pre-flight: Plan Verification
|
|
50
|
+
|
|
51
|
+
1. **Search** `accounts/<PROFILE>/plans/` for a plan file with `Status: APPROVED` that covers this workflow deployment
|
|
52
|
+
2. If an approved plan exists -> reference it and proceed to deployment steps
|
|
53
|
+
3. If no approved plan exists -> write a new plan below
|
|
54
|
+
|
|
55
|
+
**Before deploying any workflow, write a plan using the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill.**
|
|
56
|
+
|
|
57
|
+
**Workflow-deploy specific emphasis -- ensure these are covered:**
|
|
58
|
+
|
|
59
|
+
1. **Business Context (Section 1)** -- what change this workflow update delivers
|
|
60
|
+
2. **Scope (Section 2)** -- workflow name (e.g., `ORDER::HD`), current version -> new version
|
|
61
|
+
3. **Rulesets (Section 6)** -- new/modified/removed rulesets with Source classification
|
|
62
|
+
4. **Rules Inventory (Section 7)** -- confirm all referenced rules exist in `plugin.list`
|
|
63
|
+
5. **Deployment Sequence (Section 17)** -- module deploy BEFORE workflow deploy if new custom rules are referenced
|
|
64
|
+
6. **Rollback Plan (Section 18)** -- previous workflow version to restore
|
|
65
|
+
|
|
66
|
+
**Write the plan to:** `accounts/<PROFILE>/plans/<YYYY-MM-DD>-workflow-deploy-<slug>.md`. Set `Status: PENDING`.
|
|
67
|
+
|
|
68
|
+
Present the full plan content to the user and wait for approval before uploading. On approval, update the file to `Status: APPROVED`. If the user says "just do it", proceed directly (still write the file for audit trail).
|
|
69
|
+
|
|
70
|
+
## Ownership Boundary
|
|
71
|
+
|
|
72
|
+
This skill owns the deployment execution pipeline (validate -> upload -> verify -> rollback).
|
|
73
|
+
|
|
74
|
+
Workflow structure and editing are owned by `/fluent-workflow-builder`.
|
|
75
|
+
Workflow listing and download are owned by `/fluent-workflow`.
|
|
76
|
+
Workflow analysis is owned by `/fluent-workflow-analyzer`.
|
|
77
|
+
|
|
78
|
+
## Module-First Deployment — Check Before Using This Skill
|
|
79
|
+
|
|
80
|
+
**If the workflow is part of a module** (exists in `resources/workflows/` within a module directory), deploy the entire module via `/fluent-module-deploy` using `fluent module install` instead. Module install deploys workflows, settings, and rules as a single atomic unit with proper versioning.
|
|
81
|
+
|
|
82
|
+
**Use this skill only for standalone workflow uploads** — workflows not bundled in a module, hotfixes to individual workflows, or when module install is not applicable.
|
|
83
|
+
|
|
84
|
+
| Scenario | Correct Approach |
|
|
85
|
+
|----------|-----------------|
|
|
86
|
+
| Workflow is in `resources/workflows/` of a module | `/fluent-module-deploy` → `fluent module install` |
|
|
87
|
+
| Workflow changed along with Java rules | `/fluent-build` → `/fluent-module-deploy` (module bundles everything) |
|
|
88
|
+
| Standalone workflow JSON not in any module | This skill (`/fluent-workflow-deploy`) |
|
|
89
|
+
| Hotfix to a single workflow in production | This skill (targeted upload) |
|
|
90
|
+
| Module install excluded workflows (`--exclude workflows`) | This skill (deploy workflows separately) |
|
|
91
|
+
|
|
92
|
+
## Handoff Protocol
|
|
93
|
+
|
|
94
|
+
### Signals emitted by this skill
|
|
95
|
+
|
|
96
|
+
| Signal | Condition | Example |
|
|
97
|
+
|--------|-----------|---------|
|
|
98
|
+
| `-> READY: <path>` | Workflow deployed successfully | `-> READY: Workflow ORDER::HD v12 deployed to HM_TEST` |
|
|
99
|
+
| `-> NEXT: /fluent-<skill>` | Ready for E2E testing | `-> NEXT: /fluent-e2e-test` |
|
|
100
|
+
| `-> BLOCKED: <reason>` | Deployment blocked | `-> BLOCKED: DEPLOYMENT_BLOCKED — Pre-deploy check verdict is BLOCKED` |
|
|
101
|
+
| `-> SKIP: <reason>` | Workflow already at target version | `-> SKIP: Workflow ORDER::HD already at v12` |
|
|
102
|
+
|
|
103
|
+
### Error codes
|
|
104
|
+
|
|
105
|
+
| Code | Condition | Recovery |
|
|
106
|
+
|------|-----------|----------|
|
|
107
|
+
| `PLAN_REQUIRED` | Deployment attempted without approved plan | Run `/fluent-feature-plan` first |
|
|
108
|
+
| `DEPLOYMENT_BLOCKED` | Pre-deploy check BLOCKED or rule references missing | Resolve blocking gates or deploy module first |
|
|
109
|
+
| `PREREQ_MISSING` | No pre-deploy report or rule not registered | Run `/fluent-pre-deploy-check`; deploy module via `/fluent-module-deploy` |
|
|
110
|
+
| `ENV_UNREACHABLE` | Cannot connect to Fluent environment | Check credentials via `config.validate` |
|
|
111
|
+
|
|
112
|
+
## When to Use
|
|
113
|
+
|
|
114
|
+
- Uploading a standalone workflow definition not bundled in a module
|
|
115
|
+
- Deploying after `fluent workflow merge` fails to upload (known `token:undefined` bug)
|
|
116
|
+
- Deploying workflows excluded during module install (`--exclude workflows`)
|
|
117
|
+
- Automating workflow deployment in CI/CD pipelines
|
|
118
|
+
- Rolling back to a previous workflow version
|
|
119
|
+
|
|
120
|
+
## Deployment Pipeline
|
|
121
|
+
|
|
122
|
+
### Step 0: Verify CLI Truth Source
|
|
123
|
+
|
|
124
|
+
Run these commands before any deployment action:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
fluent --version
|
|
128
|
+
fluent workflow --help
|
|
129
|
+
fluent workflow merge --help
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Use only verified subcommands from `fluent workflow --help`:
|
|
133
|
+
|
|
134
|
+
- `fluent workflow list`
|
|
135
|
+
- `fluent workflow download`
|
|
136
|
+
- `fluent workflow merge`
|
|
137
|
+
|
|
138
|
+
If CLI is not found, fall back to MCP `workflow.upload` or REST API (Strategy 2/3).
|
|
139
|
+
|
|
140
|
+
If a requested command is not shown in the help output, treat it as invalid and stop.
|
|
141
|
+
|
|
142
|
+
### Step 1: Pre-flight Checks
|
|
143
|
+
|
|
144
|
+
Before uploading, validate:
|
|
145
|
+
|
|
146
|
+
1. **Read the workflow JSON file** -- confirm it parses as valid JSON
|
|
147
|
+
2. **Verify required fields:** `name`, `retailerId`, `rulesets`, `statuses`
|
|
148
|
+
3. **Query current deployed version:**
|
|
149
|
+
```bash
|
|
150
|
+
fluent workflow list -p <profile> -r <retailer>
|
|
151
|
+
```
|
|
152
|
+
4. **Confirm new version > current version** (warn if same/lower)
|
|
153
|
+
5. **Validate JSON structure** (use `/fluent-workflow-builder` validation checklist)
|
|
154
|
+
6. **Check rule references** -- every rule in `rulesets[].rules[].name` should exist in `plugin.list`. If any are missing, **STOP** and advise deploying the module first.
|
|
155
|
+
|
|
156
|
+
### Step 1.5: Pre-Deploy Check Gate
|
|
157
|
+
|
|
158
|
+
**This gate is MANDATORY. Do not skip.**
|
|
159
|
+
|
|
160
|
+
1. Search `accounts/<PROFILE>/analysis/pre-deploy/` for `<MODULE>-<VERSION>.checklist.json`.
|
|
161
|
+
2. **If found and `overallResult == "BLOCKED"`**: **STOP. Do NOT proceed.** List all blocking gates from the report. Require explicit user override ("deploy anyway") to continue past a BLOCKED verdict.
|
|
162
|
+
3. **If found and `overallResult == "READY"`**: Proceed -- pre-deploy validation passed.
|
|
163
|
+
4. **If no report found**: WARN the user: "No pre-deploy-check report found for this module version. Run `/fluent-pre-deploy-check` first for comprehensive validation." Only proceed after explicit user confirmation ("deploy without validation").
|
|
164
|
+
|
|
165
|
+
### Step 2: Upload (Strategy Selection)
|
|
166
|
+
|
|
167
|
+
Try upload strategies in order. **Always use Strategy 1 when the CLI is available.**
|
|
168
|
+
|
|
169
|
+
#### Strategy 1 (Primary): CLI `fluent module install`
|
|
170
|
+
|
|
171
|
+
**This is the correct and reliable way to upload workflows via CLI.** The Fluent CLI has no `workflow upload` command -- you package the workflow into a temporary module directory and install it.
|
|
172
|
+
|
|
173
|
+
**Step-by-step procedure:**
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# 1. Create temporary module directory (NO resources/ prefix -- CLI rejects it)
|
|
177
|
+
DEPLOY_DIR=$(mktemp -d)
|
|
178
|
+
mkdir -p "$DEPLOY_DIR/assets/workflows"
|
|
179
|
+
|
|
180
|
+
# 2. Copy workflow JSON (CLI converts __ to :: in workflow name automatically)
|
|
181
|
+
cp <workflow-file>.json "$DEPLOY_DIR/assets/workflows/"
|
|
182
|
+
|
|
183
|
+
# 3. Create minimal module.json at module ROOT (REQUIRED)
|
|
184
|
+
echo '{"_schema":"1.0.0","name":"workflow-deploy-tmp","version":"1.0.0"}' > "$DEPLOY_DIR/module.json"
|
|
185
|
+
|
|
186
|
+
# 4. Create empty module.config.json at module ROOT (REQUIRED)
|
|
187
|
+
echo '{}' > "$DEPLOY_DIR/module.config.json"
|
|
188
|
+
|
|
189
|
+
# 5. Deploy -- ONLY workflows, with --force to bypass version check
|
|
190
|
+
fluent module install "$DEPLOY_DIR" \
|
|
191
|
+
-p <profile> \
|
|
192
|
+
-r <retailer> \
|
|
193
|
+
--include workflows \
|
|
194
|
+
--force
|
|
195
|
+
|
|
196
|
+
# 6. Clean up
|
|
197
|
+
rm -rf "$DEPLOY_DIR"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**With config token resolution** (for workflows with `[[token.name]]` placeholders):
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
fluent module install "$DEPLOY_DIR" \
|
|
204
|
+
-p <profile> \
|
|
205
|
+
-r <retailer> \
|
|
206
|
+
--config <path-to-module.config.json> \
|
|
207
|
+
--include workflows \
|
|
208
|
+
--force
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Key flags:**
|
|
212
|
+
- `--include workflows` -- installs ONLY workflows from the module, skips everything else
|
|
213
|
+
- `--force` -- bypasses version check (temp modules always use version `1.0.0`)
|
|
214
|
+
- `--config` -- resolves `[[token]]` placeholders in workflow JSON before upload
|
|
215
|
+
|
|
216
|
+
**Module directory structure (verified against CLI v2.0.0 -- must be exact):**
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
<deploy-dir>/
|
|
220
|
+
├── module.json # {"_schema":"1.0.0","name":"<any>","version":"1.0.0"}
|
|
221
|
+
├── module.config.json # {} (or token values if using --config)
|
|
222
|
+
└── assets/
|
|
223
|
+
└── workflows/
|
|
224
|
+
└── <WORKFLOW>.json # The workflow JSON to upload
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**CRITICAL:** Do NOT use a `resources/` wrapper directory. The CLI validates that `assets/`, `module.json`, and `module.config.json` exist at the module root directory. A `resources/` prefix causes `Invalid Module` error.
|
|
228
|
+
|
|
229
|
+
**IMPORTANT notes:**
|
|
230
|
+
- The CLI converts `__` in filenames to `::` for the workflow name (e.g., `ORDER__HD.json` becomes workflow `ORDER::HD`)
|
|
231
|
+
- The `--force` flag is required because the temp module always uses version `1.0.0`
|
|
232
|
+
- Multiple workflows can be placed in `assets/workflows/` to deploy several at once
|
|
233
|
+
- The `module.json` `name` field can be anything -- it is a throwaway wrapper
|
|
234
|
+
- Config tokens (`[[key]]`) are resolved by `--config` at deploy time, NOT stored in the uploaded workflow
|
|
235
|
+
|
|
236
|
+
#### Strategy 2 (Fallback): MCP `workflow.upload` Tool
|
|
237
|
+
|
|
238
|
+
If CLI is unavailable, use the MCP extension tool. This calls REST API `POST /api/v4.1/workflow/{retailerId}`:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
workflow.upload({
|
|
242
|
+
workflow: <workflow-json-object>,
|
|
243
|
+
dryRun: true, // Validate without deploying
|
|
244
|
+
validate: true // Run structure checks
|
|
245
|
+
})
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
1. First run with `dryRun: true` to validate
|
|
249
|
+
2. If validation passes, run with `dryRun: false` to deploy
|
|
250
|
+
3. Response includes the new version number
|
|
251
|
+
|
|
252
|
+
**Advantages:** Built-in validation, dryRun mode, no temp directory needed.
|
|
253
|
+
|
|
254
|
+
**When this fails:** MCP server not configured, connection issues, or SDK client lacks `request()` method.
|
|
255
|
+
|
|
256
|
+
#### Strategy 3 (Last Resort): REST API Direct Upload
|
|
257
|
+
|
|
258
|
+
If both CLI and MCP are unavailable:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Extract credentials from CLI profile
|
|
262
|
+
PROFILE_DIR="$HOME/.fluentcommerce/<profile>"
|
|
263
|
+
BASE_URL=$(python3 -c "import json; print(json.load(open('$PROFILE_DIR/profile.json'))['baseUrl'])")
|
|
264
|
+
CLIENT_SECRET=$(python3 -c "import json; print(json.load(open('$PROFILE_DIR/profile.json'))['clientSecret'])")
|
|
265
|
+
ACCOUNT_ID=$(python3 -c "import json; print(json.load(open('$PROFILE_DIR/profile.json'))['id'])")
|
|
266
|
+
|
|
267
|
+
# Get retailer credentials
|
|
268
|
+
RETAILER_FILE="$PROFILE_DIR/retailer.<retailer-ref>.json"
|
|
269
|
+
USERNAME=$(python3 -c "import json; d=json.load(open('$RETAILER_FILE')); print(d['defaultUser']['username'])")
|
|
270
|
+
PASSWORD=$(python3 -c "import json; d=json.load(open('$RETAILER_FILE')); print(d['defaultUser']['password'])")
|
|
271
|
+
|
|
272
|
+
# Authenticate (retailer-scoped token required -- account-level tokens return 403)
|
|
273
|
+
TOKEN=$(curl -s -X POST "$BASE_URL/oauth/token" \
|
|
274
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
275
|
+
-d "username=$USERNAME&password=$PASSWORD&client_id=$ACCOUNT_ID&client_secret=$CLIENT_SECRET&grant_type=password&scope=api" \
|
|
276
|
+
| python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
|
|
277
|
+
|
|
278
|
+
# Upload via POST (not PUT)
|
|
279
|
+
curl -s -X POST "$BASE_URL/api/v4.1/workflow/<retailerId>" \
|
|
280
|
+
-H "Content-Type: application/json" \
|
|
281
|
+
-H "Authorization: Bearer $TOKEN" \
|
|
282
|
+
-H "fluent.account: $ACCOUNT_ID" \
|
|
283
|
+
-d @<workflow-file>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Success response:**
|
|
287
|
+
```json
|
|
288
|
+
{
|
|
289
|
+
"entityId": "2-ORDER::HD::1.51",
|
|
290
|
+
"eventStatus": "COMPLETE"
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Error responses:**
|
|
295
|
+
|
|
296
|
+
| HTTP Code | Cause | Fix |
|
|
297
|
+
|-----------|-------|-----|
|
|
298
|
+
| 401 | Token expired or invalid | Re-authenticate |
|
|
299
|
+
| 403 | Account-level token, not retailer-scoped | Use retailer user credentials |
|
|
300
|
+
| 400 | Invalid workflow JSON | Check structure with `/fluent-workflow-builder` |
|
|
301
|
+
| 409 | Version conflict | Bump version number |
|
|
302
|
+
| 500 | Server error | Retry after 5 seconds |
|
|
303
|
+
|
|
304
|
+
#### NOT a Strategy: `fluent workflow merge`
|
|
305
|
+
|
|
306
|
+
`fluent workflow merge` is for merging fragments, NOT for standalone upload:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
fluent workflow merge <fragment> <target-workflow-name> -p <profile> -r <retailer>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
It merges the fragment into the target and then auto-uploads. Known issues:
|
|
313
|
+
- `token:undefined` bug causes the upload step to fail silently
|
|
314
|
+
- Cannot upload a standalone workflow -- it always requires a fragment AND a target
|
|
315
|
+
- If the merge succeeds but upload fails, the merged file is saved locally as `<filename>.merged.json` -- re-upload via Strategy 1 or 2
|
|
316
|
+
|
|
317
|
+
**Do NOT use `fluent workflow merge` as a workflow upload mechanism.**
|
|
318
|
+
|
|
319
|
+
### Step 3: Verify Deployment
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
fluent workflow list -p <profile> -r <retailer>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Confirm the version number matches the uploaded version.
|
|
326
|
+
|
|
327
|
+
Additionally, download and diff to confirm content:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
fluent workflow download -p <profile> -r <retailer> -w <name> -o /tmp/
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Compare ruleset count and status count between uploaded and downloaded versions.
|
|
334
|
+
|
|
335
|
+
### Step 4: Post-Deploy Validation (Optional)
|
|
336
|
+
|
|
337
|
+
Send a test event to verify the workflow processes correctly:
|
|
338
|
+
|
|
339
|
+
1. Find or create a test entity in a suitable status
|
|
340
|
+
2. `event.build` -- preview the test event payload
|
|
341
|
+
3. `event.send` (dryRun: true) -- validate without sending
|
|
342
|
+
4. `event.send` (dryRun: false) -- send real event
|
|
343
|
+
5. `event.list` -- confirm event processed (eventStatus: COMPLETE/SUCCESS)
|
|
344
|
+
6. `graphql.query` -- verify entity status changed as expected
|
|
345
|
+
|
|
346
|
+
Use `/fluent-e2e-test` for comprehensive post-deploy testing.
|
|
347
|
+
|
|
348
|
+
## Module Dependency Check
|
|
349
|
+
|
|
350
|
+
**Critical:** If the workflow references custom rules (rules with `<ACCOUNT>.<context>.<RuleName>` pattern rather than `FLUENTRETAIL.*`), verify the module containing those rules is deployed:
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
plugin.list({ name: "<RuleName>" })
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
If any referenced rule is not found in the registry, the module must be deployed first via `/fluent-module-deploy`. Deploying a workflow that references unregistered rules causes NO_MATCH events at runtime.
|
|
357
|
+
|
|
358
|
+
**Recommended deployment order:**
|
|
359
|
+
1. Deploy module (registers rules) -- `/fluent-module-deploy`
|
|
360
|
+
2. Deploy workflows (references rules) -- `/fluent-workflow-deploy`
|
|
361
|
+
3. Create/update settings (referenced by rules) -- `/fluent-settings`
|
|
362
|
+
4. Run E2E test -- `/fluent-e2e-test`
|
|
363
|
+
|
|
364
|
+
## Dry Run Mode
|
|
365
|
+
|
|
366
|
+
With `--dry-run`, the deployer performs all steps except the actual upload:
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
1. Parse and validate workflow JSON done
|
|
370
|
+
2. Check current deployed version done
|
|
371
|
+
3. Verify version bump done
|
|
372
|
+
4. Check rule references exist done
|
|
373
|
+
5. Upload workflow SKIPPED
|
|
374
|
+
6. Report what WOULD be deployed
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
## Rollback
|
|
378
|
+
|
|
379
|
+
To rollback to a previous version:
|
|
380
|
+
|
|
381
|
+
1. Download the previous version:
|
|
382
|
+
```bash
|
|
383
|
+
fluent workflow download -p <profile> -r <retailer> -w <name> -o /tmp/
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
2. Edit the downloaded JSON to bump the version number (must be higher than current)
|
|
387
|
+
3. Upload via Strategy 1 (CLI `fluent module install`) or Strategy 2 (MCP `workflow.upload`)
|
|
388
|
+
|
|
389
|
+
Note: Fluent does not support downgrading version numbers. To "rollback," you upload the old content with a new (higher) version number.
|
|
390
|
+
|
|
391
|
+
For failed deployments that need reversal, follow the rollback steps above (download previous content, bump version, re-upload).
|
|
392
|
+
|
|
393
|
+
## CI/CD Workflow Deployment
|
|
394
|
+
|
|
395
|
+
In CI/CD pipelines, the assembly pattern is the standard approach:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
# Build a per-retailer temp module from source workflows
|
|
399
|
+
DEPLOY="/tmp/deploy-$RETAILER"
|
|
400
|
+
mkdir -p "$DEPLOY/assets/workflows"
|
|
401
|
+
cp workflows/*.json "$DEPLOY/assets/workflows/"
|
|
402
|
+
echo '{"_schema":"1.0.0","name":"workflow-deploy","version":"1.0.0"}' > "$DEPLOY/module.json"
|
|
403
|
+
echo '{}' > "$DEPLOY/module.config.json"
|
|
404
|
+
|
|
405
|
+
fluent module install "$DEPLOY" \
|
|
406
|
+
-p deploy \
|
|
407
|
+
-r "$RETAILER" \
|
|
408
|
+
--config "$CONFIG_FILE" \
|
|
409
|
+
--include workflows \
|
|
410
|
+
--force
|
|
411
|
+
|
|
412
|
+
rm -rf "$DEPLOY"
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
See the CI/CD documentation for wave-based rollout patterns with `--config` token resolution for per-country workflow variants.
|
|
416
|
+
|
|
417
|
+
## Integration with Other Skills
|
|
418
|
+
|
|
419
|
+
| Task | Skill |
|
|
420
|
+
|------|-------|
|
|
421
|
+
| Analyze workflow before deploying | `/fluent-workflow-analyzer` |
|
|
422
|
+
| Edit workflow JSON | `/fluent-workflow-builder` |
|
|
423
|
+
| Download current workflow | `/fluent-workflow` |
|
|
424
|
+
| Deploy module (rules must exist first) | `/fluent-module-deploy` |
|
|
425
|
+
| Pre-deployment validation | `/fluent-pre-deploy-check` |
|
|
426
|
+
| Test after deployment | `/fluent-e2e-test` |
|
|
427
|
+
| Debug deployment failures | `/fluent-trace` |
|
|
428
|
+
| Revert failed deployment | Manual rollback via this skill's rollback steps |
|
|
429
|
+
|
|
430
|
+
## Session Tracking
|
|
431
|
+
|
|
432
|
+
When invoked, log the following to the session tracking protocol (consumed by `/fluent-session-summary` and `/fluent-session-audit-export`):
|
|
433
|
+
|
|
434
|
+
**On entry:**
|
|
435
|
+
```json
|
|
436
|
+
{ "skill": "<this-skill-name>", "timestamp": "<ISO-8601>", "arguments": { "<key>": "<value>", "...": "..." } }
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**On exit:**
|
|
440
|
+
```json
|
|
441
|
+
{ "skill": "<this-skill-name>", "outcome": "<completed|failed|skipped>", "changesProduced": ["<seq-numbers>"], "toolCallsProduced": ["<seq-numbers>"], "nextRecommended": "<from-handoff-section>" }
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
All MCP tool calls made during execution should include `"skill": "<this-skill-name>"` in their tracking record for attribution.
|
|
445
|
+
|
|
446
|
+
## Tips
|
|
447
|
+
|
|
448
|
+
- **Always backup the current version** before deploying -- download with `fluent workflow download`
|
|
449
|
+
- **Version must always increase** -- Fluent rejects same or lower version numbers
|
|
450
|
+
- **Use retailer-scoped tokens** for REST API -- Account-level tokens get 403 on workflow API
|
|
451
|
+
- **Check the `eventStatus`** in the upload response -- `COMPLETE` means success
|
|
452
|
+
- **The `entityId` in the response** follows format `<retailerId>-<workflowName>::<version>`
|
|
453
|
+
- **Deploy module before workflow** if the workflow references new custom rules
|
|
454
|
+
- **Windows users**: Colons in workflow names (e.g., `ORDER::HD`) crash file downloads on Windows -- use WSL or Linux
|
|
455
|
+
- **There is NO `fluent workflow upload` command** -- use `fluent module install --include workflows --force` instead
|
|
456
|
+
|
|
457
|
+
## Post-Execution: Feedback Capture
|
|
458
|
+
|
|
459
|
+
After completing this skill (whether success or failure), write a feedback record:
|
|
460
|
+
|
|
461
|
+
1. **Classify outcome:** `SUCCESS` (deployed), `PARTIAL_SUCCESS` (deployed after retry), `FAILURE` (deploy failed), `BLOCKED` (pre-deploy check failed), `USER_CORRECTED` (user overrode deploy method)
|
|
462
|
+
2. **Build record:** Create a `feedback-record-v1` JSON object with:
|
|
463
|
+
- `skill`: `"fluent-workflow-deploy"`
|
|
464
|
+
- `feature`: feature slug if applicable
|
|
465
|
+
- `entityType` / `entitySubtype`: from the deployed workflow
|
|
466
|
+
- `phases`: trace of each phase (pre-flight, backup, validate, deploy, verify) with PASS/FAIL/SKIP
|
|
467
|
+
- `learnings`: any gotchas discovered (version conflicts, REST method issues, auth failures)
|
|
468
|
+
- `userCorrections`: any corrections the user provided
|
|
469
|
+
3. **Redact secrets:** Strip tokens, auth headers. Keep workflow names, versions, retailer refs.
|
|
470
|
+
4. **Append** one JSON line to `accounts/<PROFILE>/feedback/fluent-workflow-deploy.jsonl`
|
|
471
|
+
5. **Update** `accounts/<PROFILE>/feedback/index.json` counters (create with `mkdir -p` if missing)
|
|
472
|
+
|
|
473
|
+
**Skip capture if:** Dry-run mode was used (no actual deployment happened).
|
|
474
|
+
|
|
475
|
+
## Known Pitfalls
|
|
476
|
+
<!-- feedback-promoted: managed section, updated by feedback loop -->
|
|
477
|
+
|
|
478
|
+
_(No promoted learnings yet.)_
|
|
479
|
+
|
|
480
|
+
<!-- end feedback-promoted -->
|