@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
@@ -0,0 +1,387 @@
1
+ ---
2
+ name: fluent-rollback
3
+ description: Roll back workflow and module deployments in Fluent Commerce. Supports workflow version revert, module redeploy of prior versions, and settings restore from audit trail. Triggers on "rollback", "revert deployment", "undo deploy", "roll back workflow", "restore previous version".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ argument-hint: <workflow|module|settings> <name> [--profile PROFILE] [--retailer RETAILER_REF] [--to-version VERSION] [--dry-run]
7
+ ---
8
+
9
+ # Deployment Rollback
10
+
11
+ Roll back workflow, module, or settings deployments to a prior known-good state. This skill complements the forward deployment chain (`/fluent-module-deploy`, `/fluent-workflow-deploy`) by providing a safe, audited path backward when deployments cause issues.
12
+
13
+ ## Ownership Boundary
14
+
15
+ This skill owns: rollback planning, pre-rollback backup, rollback execution, post-rollback verification, and rollback report generation.
16
+
17
+ Other skills own: forward deployments (`/fluent-module-deploy`, `/fluent-workflow-deploy`), session tracking (`/fluent-session-summary`), E2E verification (`/fluent-e2e-test`).
18
+
19
+ ## When to Use
20
+
21
+ - A workflow deployment introduced a regression (orders stuck, events failing)
22
+ - A module deployment broke existing functionality
23
+ - Settings changes caused unexpected behavior (webhooks failing, wrong thresholds)
24
+ - E2E tests fail post-deployment and the change must be undone
25
+ - Rolling back to a known-good state while investigating root cause
26
+
27
+ ## Planning Gate
28
+
29
+ **YES -- mandatory.** Rollback is a high-impact write operation. The rollback plan MUST be presented to the user and explicitly approved before any changes are made.
30
+
31
+ ### Approval Flow
32
+
33
+ ```
34
+ 1. Pre-flight assessment (read-only)
35
+ 2. Build rollback plan
36
+ 3. Present plan to user -> WAIT FOR APPROVAL
37
+ 4. User says "approved" / "go ahead" / "roll back"
38
+ 5. Execute rollback steps in order
39
+ 6. Verify each step
40
+ 7. Generate rollback report
41
+ ```
42
+
43
+ **NEVER auto-execute a rollback without explicit user confirmation.**
44
+
45
+ ## Inputs
46
+
47
+ | Parameter | Required | Default | Description |
48
+ |-----------|----------|---------|-------------|
49
+ | `<type>` | Yes | -- | Artifact type: `workflow`, `module`, or `settings` |
50
+ | `<name>` | Yes | -- | Artifact name (e.g., `ORDER::HD`, `fc-module-extensions`, `webhook.order.url`) |
51
+ | `--profile` | No | Active CLI profile | Fluent CLI profile |
52
+ | `--retailer` | No | Profile default | Target retailer ref |
53
+ | `--to-version` | No | Previous version | Target rollback version |
54
+ | `--dry-run` | No | `false` | Show rollback plan without executing |
55
+
56
+ ## Pre-flight Checks
57
+
58
+ Before building the rollback plan:
59
+
60
+ ### Step 1: Identify What Was Deployed
61
+
62
+ Check these locations for deployment evidence:
63
+
64
+ 1. **Pre-deploy report:** `accounts/<PROFILE>/reports/pre-deploy/` -- most recent check output
65
+ 2. **Build report:** `accounts/<PROFILE>/reports/build/` -- module version and artifacts
66
+ 3. **Session log:** Current session change tracking for `workflow.upload`, `module-deploy`, `setting.upsert`
67
+ 4. **Feature status:** `accounts/<PROFILE>/features/*/status.json` for IN_PROGRESS features
68
+
69
+ If no deployment evidence found:
70
+ ```
71
+ -> BLOCKED: No recent deployment evidence found.
72
+ Please specify what was deployed:
73
+ - Workflow name and retailer
74
+ - Module name and version
75
+ - Settings that were changed
76
+ ```
77
+
78
+ ### Step 2: Locate Previous Versions
79
+
80
+ **Workflows:**
81
+ - Local cache: `accounts/<PROFILE>/workflows/<RETAILER>/<NAME>.json` (if predates deployment)
82
+ - Pre-deploy backup: `accounts/<PROFILE>/workflows/<RETAILER>/<NAME>.pre-deploy.json`
83
+ - Git history: `git log --oneline -- <workflow-file>`
84
+
85
+ **Modules:**
86
+ - Local dist: `accounts/<PROFILE>/SOURCE/<repo>/dist/<module>.zip`
87
+ - Git tags: `git tag --list 'v*'`
88
+ - Previous commit: check out and rebuild if needed
89
+
90
+ **Settings:**
91
+ - Session audit trail: `accounts/<PROFILE>/sessions/*.json` -- search for setting.upsert with old values
92
+ - Settings audit: `accounts/<PROFILE>/analysis/settings/` -- snapshots from /fluent-settings
93
+ - Pre-deploy report: `accounts/<PROFILE>/reports/pre-deploy/` -- captures values before deploy
94
+
95
+ ### Step 3: Assess Irreversibility
96
+
97
+ | Change Type | Reversible? | Notes |
98
+ |-------------|-------------|-------|
99
+ | Workflow version upload | YES | Re-upload previous content as new version |
100
+ | Setting value change | YES | If previous value is known |
101
+ | Module deployment | YES | If previous JAR/ZIP is available |
102
+ | Entity state changes | **NO** | Orders moved to new statuses cannot be reverted |
103
+ | Events sent | **NO** | Side effects already occurred |
104
+ | Batch ingestion data | **NO** | Entities already created/updated |
105
+ | GraphQL create mutations | **NO** | Entities already exist |
106
+ | Webhook deliveries | **NO** | External systems already received payload |
107
+
108
+ ## Artifact Type: Workflow Rollback
109
+
110
+ Fluent maintains workflow version history. Each upload creates a new version. Rollback re-uploads prior version content as a new version.
111
+
112
+ ### Source Resolution Order
113
+
114
+ 1. **Pre-deploy backup** -- `<NAME>.pre-deploy.json` (created by /fluent-workflow-deploy)
115
+ 2. **Local cache** -- `<NAME>.json` (if predates deployment)
116
+ 3. **Git history** -- prior commit version of the workflow file
117
+ 4. **Environment download** -- current live version (backup only, not rollback source)
118
+
119
+ ### Execution
120
+
121
+ ```
122
+ 1. Identify current workflow version (via GraphQL or workflow.transitions)
123
+ 2. Locate prior content (see Source Resolution)
124
+ 3. Backup CURRENT state: <NAME>.pre-rollback.json
125
+ 4. Upload prior content as new version: workflow.upload MCP tool
126
+ 5. Verify: download live version, confirm content matches target
127
+ ```
128
+
129
+ User-action contract note:
130
+ - `workflow.transitions` here is used for version/context verification only.
131
+ - If rollback validation includes user-action visibility, enforce explicit `eventName` + documented `context`/`attributes` only, and compare `module` vs `module: "all"` before concluding misconfiguration.
132
+ - Canonical references: `/fluent-workflow-builder` and `/fluent-transition-api`.
133
+
134
+ ## Artifact Type: Module Rollback
135
+
136
+ Module rollback redeploys a prior module ZIP. Modules are replaced on install.
137
+
138
+ ### Source Resolution Order
139
+
140
+ 1. **Local dist** -- `SOURCE/<repo>/dist/<module>.zip` (prior build)
141
+ 2. **Git tag** -- check out prior tag, rebuild with /fluent-build
142
+ 3. **Artifact repository** -- fetch from Nexus/Artifactory if available
143
+
144
+ ### Execution
145
+
146
+ ```
147
+ 1. Identify current deployed rules (via plugin.list)
148
+ 2. Locate prior module ZIP (see Source Resolution)
149
+ 3. Log current rule versions for comparison
150
+ 4. Redeploy prior ZIP: fluent module deploy CLI
151
+ 5. Verify: plugin.list shows expected rule versions
152
+ ```
153
+
154
+ ## Artifact Type: Settings Rollback
155
+
156
+ Settings have NO built-in version history in Fluent. Rollback depends on audit trail.
157
+
158
+ ### Source Resolution Order
159
+
160
+ 1. **Session audit trail** -- `sessions/*.json` with setting.upsert entries containing old values
161
+ 2. **Settings audit** -- `analysis/settings/` snapshots
162
+ 3. **Pre-deploy report** -- `reports/pre-deploy/` with captured current values
163
+
164
+ ### Execution
165
+
166
+ ```
167
+ 1. Search audit trail for prior value
168
+ 2. Show current vs proposed rollback value
169
+ 3. Restore via setting.upsert MCP tool
170
+ 4. Re-read setting to verify
171
+ ```
172
+
173
+ If no prior value found:
174
+ ```
175
+ -> BLOCKED: No prior value found for setting "webhook.order.url".
176
+ Settings have no built-in version history in Fluent.
177
+ Recovery: check session exports, analysis/settings/, or provide value manually.
178
+ ```
179
+
180
+ ## Dry Run (--dry-run)
181
+
182
+ Show the rollback plan without executing:
183
+
184
+ ```
185
+ === Rollback Plan (DRY RUN) ===
186
+
187
+ Type: Workflow
188
+ Artifact: ORDER::HD
189
+ Retailer: HM_TEST
190
+ Profile: HMDEV
191
+
192
+ Current: v12 (deployed 2026-02-25 14:30)
193
+ Target: v11 content (from pre-deploy backup)
194
+ Source: accounts/HMDEV/workflows/HM_TEST/ORDER__HD.pre-deploy.json
195
+
196
+ Changes that will be reverted:
197
+ + Ruleset "CancelOrderItems" (added in v12, will be REMOVED)
198
+ ~ Ruleset "ProcessOrder" trigger: BOOKED -> CREATED (will revert)
199
+ - Ruleset "LegacyRoute" (removed in v12, will be RESTORED)
200
+
201
+ Risk: MEDIUM
202
+ - Removing "CancelOrderItems" may affect in-flight cancellation orders
203
+ - Restoring "LegacyRoute" may conflict with new routing logic
204
+
205
+ Backup will be saved to:
206
+ accounts/HMDEV/workflows/HM_TEST/ORDER__HD.pre-rollback.json
207
+
208
+ === DRY RUN COMPLETE -- No changes made ===
209
+ ```
210
+
211
+ ## Irreversible Operations
212
+
213
+ The skill refuses to attempt these and suggests alternatives:
214
+
215
+ ### Entity Mutations
216
+ ```
217
+ -> BLOCKED: Entity mutations are irreversible.
218
+ Order HD-001 status changed CREATED -> COMPLETE cannot be reverted via API.
219
+ Alternatives:
220
+ 1. Check /fluent-transition-api for available actions from current status
221
+ 2. Send a compensating event if the workflow supports it (e.g., CANCEL)
222
+ 3. Contact Fluent Support for database-level intervention
223
+ ```
224
+
225
+ ### Batch Ingestion
226
+ ```
227
+ -> BLOCKED: Batch ingestion cannot be un-ingested.
228
+ 1,500 inventory positions created by batch job "inv-load-2026-02-25".
229
+ Alternatives:
230
+ 1. Create a compensating batch to zero-out quantities
231
+ 2. Use entity.update to modify individual records
232
+ 3. Contact Fluent Support for bulk data cleanup
233
+ ```
234
+
235
+ ### Events Sent
236
+ ```
237
+ -> BLOCKED: Sent events cannot be unsent.
238
+ Event "OrderConfirmed" sent to 50 orders.
239
+ Alternatives:
240
+ 1. Send compensating events if workflow supports reversal
241
+ 2. Use /fluent-trace to identify affected entities
242
+ 3. Process corrections through the normal workflow
243
+ ```
244
+
245
+ ## Rollback Plan Format
246
+
247
+ Present to user before execution:
248
+
249
+ ```
250
+ ## Rollback Plan
251
+
252
+ Profile: HMDEV | Retailer: HM_TEST
253
+ Reason: Orders stuck in BOOKED status after workflow v12 deployment
254
+
255
+ ### Reversible Actions (will be executed)
256
+
257
+ | # | Artifact | Current | Rollback To | Method |
258
+ |---|----------|---------|-------------|--------|
259
+ | 1 | Workflow ORDER__HD | v12 | v11 content | workflow.upload |
260
+ | 2 | Setting webhook.order.url | new-url | old-url | setting.upsert |
261
+
262
+ ### Irreversible Changes (documented only)
263
+
264
+ | # | Change | Impact | Mitigation |
265
+ |---|--------|--------|------------|
266
+ | 1 | 15 orders moved to BOOKED | Orders remain in BOOKED | Manual correction if needed |
267
+
268
+ ### Execution Order
269
+
270
+ 1. Settings (lowest risk, no dependencies)
271
+ 2. Workflows (stops new orders from using broken flow)
272
+ 3. Modules (restores previous rule behavior)
273
+
274
+ Awaiting approval to proceed.
275
+ ```
276
+
277
+ ## Safety Guards
278
+
279
+ 1. **ALWAYS create a backup** before executing any rollback
280
+ 2. **ALWAYS show the rollback plan** and get explicit user approval
281
+ 3. **ALWAYS recommend --dry-run first** for production environments
282
+ 4. **NEVER attempt irreversible operations** (entity mutations, events, batch)
283
+ 5. **NEVER rollback without identifying prior state** -- refuse rather than guess
284
+ 6. **WARN if target version is >5 versions behind** -- large gaps are risky
285
+ 7. **WARN if target is production** -- require extra confirmation
286
+ 8. **LOG everything** to session tracking
287
+
288
+ ## Post-Rollback Actions
289
+
290
+ 1. **Generate rollback report** at `accounts/<PROFILE>/reports/rollback/<type>-<name>-<timestamp>.md`
291
+ 2. **Log to session tracking**
292
+ 3. **Recommend verification** -- /fluent-e2e-test to confirm rollback worked
293
+ 4. **Update feature status** if rollback invalidates VERIFIED:
294
+ - VERIFIED -> IN_PROGRESS (needs re-verification)
295
+ - Agent updates status.json: `"status": "IN_PROGRESS"`, `"updated": "<today>"`, `"next": "/fluent-e2e-test"`
296
+
297
+ ## Rollback Report
298
+
299
+ ```
300
+ # Rollback Report
301
+
302
+ | Field | Value |
303
+ |-------|-------|
304
+ | Type | Workflow |
305
+ | Artifact | ORDER__HD |
306
+ | Retailer | HM_TEST |
307
+ | Executed | 2026-02-25T15:00:00Z |
308
+ | From | v12 |
309
+ | To | v11 (content) |
310
+ | Reason | Regression -- orders stuck in BOOKED status |
311
+
312
+ ## Backup
313
+ - Pre-rollback: accounts/HMDEV/workflows/HM_TEST/ORDER__HD.pre-rollback.json
314
+
315
+ ## Changes Reverted
316
+ - Ruleset "CancelOrderItems" removed
317
+ - Ruleset "ProcessOrder" trigger reverted
318
+
319
+ ## Verification
320
+ - Status: PENDING -- run /fluent-e2e-test to verify
321
+ ```
322
+
323
+ ## Handoff Protocol
324
+
325
+ ### Emitted Signals
326
+ - `-> READY: accounts/<PROFILE>/reports/rollback/<report>` -- Rollback complete
327
+ - `-> BLOCKED: <reason>` -- Cannot rollback (irreversible, no prior version)
328
+ - `-> NEXT: /fluent-e2e-test` -- Verify after rollback
329
+ - `-> NEXT: /fluent-trace` -- Diagnose root cause
330
+
331
+ ### Consumed Signals
332
+ - Reads deployment logs from `/fluent-session-summary`
333
+ - Reads pre-deploy backups from `/fluent-workflow-deploy`
334
+ - Reads build reports from `/fluent-build`
335
+
336
+ ## Error Reporting
337
+
338
+ | Severity | Code | Scenario | Recovery |
339
+ |----------|------|----------|----------|
340
+ | CRITICAL | `ROLLBACK_FAILED` | Upload/deploy failed during rollback | Manual intervention; backup exists |
341
+ | HIGH | `NO_PRIOR_VERSION` | No prior version found anywhere | Rebuild from git history |
342
+ | HIGH | `IRREVERSIBLE` | Attempted rollback of entity/event/batch | Use alternatives in BLOCKED message |
343
+ | MEDIUM | `PARTIAL_ROLLBACK` | Some artifacts succeeded, others failed | Complete manually |
344
+ | MEDIUM | `LARGE_VERSION_GAP` | Target >5 versions behind | Confirm intent, consider incremental |
345
+ | LOW | `AUDIT_MISSING` | No audit trail for settings | Settings rollback unavailable |
346
+
347
+ ## Session Tracking
348
+
349
+ ```
350
+ SKILL: /fluent-rollback
351
+ args: <type> <name> --profile <PROFILE> --retailer <RETAILER> [--dry-run]
352
+ outcome: completed | failed | blocked | dry-run
353
+ artifact_type: workflow | module | settings
354
+ artifact_name: <name>
355
+ from_version: <current>
356
+ to_version: <target>
357
+ backup_path: <path>
358
+ report_path: <path>
359
+ feature_status_regressed: true | false
360
+ ```
361
+
362
+ ## Integration with Other Skills
363
+
364
+ | Skill | Relationship |
365
+ |-------|-------------|
366
+ | `/fluent-module-deploy` | Forward deployment -- this skill reverses it |
367
+ | `/fluent-workflow-deploy` | Forward deployment -- reads pre-deploy backups |
368
+ | `/fluent-settings` | Settings changes -- restores prior values |
369
+ | `/fluent-e2e-test` | Post-rollback verification |
370
+ | `/fluent-trace` | Diagnose what went wrong |
371
+ | `/fluent-feature-status` | Shows features affected by rollback |
372
+ | `/fluent-session-summary` | Audit trail for deployment history |
373
+ | `/fluent-pre-deploy-check` | Should have caught the issue -- review gates |
374
+ | `/fluent-workflow-analyzer` | Validate restored workflow structure |
375
+
376
+ ## Tips
377
+
378
+ - **Always run --dry-run first** -- see exactly what will change
379
+ - **Workflow rollback is safest** -- Fluent maintains version history
380
+ - **Module rollback requires a prior ZIP** -- keep your dist/ directory
381
+ - **Settings rollback depends on audit trail** -- run /fluent-session-summary regularly
382
+ - **Check /fluent-feature-status before rollback** -- understand affected features
383
+ - **After rollback, run /fluent-e2e-test** -- verify the reverted state
384
+ - **For production, double-confirm** -- the skill warns for good reason
385
+ - **Rollback is not a fix** -- it buys time. Use /fluent-trace for root cause
386
+ - **Partial rollbacks are possible** -- roll back workflow but keep module
387
+ - **Document the reason** -- rollback report captures it for future reference