@fluentcommerce/ai-skills 0.13.0 → 0.15.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.
- package/README.md +17 -12
- package/bin/cli.mjs +219 -43
- package/content/cli/skills/fluent-bootstrap/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-reference/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-retailer/SKILL.md +1 -1
- package/content/cli/skills/fluent-connect/SKILL.md +58 -3
- package/content/cli/skills/fluent-profile/SKILL.md +35 -5
- package/content/cli/skills/fluent-workflow/SKILL.md +2 -1
- package/content/dev/agents/fluent-backend-dev.md +2 -2
- package/content/dev/agents/fluent-dev.md +1 -1
- package/content/dev/agents/fluent-frontend-dev.md +1 -1
- package/content/dev/skills/fluent-account-snapshot/SKILL.md +1 -1
- package/content/dev/skills/fluent-archive/SKILL.md +2 -1
- package/content/dev/skills/fluent-build/SKILL.md +2 -2
- package/content/dev/skills/fluent-connection-analysis/SKILL.md +2 -1
- package/content/dev/skills/fluent-custom-code/SKILL.md +3 -2
- package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +7 -6
- package/content/dev/skills/fluent-e2e-test/SKILL.md +1 -1
- package/content/dev/skills/fluent-entity-flow-diagnose/SKILL.md +2 -1
- package/content/dev/skills/fluent-event-api/SKILL.md +3 -2
- package/content/dev/skills/fluent-feature-explain/SKILL.md +2 -1
- package/content/dev/skills/fluent-feature-plan/SKILL.md +2 -1
- package/content/dev/skills/fluent-feature-status/SKILL.md +1 -1
- package/content/dev/skills/fluent-frontend-build/SKILL.md +1 -1
- package/content/dev/skills/fluent-frontend-readme/SKILL.md +2 -1
- package/content/dev/skills/fluent-frontend-review/SKILL.md +2 -1
- package/content/dev/skills/fluent-goal/SKILL.md +1 -1
- package/content/dev/skills/fluent-implementation-map/SKILL.md +1 -1
- package/content/dev/skills/fluent-inventory-catalog/SKILL.md +2 -2
- package/content/dev/skills/fluent-job-batch/SKILL.md +6 -3
- package/content/dev/skills/fluent-knowledge-init/SKILL.md +1 -1
- package/content/dev/skills/{fluent-source-onboard → fluent-module-convert}/SKILL.md +223 -24
- package/content/dev/skills/fluent-module-scaffold/SKILL.md +2 -1
- package/content/dev/skills/fluent-module-validate/SKILL.md +8 -7
- package/content/dev/skills/fluent-mystique-assess/SKILL.md +22 -6
- package/content/dev/skills/fluent-mystique-builder/SKILL.md +33 -2
- package/content/dev/skills/fluent-mystique-component/SKILL.md +1 -1
- package/content/dev/skills/fluent-mystique-diff/SKILL.md +1 -1
- package/content/dev/skills/fluent-mystique-preview/SKILL.md +19 -2
- package/content/dev/skills/fluent-mystique-scaffold/SDK_REFERENCE.md +2 -2
- package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +13 -2
- package/content/dev/skills/fluent-mystique-scaffold/TEMPLATES.md +1 -1
- package/content/dev/skills/fluent-mystique-sdk-reference/SKILL.md +2 -1
- package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +3 -3
- package/content/dev/skills/fluent-retailer-config/SKILL.md +3 -3
- package/content/dev/skills/fluent-rollback/SKILL.md +1 -1
- package/content/dev/skills/fluent-rule-lookup/SKILL.md +2 -1
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +7 -6
- package/content/dev/skills/fluent-rule-test/SKILL.md +2 -1
- package/content/dev/skills/fluent-scope-plan/SKILL.md +2 -2
- package/content/dev/skills/fluent-session/SKILL.md +1 -1
- package/content/dev/skills/fluent-settings/SKILL.md +2 -2
- package/content/dev/skills/fluent-skill-observability/SKILL.md +1 -1
- package/content/dev/skills/fluent-sourcing/SKILL.md +38 -13
- package/content/dev/skills/fluent-system-monitoring/SKILL.md +1 -1
- package/content/dev/skills/fluent-test-data/SKILL.md +1 -1
- package/content/dev/skills/fluent-trace/SKILL.md +3 -2
- package/content/dev/skills/fluent-transition-api/SKILL.md +3 -2
- package/content/dev/skills/fluent-ui-record/SKILL.md +1 -1
- package/content/dev/skills/fluent-ui-test/SKILL.md +9 -8
- package/content/dev/skills/fluent-use-case-discover/SKILL.md +2 -2
- package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +3 -2
- package/content/dev/skills/fluent-workspace-tree/SKILL.md +4 -3
- package/content/knowledge/index.md +3 -3
- package/content/knowledge/platform/domain-model.md +1 -0
- package/content/knowledge/platform/module-structure.md +5 -5
- package/content/knowledge/platform/mystique-routing.md +6 -3
- package/content/knowledge/platform/permissions-and-contexts.md +2 -2
- package/content/knowledge/platform/rule-test-patterns.md +1 -1
- package/content/knowledge/platform/workflow-json-structure.md +1 -1
- package/content/mcp-extn/skills/fluent-mcp-core/SKILL.md +2 -1
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +3 -2
- package/content/rfl/skills/fluent-rfl-assess/SKILL.md +1 -1
- package/docs/01-first-session.md +175 -0
- package/docs/02-prompt-guide.md +246 -0
- package/docs/03-use-cases.md +1181 -0
- package/docs/04-onboarding-plan.md +355 -0
- package/docs/05-getting-started.md +262 -0
- package/docs/06-dev-workflow.md +1040 -0
- package/docs/INDEX.md +40 -0
- package/docs/agents-and-skills-guide.md +199 -0
- package/docs/capability-map.md +165 -0
- package/docs/chrome-devtools-mcp-reference.md +401 -0
- package/docs/fluent-ai-skills-reference.md +1351 -0
- package/docs/manifest-safety.md +79 -0
- package/docs/mcp-servers.md +209 -0
- package/docs/workflow-reference.md +167 -0
- package/lib/fluent-brand.css +55 -0
- package/metadata.json +7 -6
- package/package.json +17 -3
- package/scripts/postinstall.mjs +38 -0
- package/{content/dev/skills/fluent-trace/scripts/analyze-event-capture.mjs → tools/event-capture-analyzer.mjs} +3 -3
- package/tools/{generate-feature-dashboard.mjs → feature-dashboard.mjs} +2 -2
- package/tools/manifest-diff.mjs +1 -1
- package/{content/dev/skills/fluent-mystique-assess/validator.mjs → tools/manifest-validator.mjs} +2 -2
- package/tools/workflow-explainer.mjs +1021 -0
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
# What Can You Do With Fluent AI Skills?
|
|
2
|
+
|
|
3
|
+
> [!CAUTION]
|
|
4
|
+
> **🧪 EXPERIMENTAL — LABS PROJECT**
|
|
5
|
+
> This package is not production-ready. No stability guarantees, no support, no warranty. See [README](../README.md) for full disclaimer.
|
|
6
|
+
|
|
7
|
+
Deep scenario walkthroughs for `@fluentcommerce/ai-skills`. Each scenario shows what to say, what happens behind the scenes, and what you get back.
|
|
8
|
+
|
|
9
|
+
> **Prerequisites:** Skills installed (`npx @fluentcommerce/ai-skills install`), MCP servers configured (`mcp-setup --profile YOUR_PROFILE`), and workspace connected (`/fluent-connect`).
|
|
10
|
+
>
|
|
11
|
+
> **Codex note:** Slash commands below are Claude Code examples. In Codex, ask the same thing in natural language, for example: `Use the fluent-connect skill to connect this workspace with profile YOUR_PROFILE.`
|
|
12
|
+
|
|
13
|
+
> **New here?** Start with [Your First Session](01-first-session.md) for a 20-minute guided walkthrough. For a quick skill lookup, see [Prompt Guide](02-prompt-guide.md).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Find Your Scenario
|
|
18
|
+
|
|
19
|
+
Jump to the scenario that matches your current task. See the [README — Who Is This For?](../README.md#who-is-this-for) for full persona descriptions.
|
|
20
|
+
|
|
21
|
+
| I need to... | Start here |
|
|
22
|
+
|---|---|
|
|
23
|
+
| **Understand what's built** (new to the project) | [Scenario 1](#scenario-1-i-just-joined-the-project--help-me-understand-whats-built), [Scenario 17](#scenario-17-map-whats-been-built-on-this-account) |
|
|
24
|
+
| **Build a feature** end-to-end | [Scenario 3](#scenario-3-build-a-complete-feature-end-to-end), [Scenario 12](#scenario-12-gather-requirements-before-building) |
|
|
25
|
+
| **Debug a stuck order** or failed event | [Scenario 2](#scenario-2-an-order-is-stuck--help-me-debug-it), [Scenario 6](#scenario-6-monitor-production-event-processing) |
|
|
26
|
+
| **Deploy safely** or roll back | [Scenario 8](#scenario-8-deploy-a-workflow-change-safely), [Scenario 19](#scenario-19-roll-back-a-failed-deployment) |
|
|
27
|
+
| **Audit for go-live** | [Scenario 4](#scenario-4-were-going-live-next-week--are-we-ready), [Scenario 13](#scenario-13-validate-cross-entity-workflow-dependencies) |
|
|
28
|
+
| **Build or change UI** | [Frontend scenarios](#frontend--mystique-ui-scenarios) |
|
|
29
|
+
| **Set up a new environment** | [Scenario 5](#scenario-5-set-up-a-fresh-environment-for-testing) |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## How It Works: The Feature Lifecycle
|
|
34
|
+
|
|
35
|
+
For the full walkthrough of the feature lifecycle — directory structure, `status.json` fields, the approval gate, and workspace layout — see [Getting Started — Workspace Layout](05-getting-started.md#3-workspace-layout).
|
|
36
|
+
|
|
37
|
+
**Quick summary:** Every feature lives under `accounts/<PROFILE>/features/<slug>/` with `status.json` (lifecycle tracker), `spec.md` (business requirements), `plan.md` (implementation plan), and optionally `architecture.md` (reverse-engineered docs). The AI reads `status.json` to resume where you left off across sessions.
|
|
38
|
+
|
|
39
|
+
### Reading an Existing Feature (No Plan Needed)
|
|
40
|
+
|
|
41
|
+
If you want to **understand** a feature rather than **build** one, the AI produces an architecture document instead:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Explain how Home Delivery works end-to-end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This creates `features/home-delivery/architecture.md` — a read-only document with state machine diagrams, cross-entity sequence diagrams, rules tables, and settings dependencies. No planning gate, no implementation.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Scenario 1: "I just joined the project — help me understand what's built"
|
|
52
|
+
|
|
53
|
+
**Situation:** You're a new developer onboarding onto an existing Fluent Commerce implementation. You need to understand the workflows, rules, and integrations before making changes.
|
|
54
|
+
|
|
55
|
+
**Step 1: Connect to the account**
|
|
56
|
+
```
|
|
57
|
+
/fluent-connect
|
|
58
|
+
```
|
|
59
|
+
The wizard discovers your CLI profiles, selects the retailer, downloads all workflows, scans for source code, decompiles any JARs, and reports what's available.
|
|
60
|
+
|
|
61
|
+
**Step 2: Explain the main feature**
|
|
62
|
+
```
|
|
63
|
+
Explain how the Home Delivery order flow works end-to-end
|
|
64
|
+
```
|
|
65
|
+
This produces a **Feature Architecture Document** with:
|
|
66
|
+
- State machine diagrams (Mermaid) for every entity (ORDER, FULFILMENT_CHOICE, FULFILMENT)
|
|
67
|
+
- Cross-entity sequence diagram showing event propagation
|
|
68
|
+
- Rules & logic table explaining what each ruleset does
|
|
69
|
+
- Settings dependencies with current values
|
|
70
|
+
- Integration points (webhooks, scheduled events)
|
|
71
|
+
- Analysis confidence levels (HIGH/MEDIUM/LOW per rule)
|
|
72
|
+
|
|
73
|
+
Output saved to `accounts/<PROFILE>/features/home-delivery/architecture.md`.
|
|
74
|
+
|
|
75
|
+
> **Artifact:** `accounts/<PROFILE>/features/home-delivery/architecture.md` — a Feature Architecture Document you can share with your team. Includes Mermaid diagrams that render in GitHub, Confluence, and most markdown viewers.
|
|
76
|
+
|
|
77
|
+
**Step 3: Analyze specific workflows**
|
|
78
|
+
```
|
|
79
|
+
Analyze ORDER::HD for orphaned rulesets and trigger coverage
|
|
80
|
+
```
|
|
81
|
+
Returns a status graph, event chains, process flow classification, and any structural issues.
|
|
82
|
+
|
|
83
|
+
**Step 4: Understand custom code**
|
|
84
|
+
```
|
|
85
|
+
Analyze the custom code for this account
|
|
86
|
+
```
|
|
87
|
+
Scans `accounts/<PROFILE>/SOURCE/backend/`, maps rules to workflow rulesets, generates behavior descriptions, and flags any deployed rules without local source.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Scenario 2: "An order is stuck — help me debug it"
|
|
92
|
+
|
|
93
|
+
**Situation:** A production order `HD-12345` has been in BOOKED status for hours and should have progressed to FULFILLED.
|
|
94
|
+
|
|
95
|
+
**Step 1: Trace the order**
|
|
96
|
+
```
|
|
97
|
+
Why is order HD-12345 stuck in BOOKED?
|
|
98
|
+
```
|
|
99
|
+
Runs `event_flowInspect` on the order, analyzing all orchestration events to find:
|
|
100
|
+
- Which events fired and which NO_MATCHed
|
|
101
|
+
- Failed webhook deliveries
|
|
102
|
+
- Rulesets that should have triggered but didn't
|
|
103
|
+
- Timeline of every status change
|
|
104
|
+
|
|
105
|
+
If you want the **combined runtime-vs-workflow report** instead of runtime triage alone, say:
|
|
106
|
+
```
|
|
107
|
+
Compare runtime vs workflow for order HD-12345
|
|
108
|
+
```
|
|
109
|
+
That routes to `/fluent-entity-flow-diagnose`, which reconstructs the dynamic chain, resolves the relevant workflow set, and shows expected vs observed behavior in one report.
|
|
110
|
+
|
|
111
|
+
**Step 2: Check available actions**
|
|
112
|
+
```
|
|
113
|
+
What actions can I take on this order right now?
|
|
114
|
+
```
|
|
115
|
+
Queries the Transition API for user actions available at the current status — shows event names, required attributes, and button labels.
|
|
116
|
+
|
|
117
|
+
**Step 3: Fire a remediation event**
|
|
118
|
+
```
|
|
119
|
+
Send a RetryFulfilmentAllocation event to order HD-12345
|
|
120
|
+
```
|
|
121
|
+
Builds and sends the event (with dry-run preview first), then monitors the result.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Scenario 3: "Build a complete feature end-to-end"
|
|
126
|
+
|
|
127
|
+
**Situation:** Product asks for a new Return Order capability. You need new workflows, custom rules, settings, and deployment — the full lifecycle.
|
|
128
|
+
|
|
129
|
+
This is the flagship use case. The AI follows the mandatory chain: **requirements → plan → implement → build → deploy → test**. See [How It Works: The Feature Lifecycle](#how-it-works-the-feature-lifecycle) above for the full artifact map.
|
|
130
|
+
|
|
131
|
+
**Step 1: Gather requirements (if unclear)**
|
|
132
|
+
```
|
|
133
|
+
Help me define the use cases for a Return Order feature
|
|
134
|
+
```
|
|
135
|
+
The `/fluent-use-case-discover` wizard runs through 12 phases:
|
|
136
|
+
- Entity types involved (ORDER, RETURN_ORDER, FULFILMENT)
|
|
137
|
+
- Business rules (return window, item eligibility, refund policies)
|
|
138
|
+
- Status lifecycles per entity
|
|
139
|
+
- Integration points (WMS, ERP, payment gateway)
|
|
140
|
+
- Environment discovery (if profile connected)
|
|
141
|
+
|
|
142
|
+
Produces a **Business Spec** saved to `accounts/<PROFILE>/features/return-order/spec.md` with a completeness score.
|
|
143
|
+
|
|
144
|
+
**Step 2: Plan the feature**
|
|
145
|
+
```
|
|
146
|
+
Plan the Return Order feature
|
|
147
|
+
```
|
|
148
|
+
`/fluent-feature-plan` checks the spec (must be >= 75% completeness), then produces an 18-section plan:
|
|
149
|
+
- Architecture diagrams (Mermaid state machines + sequence diagrams)
|
|
150
|
+
- Workflow changes with before/after
|
|
151
|
+
- Rules inventory: NEW rules get pseudo-logic contracts, OOTB rules get prop configuration
|
|
152
|
+
- Settings, webhooks, cross-entity impacts
|
|
153
|
+
- Every artifact tagged as NEW / EXISTING / MODIFIED / REUSED / OOTB
|
|
154
|
+
- Deployment sequence, risk assessment, test plan
|
|
155
|
+
|
|
156
|
+
Plan saved to `accounts/<PROFILE>/features/return-order/plan.md`.
|
|
157
|
+
|
|
158
|
+
**Waits for your approval.** You can ask questions, request changes, or approve.
|
|
159
|
+
|
|
160
|
+
> **Your workspace after steps 1-2:**
|
|
161
|
+
> ```
|
|
162
|
+
> accounts/<PROFILE>/features/return-order/
|
|
163
|
+
> status.json ← status: PLANNING, plan: PENDING (or APPROVED after you approve)
|
|
164
|
+
> spec.md ← business requirements with completeness score
|
|
165
|
+
> plan.md ← 18-section implementation plan with Mermaid diagrams
|
|
166
|
+
> assets/ ← screenshots, recordings, visual evidence (linked from spec/plan)
|
|
167
|
+
> ```
|
|
168
|
+
> You can close your IDE here. When you come back, the AI reads `status.json`, sees `plan: "APPROVED"` and `next: "/fluent-rule-scaffold"`, and picks up at Step 3.
|
|
169
|
+
|
|
170
|
+
**Step 3: Scaffold the module (if new)**
|
|
171
|
+
```
|
|
172
|
+
Create a new module called my-returns
|
|
173
|
+
```
|
|
174
|
+
`/fluent-module-scaffold` generates the full Maven project: POMs, `module.json`, directory structure, build scripts, `.gitignore`.
|
|
175
|
+
|
|
176
|
+
**Step 4: Scaffold custom rules**
|
|
177
|
+
```
|
|
178
|
+
Create the rules from the plan
|
|
179
|
+
```
|
|
180
|
+
`/fluent-rule-scaffold` generates each rule from the plan: Java class with SDK boilerplate, test skeleton, wired into `module.json`. Each rule emits `-> READY: <path>` and `-> NEXT: /fluent-build` on completion.
|
|
181
|
+
|
|
182
|
+
**Step 4b: Generate or repair rule tests**
|
|
183
|
+
```
|
|
184
|
+
Generate tests for ValidateReturnWindow
|
|
185
|
+
```
|
|
186
|
+
`/fluent-rule-test` generates comprehensive JUnit 5 tests for existing rules: happy path, edge cases, error scenarios, and mock setups. If tests already exist but are broken, it diagnoses and repairs them. Uses `RuleExecutor` or `TestExecutor` patterns from `rule-test-patterns.md`.
|
|
187
|
+
|
|
188
|
+
**Step 5: Build the workflow**
|
|
189
|
+
```
|
|
190
|
+
Build the RETURN_ORDER::DEFAULT workflow from the plan
|
|
191
|
+
```
|
|
192
|
+
`/fluent-workflow-builder` creates the workflow JSON with rulesets, states, triggers, and validates all references. Then `/fluent-workflow-analyzer` runs automatically to catch orphaned rulesets or trigger conflicts.
|
|
193
|
+
|
|
194
|
+
**Step 6: Build and package**
|
|
195
|
+
```
|
|
196
|
+
Build the module
|
|
197
|
+
```
|
|
198
|
+
`/fluent-build` bumps the version, runs `mvn clean install`, packages the ZIP. If compilation fails, reports the error and suggests fixes.
|
|
199
|
+
|
|
200
|
+
**Step 7: Pre-deploy quality gates**
|
|
201
|
+
```
|
|
202
|
+
Run pre-deploy checks
|
|
203
|
+
```
|
|
204
|
+
`/fluent-pre-deploy-check` runs 35+ gates across 9 phases: environment readiness, module integrity, workflow validity, connection topology, settings completeness, target verification, risk assessment, completeness, and frontend bundle. Reports READY or BLOCKED with specific blockers.
|
|
205
|
+
|
|
206
|
+
**Step 8: Deploy module + workflow**
|
|
207
|
+
```
|
|
208
|
+
Deploy everything to MY_RETAILER
|
|
209
|
+
```
|
|
210
|
+
`/fluent-module-deploy` installs the module ZIP. `/fluent-workflow-deploy` uploads the workflow JSON (tries MCP first, falls back to REST API). Both verify the deployed version matches.
|
|
211
|
+
|
|
212
|
+
**Step 9: End-to-end test**
|
|
213
|
+
```
|
|
214
|
+
Run the E2E test from the plan
|
|
215
|
+
```
|
|
216
|
+
`/fluent-e2e-test` creates test entities dynamically (using `/fluent-test-data` discovery), fires events at each step, polls for status transitions, and reports pass/fail per step. On failure, automatically traces the failed event to find the root cause.
|
|
217
|
+
|
|
218
|
+
**Step 10: Fix loop (if needed)**
|
|
219
|
+
|
|
220
|
+
If a test fails, the agent diagnoses the issue (wrong prop value? missing setting? rule bug?), applies the fix, rebuilds, redeploys, and re-tests. This loop continues until all tests pass or an unresolvable blocker is hit.
|
|
221
|
+
|
|
222
|
+
> **Your workspace after all steps:**
|
|
223
|
+
> ```
|
|
224
|
+
> accounts/<PROFILE>/
|
|
225
|
+
> features/return-order/
|
|
226
|
+
> status.json ← status: VERIFIED, plan: APPROVED
|
|
227
|
+
> spec.md ← business requirements
|
|
228
|
+
> plan.md ← approved implementation plan
|
|
229
|
+
> SOURCE/backend/fc-module-my-returns/
|
|
230
|
+
> resources/module.json ← rule registrations
|
|
231
|
+
> plugins/rules/my-returns/src/main/java/
|
|
232
|
+
> .../ValidateReturnWindow.java ← custom rule
|
|
233
|
+
> .../ProcessReturnRefund.java ← custom rule
|
|
234
|
+
> plugins/rules/my-returns/src/test/java/
|
|
235
|
+
> .../ValidateReturnWindowTest.java ← test skeleton
|
|
236
|
+
> dist/fc-module-my-returns-1.0.0.zip ← deployed module
|
|
237
|
+
> workflows/<RETAILER_REF>/
|
|
238
|
+
> RETURN_ORDER__DEFAULT.json ← deployed workflow
|
|
239
|
+
> reports/module-validate/my-returns.report.json
|
|
240
|
+
> ```
|
|
241
|
+
|
|
242
|
+
**Common issues:**
|
|
243
|
+
- "PLAN_REQUIRED" — you tried to scaffold rules without approving the plan first. Say "approved" to continue.
|
|
244
|
+
- "PREREQ_MISSING" — the module doesn't exist yet. Run `/fluent-module-scaffold` first.
|
|
245
|
+
- Build fails — check the error message. Common causes: missing imports, wrong SDK version, typo in `@ParamString` name.
|
|
246
|
+
- Deploy blocked — pre-deploy check found issues. Run `/fluent-pre-deploy-check` to see what's blocking.
|
|
247
|
+
|
|
248
|
+
### Resuming This Feature
|
|
249
|
+
|
|
250
|
+
If you close your IDE at any point and come back later:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
"Continue working on return orders"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
The AI reads `features/return-order/status.json`, sees the current state and `next` skill, and picks up exactly where you left off. No need to re-explain context.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Scenario 4: "We're going live next week — are we ready?"
|
|
261
|
+
|
|
262
|
+
**Situation:** Pre-production readiness check before go-live.
|
|
263
|
+
|
|
264
|
+
**Step 1: Run RFL assessment**
|
|
265
|
+
```
|
|
266
|
+
Run a Ready For Launch assessment
|
|
267
|
+
```
|
|
268
|
+
Analyzes:
|
|
269
|
+
- All deployed workflows (structure, orphaned rulesets, trigger coverage)
|
|
270
|
+
- Custom rules (code quality, test coverage, GraphQL usage)
|
|
271
|
+
- Settings (missing keys, invalid values)
|
|
272
|
+
- Integration points (webhook configuration)
|
|
273
|
+
- Architecture (entity relationships, cross-workflow dependencies)
|
|
274
|
+
|
|
275
|
+
Produces a scored report with risk ratings and prioritized recommendations.
|
|
276
|
+
|
|
277
|
+
The RFL assessment produces a scored report covering:
|
|
278
|
+
- Workflow health score (0-100)
|
|
279
|
+
- Code quality score (0-100)
|
|
280
|
+
- Settings completeness score (0-100)
|
|
281
|
+
- Integration risk rating (LOW/MEDIUM/HIGH/CRITICAL)
|
|
282
|
+
- Prioritized remediation recommendations
|
|
283
|
+
|
|
284
|
+
Each finding includes severity, affected entity, and a specific fix recommendation.
|
|
285
|
+
|
|
286
|
+
**Step 2: Audit settings**
|
|
287
|
+
```
|
|
288
|
+
Audit all settings for ORDER::HD — find any gaps
|
|
289
|
+
```
|
|
290
|
+
Cross-references workflow rule parameters against deployed settings. Flags missing settings, wrong value formats, and cascading scope issues (RETAILER vs ACCOUNT).
|
|
291
|
+
|
|
292
|
+
**Step 3: Check event health**
|
|
293
|
+
```
|
|
294
|
+
Show me event failure rates and NO_MATCH events for the last 24 hours
|
|
295
|
+
```
|
|
296
|
+
Queries Prometheus metrics or Event API, runs anomaly detection, and reports:
|
|
297
|
+
- Failure rate (threshold: >5%)
|
|
298
|
+
- NO_MATCH events (any = critical — means workflow gaps)
|
|
299
|
+
- PENDING queue buildup
|
|
300
|
+
- Single-event dominance (possible runaway loops)
|
|
301
|
+
|
|
302
|
+
**Step 4: Validate cross-entity connections**
|
|
303
|
+
```
|
|
304
|
+
Run connection analysis on ORDER::HD with --validate against a real order
|
|
305
|
+
```
|
|
306
|
+
Compares the static workflow paths (what should happen) against actual runtime events for a real entity (what did happen). Shows gaps, unexpected events, and timing analysis. Flags any rulesets that never fired in production.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Scenario 5: "Set up a fresh environment for testing"
|
|
311
|
+
|
|
312
|
+
**Situation:** You need a clean retailer environment with locations, networks, inventory, and test data.
|
|
313
|
+
|
|
314
|
+
**Step 1: Bootstrap (new account)**
|
|
315
|
+
```
|
|
316
|
+
Bootstrap a new Fluent account from scratch
|
|
317
|
+
```
|
|
318
|
+
Walks through: profile creation, retailer setup, reference module installation, sample data.
|
|
319
|
+
|
|
320
|
+
> **Important:** `/fluent-bootstrap` is not the same as `/fluent-connect`. Bootstrap is a high-impact, account-sensitive workflow. Expect planning/approval gates, confirmation prompts for irreversible steps, and pauses while you populate module config values or fix account-specific entitlement issues.
|
|
321
|
+
|
|
322
|
+
**Or configure an existing retailer:**
|
|
323
|
+
```
|
|
324
|
+
Set up a warehouse location called "Sydney DC" with 24/7 hours
|
|
325
|
+
```
|
|
326
|
+
Creates the location via GraphQL with proper `openingSchedule`.
|
|
327
|
+
|
|
328
|
+
**Step 2: Create test data**
|
|
329
|
+
```
|
|
330
|
+
Create a test HD order with 2 items
|
|
331
|
+
```
|
|
332
|
+
Auto-discovers available products, locations, and customers from the live environment. Generates a valid order payload — no hardcoded refs.
|
|
333
|
+
|
|
334
|
+
**Step 3: Run smoke test**
|
|
335
|
+
```
|
|
336
|
+
Run an E2E test of the full HD order flow
|
|
337
|
+
```
|
|
338
|
+
Creates order → fires events through each status → asserts transitions → reports results. On failure, automatically runs event forensics to show exactly where it broke.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Scenario 6: "Monitor production event processing"
|
|
343
|
+
|
|
344
|
+
**Situation:** Ongoing operational monitoring of event health.
|
|
345
|
+
|
|
346
|
+
**Quick health check:**
|
|
347
|
+
```
|
|
348
|
+
Run a health check on event processing
|
|
349
|
+
```
|
|
350
|
+
Single call that checks failure rates, NO_MATCH events, pending queues, and event dominance.
|
|
351
|
+
|
|
352
|
+
**Detailed metrics:**
|
|
353
|
+
```
|
|
354
|
+
Show me the top 20 events by volume in the last 6 hours
|
|
355
|
+
```
|
|
356
|
+
Aggregates events by name + entity type + status, ranks by volume, shows failure rates per event.
|
|
357
|
+
|
|
358
|
+
**SLO report:**
|
|
359
|
+
```
|
|
360
|
+
Generate an SLO report for the last 24 hours
|
|
361
|
+
```
|
|
362
|
+
Computes event volume, failure/NO_MATCH/pending rates, p95 runtime and inflight latency. Flags any threshold breaches.
|
|
363
|
+
|
|
364
|
+
**Deep dive on failures:**
|
|
365
|
+
```
|
|
366
|
+
What are the top failing events? Show me details
|
|
367
|
+
```
|
|
368
|
+
Lists top failing events with counts, then drills into specific failures with `event_flowInspect`.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Scenario 7: "I need to understand the event model"
|
|
373
|
+
|
|
374
|
+
**Situation:** You're new to Fluent's event-driven architecture and need to understand how events work.
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
How does event routing work in Fluent? What are the event types and statuses?
|
|
378
|
+
```
|
|
379
|
+
Explains:
|
|
380
|
+
- Event types (ORCHESTRATION, API, ORCHESTRATION_AUDIT)
|
|
381
|
+
- Event categories (GENERAL, ACTION, CUSTOMER)
|
|
382
|
+
- Event statuses (SUCCESS, FAILED, NO_MATCH, PENDING, SCHEDULED)
|
|
383
|
+
- The routing model (how events match to workflow rulesets via triggers)
|
|
384
|
+
- Run-once workflows and scheduled events
|
|
385
|
+
- How to query and filter events for debugging
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Scenario 8: "Deploy a workflow change safely"
|
|
390
|
+
|
|
391
|
+
**Situation:** You've modified a workflow and need to deploy it without breaking production.
|
|
392
|
+
|
|
393
|
+
**Step 1: Diff the changes**
|
|
394
|
+
```
|
|
395
|
+
Compare the current ORDER::HD workflow with my modified version
|
|
396
|
+
```
|
|
397
|
+
Shows added/removed/modified rulesets, risk assessment (removing rulesets = HIGH risk), and before/after state diagrams.
|
|
398
|
+
|
|
399
|
+
**Step 2: Validate connections**
|
|
400
|
+
```
|
|
401
|
+
Run connection analysis on ORDER::HD — check for broken cross-entity links
|
|
402
|
+
```
|
|
403
|
+
Maps all internal, cross-entity, and cross-workflow connections. Flags any rulesets that emit events with no matching triggers.
|
|
404
|
+
|
|
405
|
+
**Step 3: Run pre-deploy quality gates**
|
|
406
|
+
```
|
|
407
|
+
Run pre-deploy checks for this workflow change
|
|
408
|
+
```
|
|
409
|
+
`/fluent-pre-deploy-check` validates: environment is reachable, workflow structure is valid, no orphaned rulesets, all rule references resolve to deployed modules, settings exist for referenced keys. Reports READY or BLOCKED.
|
|
410
|
+
|
|
411
|
+
If BLOCKED, shows exactly what to fix (e.g., "Rule `ACCT.returns.ValidateReturnWindow` not found in any deployed module — deploy the module first").
|
|
412
|
+
|
|
413
|
+
**Step 4: Deploy the workflow**
|
|
414
|
+
```
|
|
415
|
+
Deploy ORDER::HD to MY_RETAILER
|
|
416
|
+
```
|
|
417
|
+
`/fluent-workflow-deploy` uploads the workflow. Tries MCP `workflow_upload` first; if that fails (auth issue, size limit), falls back to REST API with automatic token acquisition. Verifies the deployed version matches the uploaded version.
|
|
418
|
+
|
|
419
|
+
**Step 5: Verify with E2E test**
|
|
420
|
+
```
|
|
421
|
+
Run an E2E test of the HD flow to verify the deployment
|
|
422
|
+
```
|
|
423
|
+
Exercises the deployed workflow end-to-end and reports pass/fail. On failure, traces the specific event to pinpoint whether the new workflow change caused the issue.
|
|
424
|
+
|
|
425
|
+
**Common issues:**
|
|
426
|
+
- Diff shows "removed rulesets" — HIGH risk. Verify these rulesets are truly unused before deploying. Run connection analysis to check for incoming triggers from other workflows.
|
|
427
|
+
- Pre-deploy reports BLOCKED on rule references — the module containing those rules isn't deployed yet. Deploy the module first.
|
|
428
|
+
- Workflow upload fails with 413 — workflow JSON exceeds size limit. The skill automatically falls back to REST API upload.
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Scenario 9: "Batch ingest inventory data"
|
|
433
|
+
|
|
434
|
+
**Situation:** You need to load 10,000 inventory positions from an external system.
|
|
435
|
+
|
|
436
|
+
**Step 1: Create the batch job**
|
|
437
|
+
```
|
|
438
|
+
Create a batch ingestion job for inventory positions
|
|
439
|
+
```
|
|
440
|
+
`/fluent-job-batch` walks through the setup:
|
|
441
|
+
- Creates a JOB entity scoped to INVENTORY_POSITION
|
|
442
|
+
- Confirms the target catalogue and location refs
|
|
443
|
+
|
|
444
|
+
**Step 2: Send records in batches**
|
|
445
|
+
```
|
|
446
|
+
Send the inventory records — here's the CSV/JSON data
|
|
447
|
+
```
|
|
448
|
+
Splits records into batches (default 100 per batch), sends each via `batch_send`, tracks progress. Shows a running count: "Sent 3,200 / 10,000 records (32%)".
|
|
449
|
+
|
|
450
|
+
**Step 3: Monitor job status**
|
|
451
|
+
```
|
|
452
|
+
Check the job status
|
|
453
|
+
```
|
|
454
|
+
Polls `batch_status` and `batch_batchStatus` to show:
|
|
455
|
+
- Overall job progress (PENDING → IN_PROGRESS → COMPLETE)
|
|
456
|
+
- Per-batch results (success count, error count, error details)
|
|
457
|
+
- Records that failed with specific validation errors
|
|
458
|
+
|
|
459
|
+
**Step 4: Retry failures**
|
|
460
|
+
```
|
|
461
|
+
Show me the failed records and retry them
|
|
462
|
+
```
|
|
463
|
+
Fetches `batch_results` for failed batches, shows the specific records and error messages (e.g., "Location ref WAREHOUSE_99 not found"), and offers to re-send corrected records.
|
|
464
|
+
|
|
465
|
+
**Common failure patterns:**
|
|
466
|
+
| Error | Cause | Fix |
|
|
467
|
+
|---|---|---|
|
|
468
|
+
| "Entity not found" | Location or catalogue ref doesn't exist | Create the entity first via `/fluent-retailer-config` |
|
|
469
|
+
| "Duplicate ref" | Record already exists | Use update mode or skip duplicates |
|
|
470
|
+
| "Validation error" | Missing required fields | Fix the source data and resend |
|
|
471
|
+
| "Rate limited" | Too many concurrent batches | Reduce batch size or add delays |
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## Scenario 10: "Decompose a scope document into tasks"
|
|
476
|
+
|
|
477
|
+
**Situation:** You have a structured scope document (ADD format) describing a new feature and need an executable task plan before writing any code.
|
|
478
|
+
|
|
479
|
+
**Step 1: Feed the scope document**
|
|
480
|
+
```
|
|
481
|
+
Decompose this scope document into tasks with dependencies
|
|
482
|
+
```
|
|
483
|
+
Provide the scope doc (paste it, or point to a file). `/fluent-scope-plan` parses it and produces:
|
|
484
|
+
|
|
485
|
+
- **Ordered task list** with IDs (T-001, T-002, ...) and descriptions
|
|
486
|
+
- **Dependency DAG** — which tasks block which (e.g., T-003 depends on T-001 and T-002)
|
|
487
|
+
- **Skill mappings** — which skill handles each task (e.g., T-001 → `/fluent-module-scaffold`, T-003 → `/fluent-rule-scaffold`)
|
|
488
|
+
- **Decision classifications** — SCAFFOLD (new), EXTEND (modify existing), SOURCE_ONBOARD (restructure), CONFIGURE (settings/data)
|
|
489
|
+
- **Ambiguity flags** — where the scope is unclear and needs clarification ("T-005: scope says 'custom validation' but doesn't specify what fields to validate")
|
|
490
|
+
|
|
491
|
+
**Step 2: Resolve ambiguities**
|
|
492
|
+
```
|
|
493
|
+
For T-005, validate that the return is within 30 days of order completion
|
|
494
|
+
```
|
|
495
|
+
Clarification updates the task and clears the ambiguity flag.
|
|
496
|
+
|
|
497
|
+
**Step 3: Generate the feature plan**
|
|
498
|
+
```
|
|
499
|
+
Now generate a feature plan from these tasks
|
|
500
|
+
```
|
|
501
|
+
The task list feeds directly into `/fluent-feature-plan`, which produces the full 18-section plan with architecture diagrams, rules inventory, deployment sequence, and test plan. Each plan section cross-references the task IDs.
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Scenario 11: "Onboard existing source into a proper module"
|
|
506
|
+
|
|
507
|
+
**Situation:** You have Java rule classes from another team or a decompiled JAR, but they're not in Fluent Commerce module format. You need a buildable, deployable module.
|
|
508
|
+
|
|
509
|
+
**Step 1: Onboard the source**
|
|
510
|
+
```
|
|
511
|
+
Refactor this code into a Fluent module: accounts/MY_PROFILE/SOURCE/backend/.decompiled/fc-module-ext/
|
|
512
|
+
```
|
|
513
|
+
Or for loose Java files:
|
|
514
|
+
```
|
|
515
|
+
/fluent-module-convert ./my-rules/ --module-name my-returns
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
The skill:
|
|
519
|
+
1. **Analyzes** the existing layout (decompiled JAR? loose files? Gradle project? partial module?)
|
|
520
|
+
2. **Discovers** all rule classes (by `@RuleInfo`, `BaseRule` extension, `run()` methods)
|
|
521
|
+
3. **Plans** the target Maven multi-module structure with a full file operations table
|
|
522
|
+
4. **Waits for your approval** before changing anything
|
|
523
|
+
|
|
524
|
+
**Step 2: Review the plan**
|
|
525
|
+
|
|
526
|
+
The plan shows exactly what will happen:
|
|
527
|
+
- Which files move where
|
|
528
|
+
- What code changes are needed (package renames, base class fixes, missing annotations)
|
|
529
|
+
- Risk assessment (package renames breaking imports, decompiled artifacts, key conflicts)
|
|
530
|
+
|
|
531
|
+
**Step 3: Execute and validate**
|
|
532
|
+
|
|
533
|
+
After approval:
|
|
534
|
+
- Creates the Maven multi-module directory structure
|
|
535
|
+
- Moves and repackages Java files
|
|
536
|
+
- Fixes structural issues (wrong base class, missing `@RuleInfo`, etc.)
|
|
537
|
+
- Generates `module.json` with all rule registrations
|
|
538
|
+
- Generates build scripts, POMs, `.gitignore`
|
|
539
|
+
- Generates test skeletons for untested rules
|
|
540
|
+
- Runs `/fluent-module-validate` to verify structure
|
|
541
|
+
- Attempts a Maven build to verify compilation
|
|
542
|
+
- Cross-references against deployed rules
|
|
543
|
+
|
|
544
|
+
**Supports these input types:**
|
|
545
|
+
- Decompiled JAR output (`.decompiled/` directories)
|
|
546
|
+
- Loose Java files (no build system)
|
|
547
|
+
- Non-standard Maven projects
|
|
548
|
+
- Gradle projects (converted to Maven)
|
|
549
|
+
- Existing modules with structural issues (repair mode)
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## Scenario 12: "Gather requirements before building"
|
|
554
|
+
|
|
555
|
+
**Situation:** Product says "we need curbside pickup" but there are no structured requirements, use cases, or entity definitions.
|
|
556
|
+
|
|
557
|
+
```
|
|
558
|
+
Help me define the use cases for curbside pickup
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
`/fluent-use-case-discover` runs an interactive wizard through 12 phases:
|
|
562
|
+
|
|
563
|
+
| Phase | What happens | Output |
|
|
564
|
+
|---|---|---|
|
|
565
|
+
| 0. Mode detection | Detect input mode — vague idea vs structured requirements | Mode selection |
|
|
566
|
+
| 1. Feature identity | Define the feature boundary — what's in, what's out | Scope statement |
|
|
567
|
+
| 2. Actors & triggers | Identify who interacts (customer, store staff, OMS, WMS) | Actor registry |
|
|
568
|
+
| 3. User journeys | Walk through each user journey step by step | Structured use case list |
|
|
569
|
+
| 4. Entities & data | Define entities, subtypes, and relationships | Entity relationship diagram |
|
|
570
|
+
| 5. Business rules | Capture validation rules, constraints, edge cases | Rules inventory |
|
|
571
|
+
| 6. Integrations | Webhooks, external systems, scheduled jobs | Integration map |
|
|
572
|
+
| 7. UI & actions | User interface requirements and user actions | UI requirements |
|
|
573
|
+
| 8. Constraints & risks | Non-functional requirements, risks, edge cases | Risk register |
|
|
574
|
+
| 9. Acceptance criteria | Testable acceptance criteria per use case | Criteria list |
|
|
575
|
+
| 10. Review & gap analysis | Compare requirements against existing environment | Completeness score |
|
|
576
|
+
| 10b. Self-critique | Automated critique loop for spec quality | Refined spec |
|
|
577
|
+
|
|
578
|
+
**Output:** A Business Spec saved to `accounts/<PROFILE>/features/curbside-pickup/spec.md` with a completeness score (0-100%). Specs scoring >= 75% can proceed directly to `/fluent-feature-plan`.
|
|
579
|
+
|
|
580
|
+
> **Offline limitation:** If no Fluent profile is connected, Phase 4 (environment discovery) is skipped. The spec may contain assumptions. Connect a profile via `/fluent-profile` before running the wizard for best results.
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## Scenario 13: "Validate cross-entity workflow dependencies"
|
|
585
|
+
|
|
586
|
+
**Situation:** Your ORDER::HD workflow sends events that trigger FULFILMENT and FULFILMENT_OPTIONS workflows. You need to verify all the cross-entity connections are wired correctly.
|
|
587
|
+
|
|
588
|
+
**Step 1: Map static connections**
|
|
589
|
+
```
|
|
590
|
+
Run connection analysis on ORDER::HD
|
|
591
|
+
```
|
|
592
|
+
`/fluent-connection-analysis` maps:
|
|
593
|
+
- **Internal connections** — rulesets within ORDER::HD that SendEvent to other ORDER::HD rulesets
|
|
594
|
+
- **Cross-entity connections** — SendEvent calls targeting FULFILMENT, FULFILMENT_OPTIONS, ARTICLE entities
|
|
595
|
+
- **Cross-workflow connections** — events that leave ORDER::HD and enter another workflow
|
|
596
|
+
- **Orphaned rulesets** — rulesets with no incoming trigger
|
|
597
|
+
- **Dead-end events** — SendEvent calls with no matching target ruleset
|
|
598
|
+
|
|
599
|
+
Output includes Mermaid flowcharts showing the full event graph across workflows.
|
|
600
|
+
|
|
601
|
+
**Step 2: Compare against runtime (--validate)**
|
|
602
|
+
```
|
|
603
|
+
Run connection analysis on ORDER::HD --validate HD-12345 --entity-type ORDER
|
|
604
|
+
```
|
|
605
|
+
Compares the static workflow paths against actual runtime events for a real entity. Shows:
|
|
606
|
+
- **Expected but not fired** — rulesets that should have triggered but didn't (possible bug)
|
|
607
|
+
- **Fired but not expected** — events that occurred outside the static model (dynamic behavior, scheduled events)
|
|
608
|
+
- **Timing analysis** — how long each transition took
|
|
609
|
+
- **Cross-entity propagation** — traces events across ORDER → FULFILMENT → FULFILMENT_OPTIONS
|
|
610
|
+
|
|
611
|
+
This is the most thorough validation — it proves the workflow works as designed for real entities.
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Scenario 14: "Bump version and prepare a release"
|
|
616
|
+
|
|
617
|
+
**Situation:** You've finished development and need to version, build, validate, and deploy a module.
|
|
618
|
+
|
|
619
|
+
**Step 1: Check current version**
|
|
620
|
+
```
|
|
621
|
+
What version is the my-extensions module?
|
|
622
|
+
```
|
|
623
|
+
`/fluent-build` reads the version from `module.json`, `pom.xml` (parent + child), and CHANGELOG. Reports any inconsistencies (e.g., POM says 1.3.0 but module.json says 1.2.9).
|
|
624
|
+
|
|
625
|
+
**Step 2: Bump the version**
|
|
626
|
+
```
|
|
627
|
+
Bump my-extensions to 1.4.0
|
|
628
|
+
```
|
|
629
|
+
Updates ALL version references in sync:
|
|
630
|
+
- `plugins/pom.xml` (parent version)
|
|
631
|
+
- `plugins/rules/<module>/pom.xml` (module + parent version)
|
|
632
|
+
- `resources/module.json` (version field)
|
|
633
|
+
- `CHANGELOG.md` (moves [Unreleased] entries to [1.4.0])
|
|
634
|
+
|
|
635
|
+
**Step 3: Build**
|
|
636
|
+
```
|
|
637
|
+
Build it
|
|
638
|
+
```
|
|
639
|
+
`/fluent-build` runs `mvn clean install`, packages the ZIP, verifies the output artifact.
|
|
640
|
+
|
|
641
|
+
**Step 4: Pre-deploy gates**
|
|
642
|
+
```
|
|
643
|
+
Run pre-deploy checks
|
|
644
|
+
```
|
|
645
|
+
37 quality gates across 9 phases. If all pass → READY. If any critical gate fails → BLOCKED with specific fix instructions.
|
|
646
|
+
|
|
647
|
+
**Step 5: Deploy**
|
|
648
|
+
```
|
|
649
|
+
Deploy to MY_RETAILER
|
|
650
|
+
```
|
|
651
|
+
Module install + post-deploy verification.
|
|
652
|
+
|
|
653
|
+
**Common issues:**
|
|
654
|
+
- Version mismatch — `module.json` says 1.4.0 but `pom.xml` still says 1.3.0. Run `/fluent-build` to sync all version references.
|
|
655
|
+
- Build fails after version bump — stale `dist/` artifacts from the old version. Clean build (`mvn clean install`) resolves this.
|
|
656
|
+
- Pre-deploy gate fails on "module already deployed at same version" — bump the version again or use a `-SNAPSHOT` suffix for testing.
|
|
657
|
+
|
|
658
|
+
---
|
|
659
|
+
|
|
660
|
+
## Scenario 15: "Audit what happened in this session"
|
|
661
|
+
|
|
662
|
+
**Situation:** You've been working for an hour — scaffolded rules, edited workflows, deployed a module, ran tests. Now you need to know exactly what changed and what tools were called.
|
|
663
|
+
|
|
664
|
+
**Quick summary:**
|
|
665
|
+
```
|
|
666
|
+
What did we change this session?
|
|
667
|
+
```
|
|
668
|
+
`/fluent-session` shows three tables:
|
|
669
|
+
|
|
670
|
+
**Skill Invocations:**
|
|
671
|
+
| # | Skill | Gate | Outcome | Next |
|
|
672
|
+
|---|---|---|---|---|
|
|
673
|
+
| 1 | fluent-rule-scaffold | PASS | completed | fluent-build |
|
|
674
|
+
| 2 | fluent-build | PASS | completed | fluent-pre-deploy-check |
|
|
675
|
+
| 3 | fluent-pre-deploy-check | — | completed (READY) | fluent-module-deploy |
|
|
676
|
+
| 4 | fluent-module-deploy | PASS | completed | fluent-e2e-test |
|
|
677
|
+
|
|
678
|
+
**MCP Tool Calls:**
|
|
679
|
+
| # | Tool | Target | Write? | Outcome | Skill |
|
|
680
|
+
|---|---|---|---|---|---|
|
|
681
|
+
| 1 | entity_create | ORDER/E2E_HD_001 | Yes | ok | fluent-e2e-test |
|
|
682
|
+
| 2 | event_send | ORDER/E2E_HD_001 | Yes | ok | fluent-e2e-test |
|
|
683
|
+
| 3 | test_assert | ORDER/E2E_HD_001 status=BOOKED | No | ok | fluent-e2e-test |
|
|
684
|
+
|
|
685
|
+
**Changes:**
|
|
686
|
+
| # | Action | File/Entity | Details |
|
|
687
|
+
|---|---|---|---|
|
|
688
|
+
| 1 | CREATE | src/.../ValidateReturnWindow.java | New rule class |
|
|
689
|
+
| 2 | MODIFY | resources/module.json | Registered ValidateReturnWindow |
|
|
690
|
+
| 3 | DEPLOY | fc-module-my-returns 1.4.0 | Installed to MY_RETAILER |
|
|
691
|
+
|
|
692
|
+
**Machine-readable export:**
|
|
693
|
+
```
|
|
694
|
+
Export a JSON audit trail
|
|
695
|
+
```
|
|
696
|
+
`/fluent-session export` writes a JSON file to `accounts/<PROFILE>/sessions/` with:
|
|
697
|
+
- `skillInvocations[]` — full decision chain with gate results, handoff signals, cross-references
|
|
698
|
+
- `toolCalls[]` — every MCP tool call with target, outcome, triggering skill
|
|
699
|
+
- `changes[]` — every state mutation with rollback commands
|
|
700
|
+
- `decisionTrail[]` — explicit branch decisions with rationale and confidence
|
|
701
|
+
- `compliance` — scope traceability matrix, task completion status
|
|
702
|
+
|
|
703
|
+
The JSON is designed for CI/CD consumption — parse it as a deployment gate, feed it into Jira work logs, or attach to Confluence release pages.
|
|
704
|
+
|
|
705
|
+
> **Tip:** Run `/fluent-session` regularly during long sessions. The AI tracks changes as they happen — it's easier to review incrementally than reconstruct everything at the end.
|
|
706
|
+
|
|
707
|
+
---
|
|
708
|
+
|
|
709
|
+
## Scenario 16: "Create a data module (no Java)"
|
|
710
|
+
|
|
711
|
+
**Situation:** You need to deploy reference data, workflow fragments, or configuration assets — no custom Java rules.
|
|
712
|
+
|
|
713
|
+
```
|
|
714
|
+
Create a data module called my-reference-data
|
|
715
|
+
```
|
|
716
|
+
`/fluent-data-module-scaffold` generates:
|
|
717
|
+
- `module.json` with module metadata (no `rules` array)
|
|
718
|
+
- `assets/` directory structure for workflows, settings, and data files
|
|
719
|
+
- `config/` template for module configuration
|
|
720
|
+
- Build script that packages the module ZIP without Maven compilation
|
|
721
|
+
|
|
722
|
+
Data modules are lighter than extension modules — no POMs, no Java source, no test skeletons. They're deployed the same way (`fluent module install`) but only carry assets.
|
|
723
|
+
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
## Scenario 17: "Map what's been built on this account"
|
|
727
|
+
|
|
728
|
+
**Situation:** You're onboarding to a new Fluent Commerce account and need to understand the full implementation — what features exist, how they connect, and where the gaps are.
|
|
729
|
+
|
|
730
|
+
```
|
|
731
|
+
What has been built here? Give me a feature inventory
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
`/fluent-implementation-map` runs a 5-phase analysis:
|
|
735
|
+
|
|
736
|
+
1. **Inventory Collection** — queries workflows (`workflow_list`), custom rules (`plugin_list`), settings (`graphql_query`), and local source code to build the raw inventory
|
|
737
|
+
2. **Feature Identification** — clusters workflows into logical features using subtype alignment, cross-entity events, shared custom rules, and naming conventions
|
|
738
|
+
3. **Flow Mapping** — traces cross-feature dependencies and generates Mermaid diagrams (feature dependency graph + entity lifecycle sequence)
|
|
739
|
+
4. **Gap Analysis** — identifies missing workflows, orphaned rules, webhook health issues, dead-end risks, and OOTB coverage gaps
|
|
740
|
+
5. **Report Generation** — produces the master document plus per-feature summaries
|
|
741
|
+
|
|
742
|
+
**Output at `accounts/<PROFILE>/analysis/implementation-map/`:**
|
|
743
|
+
|
|
744
|
+
```
|
|
745
|
+
implementation-map.md ← Master document with executive summary, feature table, diagrams
|
|
746
|
+
inventory.json ← Machine-readable inventory (workflows, features, gaps, modules)
|
|
747
|
+
gaps.md ← All identified gaps with severity and remediation
|
|
748
|
+
features/
|
|
749
|
+
home-delivery.md ← Per-feature summary with workflows, rules, webhooks
|
|
750
|
+
click-collect.md
|
|
751
|
+
inventory-management.md
|
|
752
|
+
...
|
|
753
|
+
diagrams/
|
|
754
|
+
feature-dependency.mmd ← Cross-feature dependency flowchart
|
|
755
|
+
entity-flow.mmd ← Entity lifecycle sequence diagram
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
Each feature gets a **customisation depth score** (0-4: OOTB → Configured → Extended → Custom → Bespoke) and a **confidence rating** (HIGH/MEDIUM/LOW) based on evidence quality.
|
|
759
|
+
|
|
760
|
+
Read-only — no planning gate, no environment changes. Great as a first step before `/fluent-feature-explain` on specific features.
|
|
761
|
+
|
|
762
|
+
---
|
|
763
|
+
|
|
764
|
+
## Scenario 18: "Check feature status across the workspace"
|
|
765
|
+
|
|
766
|
+
**Situation:** You have multiple features in various lifecycle stages and need a dashboard view.
|
|
767
|
+
|
|
768
|
+
```
|
|
769
|
+
What features are in progress? Show the dashboard
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
`/fluent-feature-status` scans all `accounts/<PROFILE>/features/*/status.json` files and presents a consolidated table:
|
|
773
|
+
|
|
774
|
+
| Feature | Retailer | Status | Spec | Plan | Rev | Next Step |
|
|
775
|
+
|---------|----------|--------|------|------|-----|-----------|
|
|
776
|
+
| curbside-pickup | MY_RETAILER | IN_PROGRESS | APPROVED | APPROVED | 2 | /fluent-build |
|
|
777
|
+
| return-order | MY_RETAILER | VERIFIED | APPROVED | APPROVED | 1 | — |
|
|
778
|
+
| loyalty-points | MY_RETAILER | PLANNING | APPROVED | DRAFT | 1 | /fluent-feature-plan |
|
|
779
|
+
|
|
780
|
+
**Filtering:** Ask for specific states:
|
|
781
|
+
```
|
|
782
|
+
Show only IN_PROGRESS features
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
**Attention items** are highlighted automatically:
|
|
786
|
+
- Features stuck in PLANNING for more than 7 days
|
|
787
|
+
- Features with `plan: "PENDING"` but `status: "IN_PROGRESS"` (skipped approval?)
|
|
788
|
+
- Features with `basedOn` links to non-existent features
|
|
789
|
+
|
|
790
|
+
Read-only — no planning gate, no environment changes. Use this when resuming a session to see where you left off.
|
|
791
|
+
|
|
792
|
+
---
|
|
793
|
+
|
|
794
|
+
## Scenario 19: "Roll back a failed deployment"
|
|
795
|
+
|
|
796
|
+
**Situation:** You deployed a new workflow version and it's causing event failures. You need to revert to the previous version.
|
|
797
|
+
|
|
798
|
+
```
|
|
799
|
+
Roll back ORDER::HD to the previous version
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
`/fluent-rollback` follows a structured process:
|
|
803
|
+
|
|
804
|
+
**Step 1: Planning gate** — presents a rollback plan showing:
|
|
805
|
+
- Current deployed version vs target version
|
|
806
|
+
- Source of the rollback artifact (pre-deploy backup, local cache, or git history)
|
|
807
|
+
- What will change and what won't
|
|
808
|
+
- Irreversible operations that can't be rolled back (already-processed events, sent webhooks)
|
|
809
|
+
|
|
810
|
+
**Step 2: Dry run** (recommended for production):
|
|
811
|
+
```
|
|
812
|
+
Roll back ORDER::HD --dry-run
|
|
813
|
+
```
|
|
814
|
+
Shows exactly what would happen without making changes.
|
|
815
|
+
|
|
816
|
+
**Step 3: Execute** — after plan approval, uploads the previous workflow version as a new version.
|
|
817
|
+
|
|
818
|
+
**Three artifact types supported:**
|
|
819
|
+
|
|
820
|
+
| Artifact | Rollback method | Source resolution |
|
|
821
|
+
|----------|----------------|-------------------|
|
|
822
|
+
| Workflow | Re-upload previous JSON as new version | Pre-deploy backup → local cache → git history |
|
|
823
|
+
| Module | Redeploy prior module ZIP | Local dist → git tag → artifact repository |
|
|
824
|
+
| Settings | Restore prior values via GraphQL | Session export → settings audit → pre-deploy report |
|
|
825
|
+
|
|
826
|
+
**Cannot roll back:** Entity state changes, sent events, batch ingestion data, webhook deliveries. The skill refuses these and suggests compensating alternatives.
|
|
827
|
+
|
|
828
|
+
---
|
|
829
|
+
|
|
830
|
+
## Scenario 20: "Preview what the UI will look like before building"
|
|
831
|
+
|
|
832
|
+
**Situation:** You've planned a new UI component or manifest change and want to verify how it will look in the live app before committing to the full build cycle.
|
|
833
|
+
|
|
834
|
+
```
|
|
835
|
+
Preview what the appeasement card looks like on the order detail page
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
`/fluent-mystique-preview` operates in three modes:
|
|
839
|
+
|
|
840
|
+
| Mode | What it does | When to use |
|
|
841
|
+
|------|-------------|-------------|
|
|
842
|
+
| **ADD** | Injects a new component into the live app via JavaScript | You're building a new section/card |
|
|
843
|
+
| **MODIFY** | Overlays changes on an existing component | You're updating an existing page element |
|
|
844
|
+
| **REMOVE** | Hides an existing component temporarily | You're removing a section |
|
|
845
|
+
|
|
846
|
+
**What happens:**
|
|
847
|
+
|
|
848
|
+
1. **AI builds a preview spec** — component type, data sources, layout, and injection point
|
|
849
|
+
2. **Reads live app DOM** — `take_snapshot` maps the current page structure
|
|
850
|
+
3. **Injects preview via JavaScript** — no manifest changes, no deploy required
|
|
851
|
+
4. **Takes before/after screenshots** — annotated with green (ADD), amber (MODIFY), red (REMOVE) glow
|
|
852
|
+
5. **Iterative refinement loop** — you give feedback ("move it above the status bar", "change the label"), AI adjusts and re-injects
|
|
853
|
+
6. **Approval or skip** — `preview: "APPROVED"` in status.json gates the manifest build
|
|
854
|
+
|
|
855
|
+
**Artifacts created:**
|
|
856
|
+
|
|
857
|
+
| Artifact | Path |
|
|
858
|
+
|----------|------|
|
|
859
|
+
| Before screenshot | `accounts/<PROFILE>/reports/preview/before-<timestamp>.png` |
|
|
860
|
+
| After screenshot | `accounts/<PROFILE>/reports/preview/after-<timestamp>.png` |
|
|
861
|
+
| Preview spec | `accounts/<PROFILE>/reports/preview/preview-spec.json` |
|
|
862
|
+
| Status updated | `features/<slug>/status.json` → `preview: "APPROVED"` |
|
|
863
|
+
|
|
864
|
+
**Skill chain:** `fluent-mystique-preview` → (on approval) → `fluent-mystique-builder` → `fluent-mystique-assess`
|
|
865
|
+
|
|
866
|
+
Read-only phase (preview) has no planning gate. The manifest build that follows requires an approved plan.
|
|
867
|
+
|
|
868
|
+
---
|
|
869
|
+
|
|
870
|
+
## Scenario 21: "Show me the workspace structure"
|
|
871
|
+
|
|
872
|
+
**Situation:** You want to see what's in the workspace — features, workflows, source code, reports — with counts and annotations.
|
|
873
|
+
|
|
874
|
+
```
|
|
875
|
+
Show me the workspace tree
|
|
876
|
+
```
|
|
877
|
+
|
|
878
|
+
`/fluent-workspace-tree` produces an annotated directory listing:
|
|
879
|
+
|
|
880
|
+
```
|
|
881
|
+
accounts/MY_PROFILE/
|
|
882
|
+
SOURCE/ (2 backend repos)
|
|
883
|
+
backend/
|
|
884
|
+
fc-module-my-extensions/ (97 rules, v1.4.0)
|
|
885
|
+
fc-module-my-returns/ (3 rules, v1.0.0)
|
|
886
|
+
frontend/ (SDK component projects)
|
|
887
|
+
workflows/MY_RETAILER/ (17 workflows)
|
|
888
|
+
ORDER__HD.json (v1.51, 64 rulesets)
|
|
889
|
+
ORDER__CC.json (v1.12, 50 rulesets)
|
|
890
|
+
...
|
|
891
|
+
features/ (4 features)
|
|
892
|
+
curbside-pickup/ IN_PROGRESS (plan rev 2)
|
|
893
|
+
return-order/ VERIFIED
|
|
894
|
+
home-delivery/ architecture only
|
|
895
|
+
loyalty-points/ PLANNING
|
|
896
|
+
reports/ (3 reports)
|
|
897
|
+
pre-deploy/my-returns.json 2026-02-24
|
|
898
|
+
analysis/
|
|
899
|
+
implementation-map/ (11 features mapped)
|
|
900
|
+
code/ (source-map, behavior-map)
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
Read-only — no planning gate, no environment changes. Useful for orientation when starting a new session or after running multiple skills.
|
|
904
|
+
|
|
905
|
+
---
|
|
906
|
+
|
|
907
|
+
## Frontend / Mystique UI Scenarios
|
|
908
|
+
|
|
909
|
+
### Scenario: Build a New UI Page
|
|
910
|
+
|
|
911
|
+
**You say:** "Build an order detail page showing order summary, customer info, items, and fulfilments"
|
|
912
|
+
|
|
913
|
+
**What happens:**
|
|
914
|
+
1. `/fluent-mystique-builder` analyzes the requirement against OOTB components
|
|
915
|
+
2. Presents a plan: route structure, component tree, data query, composition pattern
|
|
916
|
+
3. On approval: generates manifest JSON with `fc.page` → `fc.card.attribute` (summary) + `fc.card.attribute` (customer) + `fc.tabs.card` (items/fulfilments)
|
|
917
|
+
4. Auto-runs `/fluent-mystique-assess` to verify structure
|
|
918
|
+
|
|
919
|
+
**You get:** A complete manifest JSON page definition ready to deploy as a Fluent setting.
|
|
920
|
+
|
|
921
|
+
### Scenario: Validate Before Deploying
|
|
922
|
+
|
|
923
|
+
**You say:** "Validate the admin manifest before I deploy it"
|
|
924
|
+
|
|
925
|
+
**What happens:**
|
|
926
|
+
1. `/fluent-mystique-assess` runs ~50 rules across 6 phases
|
|
927
|
+
2. Checks schema compliance, component aliases, GraphQL queries, template strings, prop completeness, cross-manifest references
|
|
928
|
+
3. Reports issues by severity (CRITICAL/HIGH/MEDIUM/LOW)
|
|
929
|
+
|
|
930
|
+
**You get:** A validation report with pass/fail and specific fix suggestions for any issues found.
|
|
931
|
+
|
|
932
|
+
### Scenario: Custom Component When OOTB Falls Short
|
|
933
|
+
|
|
934
|
+
**You say:** "I need a drag-and-drop pick list interface for warehouse staff"
|
|
935
|
+
|
|
936
|
+
**What happens:**
|
|
937
|
+
1. `/fluent-mystique-builder` evaluates the Build vs Configure decision framework
|
|
938
|
+
2. Determines OOTB components can't handle drag-and-drop → escalates to Step 4 (custom component)
|
|
939
|
+
3. `/fluent-mystique-scaffold` creates a complete SDK project: webpack config, TypeScript setup, component boilerplate, Storybook stories, Jest tests
|
|
940
|
+
4. Manifest is updated with `plugins[]` reference to the custom bundle
|
|
941
|
+
|
|
942
|
+
**You get:** A buildable SDK project with `ComponentRegistry.register()` wiring and a manifest referencing the custom component.
|
|
943
|
+
|
|
944
|
+
### Scenario: Analyze What's Built in an App
|
|
945
|
+
|
|
946
|
+
**You say:** "What components are used in the admin manifest? Any complexity issues?"
|
|
947
|
+
|
|
948
|
+
**What happens:**
|
|
949
|
+
1. `/fluent-mystique-assess` runs 7-dimension analysis: component census, route mapping, complexity scoring (weighted 0-100), data query analysis, i18n coverage, pattern detection, Mermaid diagrams
|
|
950
|
+
|
|
951
|
+
**You get:** A comprehensive analysis report with component counts, unused components, complexity hotspots, and optimization recommendations.
|
|
952
|
+
|
|
953
|
+
### Scenario: Full-Stack Feature (Backend + Frontend)
|
|
954
|
+
|
|
955
|
+
**You say:** "Build order tracking with a customer-facing status page"
|
|
956
|
+
|
|
957
|
+
**What happens:**
|
|
958
|
+
1. `/fluent-feature-plan` creates a unified plan covering both backend (workflow rules, settings) and frontend (manifest pages, components)
|
|
959
|
+
2. On approval: backend agent builds rules → workflows → settings first
|
|
960
|
+
3. Then frontend agent builds manifest → validates → deploys
|
|
961
|
+
4. `/fluent-e2e-test` runs cross-cutting tests
|
|
962
|
+
|
|
963
|
+
**You get:** Complete backend logic AND UI pages deployed and verified end-to-end.
|
|
964
|
+
|
|
965
|
+
### Scenario: Verify a Deployed Manifest in the Browser
|
|
966
|
+
|
|
967
|
+
**You say:** "Test the OMS orders page in the browser"
|
|
968
|
+
|
|
969
|
+
**What happens:**
|
|
970
|
+
1. `/fluent-ui-test` checks that Chrome DevTools MCP is connected (the `chrome-devtools` server must be configured in `.mcp.json`)
|
|
971
|
+
2. Navigates to the OMS app URL, handles login if needed (asks you for credentials)
|
|
972
|
+
3. Navigates to the `/oms/orders` route
|
|
973
|
+
4. Takes a DOM snapshot to verify: page loads without errors, list component renders with data, pagination controls present, search/filter functional
|
|
974
|
+
5. Checks `list_console_messages` for React or GraphQL errors
|
|
975
|
+
6. Captures a screenshot for visual confirmation
|
|
976
|
+
|
|
977
|
+
**You get:** A pass/fail report with checks (login, page load, data load, component rendering) and screenshot evidence. Issues are reported with severity (CRITICAL for page errors, MEDIUM for missing components, LOW for stale cache).
|
|
978
|
+
|
|
979
|
+
**Prerequisites:** Chrome DevTools MCP configured in `.mcp.json`, manifest already deployed via `setting_upsert`, `FLUENT_USERNAME` and `FLUENT_PASSWORD` set as environment variables.
|
|
980
|
+
|
|
981
|
+
### Scenario: Deep-Link to a Specific Location or Retailer Context
|
|
982
|
+
|
|
983
|
+
**You say:** "Test the Store app waves page for location LOC_SYD_001"
|
|
984
|
+
|
|
985
|
+
**What happens:**
|
|
986
|
+
1. `/fluent-ui-test` constructs a deep-link URL with the context pre-selection parameter:
|
|
987
|
+
`store/#/waves?user.location.ref=LOC_SYD_001`
|
|
988
|
+
2. The Mystique app reads the URL parameter (highest priority), resolves the location, and persists the selection to `localStorage["mystique.auth.context.location"]`
|
|
989
|
+
3. All subsequent navigation stays in that location context until the user switches
|
|
990
|
+
|
|
991
|
+
**Context resolution order** (both Store and OMS apps):
|
|
992
|
+
|
|
993
|
+
| Priority | Source | Example |
|
|
994
|
+
|----------|--------|---------|
|
|
995
|
+
| 1 (highest) | URL parameter | `?user.location.ref=LOC_SYD_001` (Store) or `?user.retailer.ref=RET_001` (OMS) |
|
|
996
|
+
| 2 | localStorage | `mystique.auth.context.location` (Store) or `mystique.auth.context.retailer` (OMS) |
|
|
997
|
+
| 3 (fallback) | First accessible entity | First location/retailer the user has permission to access |
|
|
998
|
+
|
|
999
|
+
**Key details:**
|
|
1000
|
+
- URL parameters go **after** the hash path: `store/#/waves?user.location.ref=...` (not before the `#`)
|
|
1001
|
+
- localStorage stores the entity **ID** (not the ref) — the app resolves the ref to an ID on first use
|
|
1002
|
+
- OMS equivalent: `oms/#/orders?user.retailer.ref=RET_001` with `mystique.auth.context.retailer`
|
|
1003
|
+
- The manifest must have `context.switcher: true` for the context dropdown to appear in the UI
|
|
1004
|
+
|
|
1005
|
+
**Full reference:** `knowledge/platform/mystique-routing.md` § Context Switching
|
|
1006
|
+
|
|
1007
|
+
---
|
|
1008
|
+
|
|
1009
|
+
## What Happens Behind the Scenes
|
|
1010
|
+
|
|
1011
|
+
When you ask your AI assistant to perform these tasks, it doesn't just generate text — it **executes real operations** against your Fluent environment:
|
|
1012
|
+
|
|
1013
|
+
| Layer | What it does |
|
|
1014
|
+
|-------|-------------|
|
|
1015
|
+
| **AI Skills** (knowledge layer) | Teach the AI *how* to do Fluent tasks — patterns, decision trees, best practices |
|
|
1016
|
+
| **MCP Extension Server** (execution layer) | 55+ tools for real API operations — GraphQL queries, event dispatch, metrics, batch ingestion, workflow fetch, cache, connections, planning |
|
|
1017
|
+
| **Official MCP Server** (CLI layer) | Workflow listing, downloading, GraphQL validation via the Fluent CLI |
|
|
1018
|
+
| **Chrome DevTools MCP** (browser layer) | Browser automation for UI testing — login, navigate, snapshot, screenshot (optional, for `/fluent-ui-test`) |
|
|
1019
|
+
| **Fluent Commerce API** (platform) | The actual REST/GraphQL endpoints being called |
|
|
1020
|
+
|
|
1021
|
+
### Planning Gate
|
|
1022
|
+
|
|
1023
|
+
Before any implementation work, the AI presents a structured plan and **waits for your explicit approval**. This isn't optional — it's enforced by every implementation skill. You can ask questions, request changes, or reject the plan entirely. No code is written, no entities are created, and no deployments happen without your say-so.
|
|
1024
|
+
|
|
1025
|
+
### Progress Visualization
|
|
1026
|
+
|
|
1027
|
+
Multi-phase skills show a live progress block as they work, so you always know where the AI is in the process:
|
|
1028
|
+
|
|
1029
|
+
```
|
|
1030
|
+
▸ /fluent-pre-deploy-check [3/8]
|
|
1031
|
+
✓ Environment ✓ Module structure
|
|
1032
|
+
✓ Workflow validity → Connections
|
|
1033
|
+
○ Settings ○ Target environment
|
|
1034
|
+
○ Risk assessment ○ Completeness
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
- `✓` completed — `→` currently running — `○` pending
|
|
1038
|
+
- The block updates at each phase transition
|
|
1039
|
+
|
|
1040
|
+
Available on the 10 most-used skills: `/fluent-feature-plan`, `/fluent-trace`, `/fluent-e2e-test`, `/fluent-implementation-map`, `/fluent-feature-explain`, `/fluent-build`, `/fluent-pre-deploy-check`, `/fluent-connection-analysis`, `/fluent-use-case-discover`, `/fluent-workflow-builder`.
|
|
1041
|
+
|
|
1042
|
+
### Skill Chains and Handoff Signals
|
|
1043
|
+
|
|
1044
|
+
Skills communicate via handoff signals:
|
|
1045
|
+
- `-> READY: <path>` — "I'm done, here's what I produced"
|
|
1046
|
+
- `-> NEXT: /fluent-build` — "The next step is this skill"
|
|
1047
|
+
- `-> BLOCKED: No module found` — "I can't proceed; here's why and what to do"
|
|
1048
|
+
- `-> SKIP: No settings changes` — "This step doesn't apply"
|
|
1049
|
+
|
|
1050
|
+
These signals chain skills together automatically. When `/fluent-rule-scaffold` finishes, it emits `-> NEXT: /fluent-build`. The agent follows the chain without you having to spell out each step.
|
|
1051
|
+
|
|
1052
|
+
### Error Taxonomy
|
|
1053
|
+
|
|
1054
|
+
When something goes wrong, skills report structured error codes:
|
|
1055
|
+
- `PLAN_REQUIRED` — you tried to implement without an approved plan
|
|
1056
|
+
- `PREREQ_MISSING` — a dependency doesn't exist yet (e.g., no module to add rules to)
|
|
1057
|
+
- `VALIDATION_FAILED` — input failed structural or semantic checks
|
|
1058
|
+
- `ENV_UNREACHABLE` — can't connect to the Fluent environment
|
|
1059
|
+
- `DEPLOYMENT_BLOCKED` — pre-deploy gates failed
|
|
1060
|
+
|
|
1061
|
+
Each error code comes with a recovery action (which skill to run to fix it).
|
|
1062
|
+
|
|
1063
|
+
### Three-Level Pre-Flight Chain
|
|
1064
|
+
|
|
1065
|
+
For multi-artifact features, enforcement happens at three levels:
|
|
1066
|
+
1. **Requirements check** — `/fluent-feature-plan` verifies a Business Spec exists (or structured requirements are provided). If not → redirects to `/fluent-use-case-discover`.
|
|
1067
|
+
2. **Plan verification** — each implementation skill checks for an approved plan. If not → redirects to `/fluent-feature-plan`.
|
|
1068
|
+
3. **Dependency checks** — each skill checks that its prerequisites exist (e.g., rule-scaffold checks the module exists). If not → redirects to the prerequisite skill.
|
|
1069
|
+
|
|
1070
|
+
This creates an enforced chain: **requirements → plan → implementation**. No step can be skipped without explicit user override.
|
|
1071
|
+
|
|
1072
|
+
### Session Tracking
|
|
1073
|
+
|
|
1074
|
+
Every skill invocation, MCP tool call, and state change is tracked during the session. At any point you can ask "what did we change?" for a structured report, or export a JSON audit trail for CI/CD pipelines.
|
|
1075
|
+
|
|
1076
|
+
---
|
|
1077
|
+
|
|
1078
|
+
## Evidence and Confidence
|
|
1079
|
+
|
|
1080
|
+
Analysis outputs include confidence levels based on available evidence:
|
|
1081
|
+
|
|
1082
|
+
| Evidence available | Confidence | What you get |
|
|
1083
|
+
|---|---|---|
|
|
1084
|
+
| Workflow JSON + `plugin_list` only | LOW-MEDIUM | Structure is accurate; rule behavior is inferred from descriptions |
|
|
1085
|
+
| + Decompiled JAR (bytecode) | MEDIUM-HIGH | Implementation logic visible but variable names may be synthetic |
|
|
1086
|
+
| + Original source code | HIGH | Full logic, test coverage, and prop validation |
|
|
1087
|
+
| + Runtime evidence (real entity trace) | HIGHEST | Static analysis validated against actual execution |
|
|
1088
|
+
|
|
1089
|
+
When evidence is incomplete, the AI flags it explicitly and recommends how to get higher confidence (provide source, run a test entity, etc.).
|
|
1090
|
+
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
## Known Limitations
|
|
1094
|
+
|
|
1095
|
+
| Capability | Status | Workaround |
|
|
1096
|
+
|-----------|--------|-----------|
|
|
1097
|
+
| Live log tailing / real-time event streaming | Not supported | Use `event_list` with time filters for polling |
|
|
1098
|
+
| Multi-retailer operations in single command | Not supported | Switch retailer context between operations |
|
|
1099
|
+
| Visual workflow editor (GUI) | Not supported | Edit workflow JSON directly via `/fluent-workflow-builder` |
|
|
1100
|
+
| Anonymous mode (no credentials) | Not supported | MCP tools require profile auth or OAuth credentials |
|
|
1101
|
+
| Decompiled source modification | Read-only | Analyze decompiled code but can't edit it; provide original source or scaffold a new module via `/fluent-module-convert` |
|
|
1102
|
+
| Windows `::` in workflow filenames | Auto-handled | CLI and skills auto-sanitize to `__` and maintain `workflow-file-map.json` |
|
|
1103
|
+
| `fluent workflow merge` upload bug | Known CLI bug | Skills use REST API upload as fallback automatically |
|
|
1104
|
+
| `workflow_simulate` runtime execution | Static only | Simulates by matching status + event + subtype; does not execute Java rules or check runtime state |
|
|
1105
|
+
| Java rule execution | Not supported | Skills can scaffold, build, and deploy rules but cannot execute them locally; use E2E tests against the live environment |
|
|
1106
|
+
|
|
1107
|
+
---
|
|
1108
|
+
|
|
1109
|
+
## Troubleshooting
|
|
1110
|
+
|
|
1111
|
+
### Skill Gate Errors
|
|
1112
|
+
|
|
1113
|
+
These errors come from the skill enforcement chain. Each one tells you exactly what's missing and which skill to run.
|
|
1114
|
+
|
|
1115
|
+
| Error code | What happened | Fix |
|
|
1116
|
+
|---|---|---|
|
|
1117
|
+
| `PLAN_REQUIRED` | You asked a skill to implement something but there's no approved plan | Run `/fluent-feature-plan` (multi-artifact) or let the skill create a task plan (single artifact). Approve it, then retry. |
|
|
1118
|
+
| `PREREQ_MISSING` | A skill needs something that doesn't exist yet | Follow the redirect. Common cases: `/fluent-rule-scaffold` needs a module → run `/fluent-module-scaffold`. `/fluent-workflow-builder` needs deployed rules → run `/fluent-build` then `/fluent-module-deploy`. `/fluent-build` needs a validation report → run `/fluent-module-validate`. |
|
|
1119
|
+
| `VALIDATION_FAILED` | Input data failed structural or semantic checks | Read the error details — they specify which field or structure is wrong. Fix and retry. |
|
|
1120
|
+
| `ENV_UNREACHABLE` | Can't connect to the Fluent environment | Run `config_validate` and `connection_test` via MCP to diagnose. Common causes: expired credentials, wrong profile, VPN not connected. |
|
|
1121
|
+
| `DEPLOYMENT_BLOCKED` | Pre-deploy quality gates failed | Run `/fluent-pre-deploy-check` to see the full gate report. Each blocked gate explains what to fix. |
|
|
1122
|
+
|
|
1123
|
+
If you want to bypass a gate, say **"skip planning"** or **"just do it"** — the override is logged as `USER_OVERRIDE`.
|
|
1124
|
+
|
|
1125
|
+
### MCP Tool Errors
|
|
1126
|
+
|
|
1127
|
+
These errors come from the MCP extension server when calling Fluent Commerce APIs. Every tool response includes `ok: true` or `ok: false` with a typed error code.
|
|
1128
|
+
|
|
1129
|
+
| Error code | What it means | What to do |
|
|
1130
|
+
|---|---|---|
|
|
1131
|
+
| `CONFIG_ERROR` | Environment variables are missing or invalid | Check `.mcp.json` — verify `FLUENT_PROFILE` is set (or OAuth credentials if not using profile auth). Restart IDE after editing `.mcp.json`. |
|
|
1132
|
+
| `AUTH_ERROR` | Credentials are wrong or expired | For profile auth: run `fluent profile update YOUR_PROFILE --username <user> --password <new-pass>` to refresh credentials. For OAuth: verify `FLUENT_CLIENT_ID`/`FLUENT_CLIENT_SECRET`/`FLUENT_USERNAME`/`FLUENT_PASSWORD` environment variables are set correctly. |
|
|
1133
|
+
| `TIMEOUT_ERROR` | Request took longer than 30 seconds (default) | For large queries, increase `FLUENT_REQUEST_TIMEOUT_MS` in `.mcp.json` env block (e.g., `"60000"` for 60s). |
|
|
1134
|
+
| `RATE_LIMIT` | Too many API requests | Wait a moment and retry. The server uses exponential backoff automatically for read operations. |
|
|
1135
|
+
| `UPSTREAM_UNAVAILABLE` | Fluent API returned 502/503/504 | The platform may be under maintenance. Check Fluent status page. Reads retry automatically (up to 3 attempts with backoff). |
|
|
1136
|
+
| `NETWORK_ERROR` | Can't reach the API endpoint at all | Check VPN, network connectivity, firewall. Verify the base URL in your profile is correct. |
|
|
1137
|
+
| `SDK_ERROR` | Fluent SDK returned an unexpected error | Usually a bug or unsupported operation. Check the error message for details. |
|
|
1138
|
+
|
|
1139
|
+
### Common Setup Problems
|
|
1140
|
+
|
|
1141
|
+
**"I typed a slash command but nothing happened"**
|
|
1142
|
+
- Skills must be installed first: `npx @fluentcommerce/ai-skills install`
|
|
1143
|
+
- Slash commands (`/fluent-*`) only work in Claude Code. Other IDEs use natural language prompts that trigger the same skills.
|
|
1144
|
+
|
|
1145
|
+
**"I keep getting permission prompts"**
|
|
1146
|
+
- First-run connect/bootstrap flows usually need shell and filesystem access so the AI can run `fluent` / `npx`, read `~/.fluentcommerce/`, and write `.mcp.json` plus `accounts/`
|
|
1147
|
+
- That is separate from the planning gate. Tool permissions are IDE sandbox prompts; the approval gate is the skill asking whether it should proceed with a planned change
|
|
1148
|
+
|
|
1149
|
+
**"MCP tools aren't available"**
|
|
1150
|
+
- Run `npx @fluentcommerce/ai-skills mcp-setup --profile YOUR_PROFILE` to generate `.mcp.json`
|
|
1151
|
+
- Restart your IDE after creating or editing `.mcp.json` — MCP servers are loaded at startup
|
|
1152
|
+
- Verify with `config_validate` → `health_ping` → `connection_test` (in that order)
|
|
1153
|
+
|
|
1154
|
+
**"Workflow download fails or returns empty"**
|
|
1155
|
+
- Check you have the right profile and retailer: `fluent workflow list -p YOUR_PROFILE -r YOUR_RETAILER`
|
|
1156
|
+
- Fluent CLI must be installed: see [install guide](https://docs.fluentcommerce.com/building-blocks/fluent-cli-package)
|
|
1157
|
+
- The profile must have the retailer associated — verify with `fluent profile retailers YOUR_PROFILE`
|
|
1158
|
+
|
|
1159
|
+
**"The AI keeps asking me to approve a plan"**
|
|
1160
|
+
- This is by design — the planning gate prevents unreviewed changes. Say **"approved"**, **"yes"**, or **"go ahead"** to proceed. Or say **"just do it"** or **"skip planning"** to bypass.
|
|
1161
|
+
|
|
1162
|
+
**"Bootstrap got part-way through and then stopped"**
|
|
1163
|
+
- That usually means account-specific setup needs attention: missing retailer context, missing credentials, incomplete module config values, or environment permissions
|
|
1164
|
+
- Re-run with the exact error and treat `/fluent-bootstrap` as a guided workflow, not a guaranteed one-shot installer
|
|
1165
|
+
|
|
1166
|
+
**"I came back to a session and the AI lost context"**
|
|
1167
|
+
- Check `accounts/<PROFILE>/features/*/status.json` — the AI reads these to resume where you left off
|
|
1168
|
+
- If `status.json` shows `next: "/fluent-rule-scaffold"`, the AI knows to continue with that skill
|
|
1169
|
+
- If files are missing, re-run `/fluent-connect` to rebuild workspace state
|
|
1170
|
+
|
|
1171
|
+
**"Response is truncated or summarized"**
|
|
1172
|
+
- Large API responses are auto-summarized (not truncated) when they exceed 50,000 characters. The summary includes record counts, field inventory, distributions, and sample records.
|
|
1173
|
+
- To get full raw data, set `FLUENT_RESPONSE_BUDGET_CHARS=0` in `.mcp.json` env block. This disables the budget and returns everything.
|
|
1174
|
+
|
|
1175
|
+
---
|
|
1176
|
+
|
|
1177
|
+
## Further Reading
|
|
1178
|
+
|
|
1179
|
+
- [Prompt Guide](02-prompt-guide.md) — Which skills exist, what to type, agent routing, lifecycle stages
|
|
1180
|
+
- [Dev Workflow](06-dev-workflow.md) — Full development lifecycle with all phases
|
|
1181
|
+
- [Chrome DevTools MCP](chrome-devtools-mcp-reference.md) — Browser automation and UI testing reference
|