@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
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: fluent-
|
|
3
|
-
description:
|
|
2
|
+
name: fluent-module-convert
|
|
3
|
+
description: Convert existing Java source code into a proper Fluent Commerce extension module by analyzing non-standard layouts and restructuring into Maven multi-module format. Use for converting or migrating existing code to module format.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: <source-path> [--module-name <name>] [--account-prefix <PREFIX>] [--dry-run] [--skip-build]
|
|
7
7
|
cursor-tier: manual
|
|
8
|
-
planning-gate:
|
|
8
|
+
planning-gate: mandatory
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# Module Converter
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Convert existing Java source code — whether loose files, a non-standard project layout, a decompiled JAR, a plugin, or a project using a different build system — into a proper Fluent Commerce extension module that passes `/fluent-module-validate` and builds with `/fluent-build`.
|
|
14
14
|
|
|
15
15
|
## Pre-flight: Feedback Check
|
|
16
16
|
|
|
17
17
|
Before starting, check for past learnings from this skill:
|
|
18
18
|
|
|
19
|
-
1. Check if `accounts/<PROFILE>/feedback/fluent-
|
|
19
|
+
1. Check if `accounts/<PROFILE>/feedback/fluent-module-convert.jsonl` exists
|
|
20
20
|
2. If yes, read last 20 records
|
|
21
21
|
3. Filter to: FAILURE or USER_CORRECTED outcomes, confidence = CONFIRMED or PROMOTED
|
|
22
22
|
4. Extract top 3 relevant learnings — use as internal guidance during execution
|
|
@@ -25,14 +25,16 @@ Before starting, check for past learnings from this skill:
|
|
|
25
25
|
## When to Use
|
|
26
26
|
|
|
27
27
|
- "I have Java rule classes but they're not in a Fluent module structure"
|
|
28
|
+
- "Convert this existing plugin to a proper module"
|
|
28
29
|
- "Onboard this decompiled JAR into a buildable module"
|
|
29
30
|
- "Convert this Gradle project to Fluent Commerce module format"
|
|
30
31
|
- "I have source code from another team — make it a proper module"
|
|
31
32
|
- "Restructure this code into the standard Maven multi-module layout"
|
|
32
33
|
- "Import these rule classes into a deployable module"
|
|
34
|
+
- "Analyze this plugin and convert it to module format"
|
|
33
35
|
- Code exists in `accounts/<PROFILE>/SOURCE/backend/` but doesn't pass `/fluent-module-validate`
|
|
34
36
|
- Decompiled output exists in `accounts/<PROFILE>/SOURCE/backend/.decompiled/` and needs to become a buildable module
|
|
35
|
-
- `/fluent-scope-plan` generated a `
|
|
37
|
+
- `/fluent-scope-plan` generated a `MODULE_CONVERT` task
|
|
36
38
|
|
|
37
39
|
## When NOT to Use
|
|
38
40
|
|
|
@@ -88,11 +90,62 @@ This skill does **not** own:
|
|
|
88
90
|
|
|
89
91
|
## Execution Protocol
|
|
90
92
|
|
|
91
|
-
**Phase ordering note:** Unlike most implementation skills,
|
|
93
|
+
**Phase ordering note:** Unlike most implementation skills, module-convert has TWO user checkpoints before any files are modified:
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
1. **Phase 0** — Intake triage: resolve ambiguity (source path, intent, namespace, module name)
|
|
96
|
+
2. **Phase 1** — Source analysis (read-only): scan, classify, present findings → **user confirms or corrects**
|
|
97
|
+
3. **Phase 2** — Planning gate (mandatory): present restructuring plan → **user approves before execution**
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
This two-checkpoint flow is intentional. The user knows their code better than the AI — they can catch misclassified rules, wrong namespaces, or deprecated code at the analysis stage, before the plan is built on top of potentially wrong assumptions.
|
|
100
|
+
|
|
101
|
+
### Phase 0: Intake Triage
|
|
102
|
+
|
|
103
|
+
Before scanning any files, resolve critical unknowns. Ask these **only if the answer is not already clear** from the user's prompt, arguments, or workspace context. Do not ask questions you can answer by reading the filesystem.
|
|
104
|
+
|
|
105
|
+
#### 0.1 Source Path
|
|
106
|
+
|
|
107
|
+
If the user did not provide a `source-path`:
|
|
108
|
+
1. Check `accounts/<PROFILE>/SOURCE/backend/` for candidate directories
|
|
109
|
+
2. If exactly one candidate, confirm: _"Found `accounts/ACME/SOURCE/backend/legacy-plugin/` — convert this?"_
|
|
110
|
+
3. If multiple candidates, list them and ask which one
|
|
111
|
+
4. If none, ask: _"Where is the source code you want to convert? Provide a path relative to the workspace root."_
|
|
112
|
+
|
|
113
|
+
#### 0.2 Intent Check
|
|
114
|
+
|
|
115
|
+
If the prompt uses ambiguous language ("analyze", "look at", "check") without clear conversion intent ("convert", "restructure", "module format", "onboard"):
|
|
116
|
+
- Ask: _"Do you want to **analyze** this code (understand what it does → `/fluent-custom-code`) or **convert** it into a Fluent module (restructure + build infrastructure)?"_
|
|
117
|
+
|
|
118
|
+
If the source path already contains a valid `module.json` + `pom.xml` + standard Maven layout:
|
|
119
|
+
- Ask: _"This already looks like a valid Fluent module. Do you want to **repair** structural issues, or **re-convert** from scratch?"_
|
|
120
|
+
|
|
121
|
+
#### 0.3 Plugin Namespace (Account Prefix)
|
|
122
|
+
|
|
123
|
+
The plugin namespace determines rule registration keys (e.g., `ACME.order.ValidateReturnWindow`). This MUST be correct — a wrong namespace means workflows can't find the rules at runtime.
|
|
124
|
+
|
|
125
|
+
**Auto-detection order:**
|
|
126
|
+
1. `--account-prefix` argument → use as-is
|
|
127
|
+
2. Existing `module.json` in the source → extract from rule keys (the prefix before the first `.`)
|
|
128
|
+
3. `plugin_list` from the live environment → extract common prefix from deployed rules
|
|
129
|
+
4. Active profile name from CLI context
|
|
130
|
+
|
|
131
|
+
**If auto-detection fails or finds conflicting prefixes**, ask:
|
|
132
|
+
_"What plugin namespace should I use for rule registration? This becomes the prefix in rule keys like `<NAMESPACE>.order.ValidateReturnWindow`."_
|
|
133
|
+
|
|
134
|
+
**If auto-detected prefix differs from deployed prefix**, warn and confirm:
|
|
135
|
+
_"The source uses prefix `ACME` but deployed rules use `MY_COMPANY`. Which should the converted module use?"_
|
|
136
|
+
- **Use deployed prefix** (recommended) — zero-disruption, workflows keep working
|
|
137
|
+
- **Use source prefix** — requires workflow redeployment to update rule references
|
|
138
|
+
|
|
139
|
+
#### 0.4 Module Name
|
|
140
|
+
|
|
141
|
+
If `--module-name` was not provided and cannot be derived from the source directory name or existing `module.json`:
|
|
142
|
+
- Ask: _"What should the module be called? This sets the Maven artifact ID and module.json name (e.g., `my-returns`)."_
|
|
143
|
+
|
|
144
|
+
**Skip Phase 0 entirely** when the user provides a clear `source-path`, conversion intent, and the source contains enough context to auto-detect namespace and module name.
|
|
145
|
+
|
|
146
|
+
### Phase 1: Source Analysis (read-only, results shown to user)
|
|
147
|
+
|
|
148
|
+
**Goal:** Understand what exists, classify its state, and identify all rule classes. **No files are modified in this phase.** Analysis results are presented to the user at the end of this phase — the user can correct misclassifications before the plan is built.
|
|
96
149
|
|
|
97
150
|
#### Step 1.1: Classify Source Layout
|
|
98
151
|
|
|
@@ -123,12 +176,19 @@ source-path/
|
|
|
123
176
|
For each Java file found, determine if it's a Fluent rule class:
|
|
124
177
|
|
|
125
178
|
**Detection patterns** (check in order):
|
|
126
|
-
1. Extends `BaseRule` or `Rule` (from Rubix SDK)
|
|
179
|
+
1. Extends `BaseRule` or `Rule` (from Rubix SDK) — **check transitively**: if a class extends a project-local base class (e.g., `com.puma.common.BaseRule`) that itself implements `Rule` or extends SDK `BaseRule`, treat it as a rule. Read the base class source to confirm.
|
|
127
180
|
2. Has `@RuleInfo` annotation
|
|
128
|
-
3. Implements `run(
|
|
129
|
-
4. Contains `context.getProp(...)
|
|
181
|
+
3. Implements `run(...)` or a custom `execute(...)` method that is called from `run()` — projects often wrap the SDK `run(Context)` in a custom base class that delegates to `execute(ContextWrapper)`
|
|
182
|
+
4. Contains `context.getProp(...)`, `context.getEvent()`, or equivalent calls through a project-specific context wrapper
|
|
130
183
|
5. Is registered in a `module.json` (if one exists)
|
|
131
184
|
|
|
185
|
+
**Custom base class / context wrapper detection:**
|
|
186
|
+
Many production plugins define their own `BaseRule` and `ContextWrapper` that wrap the SDK classes. When detected:
|
|
187
|
+
- Classify the custom base class as `FRAMEWORK` (not rule, not utility)
|
|
188
|
+
- Move it to `plugins/util/` alongside other framework-level classes
|
|
189
|
+
- Do NOT rewrite rules to use SDK classes directly — preserve the custom wrapper
|
|
190
|
+
- Note the inheritance chain in the analysis output so the user can verify
|
|
191
|
+
|
|
132
192
|
**For each detected rule, extract:**
|
|
133
193
|
- Class name (e.g., `ValidateReturnWindow`)
|
|
134
194
|
- Package name (e.g., `com.fluentcommerce.rule.order`)
|
|
@@ -143,6 +203,26 @@ For each Java file found, determine if it's a Fluent rule class:
|
|
|
143
203
|
- Missing Javadoc/comments
|
|
144
204
|
- Confidence level: decompiled vs original
|
|
145
205
|
|
|
206
|
+
#### Step 1.2b: Discover Non-Java Assets
|
|
207
|
+
|
|
208
|
+
Scan for non-Java files that need special handling:
|
|
209
|
+
|
|
210
|
+
**GraphQL operations** (`*.graphql` files):
|
|
211
|
+
- Typically in `src/main/graphql/` — used by Apollo code generation at build time
|
|
212
|
+
- These must stay alongside the rules submodule (Apollo plugin wires them during compile)
|
|
213
|
+
- Count mutations vs queries, note the GraphQL package path
|
|
214
|
+
|
|
215
|
+
**Settings and manifest JSONs:**
|
|
216
|
+
- Look for `settings/`, `manifests/`, or directories containing Mystique manifest JSON files (`fc.mystique.manifest.*`)
|
|
217
|
+
- These are **NOT part of the extension module** — they belong in a separate data module
|
|
218
|
+
- Flag to the user: _"Found N settings/manifest files. These should be deployed as a separate data module (`/fluent-data-module-scaffold`), not bundled with the extension module."_
|
|
219
|
+
|
|
220
|
+
**Other non-Java resources:**
|
|
221
|
+
- `reviewTools/`, `scripts/`, documentation, Python files — flag as non-module assets that won't be included in the restructured module
|
|
222
|
+
- Config files (`.properties`, `.yml`, `.xml` other than POM) — may need to move to `src/main/resources/`
|
|
223
|
+
|
|
224
|
+
Present the asset inventory in the Phase 1.5 findings so the user can decide what to include.
|
|
225
|
+
|
|
146
226
|
#### Step 1.3: Detect Existing module.json
|
|
147
227
|
|
|
148
228
|
If a `module.json` exists in the source path:
|
|
@@ -166,6 +246,77 @@ plugin_list (compact: true)
|
|
|
166
246
|
- Identify rules that are deployed but have different versions or parameters
|
|
167
247
|
- Flag any namespace conflicts
|
|
168
248
|
|
|
249
|
+
#### Step 1.5: Present Analysis Findings
|
|
250
|
+
|
|
251
|
+
**Before proceeding to the plan, present a structured summary of what was found.** This gives the user a chance to correct misclassifications, flag deprecated rules, or adjust the namespace before the restructuring plan is built on top of these findings.
|
|
252
|
+
|
|
253
|
+
```markdown
|
|
254
|
+
## Source Analysis — What I Found
|
|
255
|
+
|
|
256
|
+
| Property | Value |
|
|
257
|
+
|----------|-------|
|
|
258
|
+
| Source path | `accounts/<PROFILE>/SOURCE/backend/rubix-plugin-<name>/` |
|
|
259
|
+
| Layout category | MAVEN_NONSTANDARD (flat single-POM, not multi-module) |
|
|
260
|
+
| Java files found | 469 |
|
|
261
|
+
| Rule classes detected | 346 (across 17 domains) |
|
|
262
|
+
| Framework classes | 4 (custom BaseRule, ContextWrapper, Guard, LogJsonSerializer) |
|
|
263
|
+
| Model/DTO classes | 86 |
|
|
264
|
+
| Service classes | 12 |
|
|
265
|
+
| Utility classes | 17 |
|
|
266
|
+
| Exception classes | 4 |
|
|
267
|
+
| Test classes found | 126 |
|
|
268
|
+
| Existing module.json | No |
|
|
269
|
+
| Existing pom.xml | Yes (flat, v1.0.36) |
|
|
270
|
+
| Plugin namespace | <ACCOUNT_PREFIX>.<namespace> (from POM properties) |
|
|
271
|
+
|
|
272
|
+
### Non-Java Assets
|
|
273
|
+
|
|
274
|
+
| Asset Type | Count | Location | Recommendation |
|
|
275
|
+
|-----------|-------|----------|----------------|
|
|
276
|
+
| GraphQL operations | N (.graphql files) | src/main/graphql/ | Keep with rules submodule (Apollo build-time) |
|
|
277
|
+
| Mystique manifests | N JSON files | settings/UI Settings/ | **Separate data module** — not part of extension |
|
|
278
|
+
| Other settings | N JSON files | settings/ | **Separate data module** |
|
|
279
|
+
| Dev tooling | Scripts, docs | reviewTools/ etc. | Exclude from module (not deployable) |
|
|
280
|
+
|
|
281
|
+
### Custom Framework Classes
|
|
282
|
+
|
|
283
|
+
| Class | Purpose | Impact |
|
|
284
|
+
|-------|---------|--------|
|
|
285
|
+
| `com.<org>.common.BaseRule` | Wraps SDK `Rule`, adds execute/logging/exception pattern | **All N rules extend this** — must preserve |
|
|
286
|
+
| `com.<org>.common.ContextWrapper` | Wraps SDK `Context` with convenience methods | **All rules use this** — must preserve |
|
|
287
|
+
| Other framework classes | Validation, serialization, etc. | Used by rules — move to util |
|
|
288
|
+
|
|
289
|
+
### Discovered Rules (top domains by count)
|
|
290
|
+
|
|
291
|
+
| Domain | Rules | Entity Type | Examples |
|
|
292
|
+
|--------|-------|-------------|---------|
|
|
293
|
+
| order | N | ORDER | (list top 2-3 class names) |
|
|
294
|
+
| fulfilment | N | FULFILMENT | (list top 2-3 class names) |
|
|
295
|
+
| consignment | N | CONSIGNMENT | (list top 2-3 class names) |
|
|
296
|
+
| *(+ more domains)* | N | — | — |
|
|
297
|
+
|
|
298
|
+
### Issues & Decisions Needed
|
|
299
|
+
|
|
300
|
+
- ⚠ **No module.json** — N rule registrations will be generated. Confirm namespace `<ACCOUNT_PREFIX>.<namespace>` is correct.
|
|
301
|
+
- ⚠ **N rules have no tests** — skeletons will be generated for untested rules
|
|
302
|
+
- ⚠ **Custom BaseRule wrapper** — rules extend project-local BaseRule, not SDK BaseRule. Will preserve as-is.
|
|
303
|
+
- ❓ **Package rename?** Source uses `com.<org>.*`. Recommend keeping as-is for large codebases (massive import churn, no runtime benefit). Want to repackage to `com.fluentcommerce.*`?
|
|
304
|
+
- ❓ **Settings/manifests** — N JSON files found. Deploy as separate data module? Or include in extension?
|
|
305
|
+
- ❓ **GraphQL operations** — N `.graphql` files found. Keep with rules submodule for Apollo build? Or separate?
|
|
306
|
+
|
|
307
|
+
Does this look correct? Any classes I misclassified? Any rules to exclude?
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Wait for the user to confirm or correct.** Common corrections:
|
|
311
|
+
- _"ReturnHelper is actually a rule, not a utility"_ → reclassify
|
|
312
|
+
- _"NotifyWarehouse is deprecated, exclude it"_ → remove from plan
|
|
313
|
+
- _"The namespace should be MY_COMPANY, not ACME"_ → update prefix
|
|
314
|
+
- _"Keep the package as com.puma"_ → skip repackaging
|
|
315
|
+
- _"Yes, separate data module for settings"_ → flag for `/fluent-data-module-scaffold`
|
|
316
|
+
- _"Looks good, proceed"_ → move to Phase 2
|
|
317
|
+
|
|
318
|
+
If the user says nothing controversial or confirms, proceed to Phase 2. If they correct something, update the analysis and re-present if the change is significant (e.g., namespace change affects all rule keys).
|
|
319
|
+
|
|
169
320
|
### Phase 2: Planning Gate
|
|
170
321
|
|
|
171
322
|
#### Pre-flight Chain (Three-Level)
|
|
@@ -177,14 +328,14 @@ Before restructuring any source code, run the three-level pre-flight check:
|
|
|
177
328
|
- Check `plan: "APPROVED"` — If missing, BLOCK: `→ BLOCKED: PLAN_REQUIRED — Run /fluent-feature-plan first`
|
|
178
329
|
- If both approved, skip to implementation referencing the plan's relevant sections
|
|
179
330
|
2. **Multi-artifact work** (onboarding as part of larger feature): STOP. Invoke `/fluent-feature-plan` first
|
|
180
|
-
3. **Standalone
|
|
331
|
+
3. **Standalone module-convert work** (no feature context):
|
|
181
332
|
- Check `accounts/<PROFILE>/tasks/` for a task plan with `Status: APPROVED`
|
|
182
333
|
- If approved task plan found, skip to implementation
|
|
183
334
|
- If no plan, continue to the Planning Gate below
|
|
184
335
|
|
|
185
|
-
**MANDATORY: Present a restructuring plan before making ANY changes.** Use the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill as the base structure. Every table row must carry a Source column (NEW/EXISTING/MODIFIED/REUSED/OOTB). Extend with the
|
|
336
|
+
**MANDATORY: Present a restructuring plan before making ANY changes.** Use the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill as the base structure. Every table row must carry a Source column (NEW/EXISTING/MODIFIED/REUSED/OOTB). Extend with the module-convert-specific sections below.
|
|
186
337
|
|
|
187
|
-
Write the plan to: `accounts/<PROFILE>/tasks/<YYYY-MM-DD>-
|
|
338
|
+
Write the plan to: `accounts/<PROFILE>/tasks/<YYYY-MM-DD>-module-convert-<slug>.md`. Set `Status: PENDING`.
|
|
188
339
|
|
|
189
340
|
**Source-onboard specific sections** (in addition to the standard template):
|
|
190
341
|
|
|
@@ -342,11 +493,19 @@ For each discovered rule class:
|
|
|
342
493
|
- Classes that are rule implementations --> `plugins/rules/<alias>/src/main/java/`
|
|
343
494
|
|
|
344
495
|
**Classification heuristics:**
|
|
345
|
-
- Extends `BaseRule`/`Rule` or has `@RuleInfo` --> rule
|
|
496
|
+
- Extends `BaseRule`/`Rule` (SDK or project-local) or has `@RuleInfo` --> rule
|
|
497
|
+
- Is a custom base class that wraps SDK `Rule`/`BaseRule` (e.g., project-local `BaseRule`, `ContextWrapper`) --> **framework** (goes to `plugins/util/`)
|
|
498
|
+
- Is a custom exception class --> **framework** (goes to `plugins/util/`)
|
|
346
499
|
- Is an `enum`, has only getters/setters, or has `@Data`/`@Builder` --> type
|
|
347
500
|
- Is a helper/utility (static methods, service patterns, no rule inheritance) --> util
|
|
501
|
+
- Is a service class (dependency injection, API calls, no rule inheritance) --> util
|
|
348
502
|
- Unclear --> ask user, default to rules
|
|
349
503
|
|
|
504
|
+
**Package rename decision (ask in Phase 1.5 findings):**
|
|
505
|
+
- If the project uses a custom package (e.g., `com.puma.*`), ask: _"The source uses package `com.puma.*`. Do you want to keep this or repackage to `com.fluentcommerce.*`?"_
|
|
506
|
+
- **Recommend keeping the original** for large codebases (100+ files) — repackaging causes massive import churn with no runtime benefit
|
|
507
|
+
- Only repackage if the user explicitly requests it or the package conflicts with another deployed module
|
|
508
|
+
|
|
350
509
|
#### Step 3.3: Fix Common Structural Issues
|
|
351
510
|
|
|
352
511
|
Apply these fixes automatically (all tracked in the plan):
|
|
@@ -473,6 +632,43 @@ plugin_list (name filter: <ACCOUNT_PREFIX>)
|
|
|
473
632
|
| Rule key format matches deployed format | PASS/FAIL per rule |
|
|
474
633
|
| Account prefix is consistent | PASS/FAIL |
|
|
475
634
|
|
|
635
|
+
#### Step 4.3b: Workflow Rule Cross-Reference (like-for-like proof)
|
|
636
|
+
|
|
637
|
+
The restructured module must be functionally equivalent — every rule that workflows reference must still be registered under the **exact same key**. Structure changes; behavior must not.
|
|
638
|
+
|
|
639
|
+
1. **Collect rule keys** from the new `module.json` → `newKeys[]`
|
|
640
|
+
2. **Collect deployed rule keys** from `plugin_list` that match the module's account prefix → `deployedKeys[]`
|
|
641
|
+
3. **Download workflows** that reference any of the deployed keys:
|
|
642
|
+
```
|
|
643
|
+
workflow_list → for each workflow:
|
|
644
|
+
workflow_get (entityType, entitySubtype)
|
|
645
|
+
```
|
|
646
|
+
4. **Extract workflow rule references**: Grep each workflow JSON for rule keys in `rulesets[].rules[].name`
|
|
647
|
+
5. **Cross-reference table:**
|
|
648
|
+
|
|
649
|
+
```markdown
|
|
650
|
+
## Workflow Rule Cross-Reference
|
|
651
|
+
|
|
652
|
+
| Rule Key | In New module.json? | In Deployed module? | Referenced In Workflows | Status |
|
|
653
|
+
|----------|--------------------|--------------------|------------------------|--------|
|
|
654
|
+
| MY_PROFILE.order.ValidateOrder | Yes | Yes (v2.1) | ORDER::HD (ruleset: ON_VALIDATION) | MATCH |
|
|
655
|
+
| MY_PROFILE.order.CreateFulfilment | Yes | Yes (v2.1) | ORDER::HD (ruleset: FULFIL) | MATCH |
|
|
656
|
+
| MY_PROFILE.webhook.NotifyWarehouse | Yes | No (new) | — | NEW (no workflow ref yet) |
|
|
657
|
+
| OLD_PREFIX.order.LegacyCheck | No | Yes (v1.0) | ORDER::HD (ruleset: ON_VALIDATION) | BREAK — workflow references key not in new module |
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
6. **Verdicts:**
|
|
661
|
+
- **MATCH**: Same key in new module.json, deployed, AND workflow → safe
|
|
662
|
+
- **NEW**: In new module.json but not deployed or in workflows → safe (new rule, not yet wired)
|
|
663
|
+
- **BREAK**: In workflow but NOT in new module.json → **FAIL** — deployment would break this workflow ruleset
|
|
664
|
+
- **ORPHAN**: In new module.json but not in any workflow → WARN (registered but unused)
|
|
665
|
+
|
|
666
|
+
7. **If any BREAK found:** STOP. Present the breaks to the user with the old key → new key mapping and ask whether to:
|
|
667
|
+
- Preserve the old key format in module.json (recommended for zero-disruption)
|
|
668
|
+
- Accept the key change and update the workflow JSON to match (requires workflow redeployment)
|
|
669
|
+
|
|
670
|
+
**This step is the "like-for-like" proof**: if all workflow-referenced rules show MATCH, the converted module is a drop-in replacement. Deploy the module and workflows continue working without changes.
|
|
671
|
+
|
|
476
672
|
#### Step 4.4: Functional Checklist
|
|
477
673
|
|
|
478
674
|
Present a manual verification checklist to the user:
|
|
@@ -665,19 +861,22 @@ fc-module-ext/
|
|
|
665
861
|
|
|
666
862
|
```bash
|
|
667
863
|
# Onboard decompiled JAR output into a module
|
|
668
|
-
/fluent-
|
|
864
|
+
/fluent-module-convert accounts/MY_PROFILE/SOURCE/backend/.decompiled/fc-module-ext/
|
|
669
865
|
|
|
670
866
|
# Onboard loose Java files with explicit module name
|
|
671
|
-
/fluent-
|
|
867
|
+
/fluent-module-convert ./my-rules/ --module-name my-returns
|
|
672
868
|
|
|
673
869
|
# Dry run — analyze and plan only, don't modify anything
|
|
674
|
-
/fluent-
|
|
870
|
+
/fluent-module-convert accounts/MY_PROFILE/SOURCE/backend/legacy-project/ --dry-run
|
|
675
871
|
|
|
676
872
|
# Onboard without attempting build (e.g., missing SDK locally)
|
|
677
|
-
/fluent-
|
|
873
|
+
/fluent-module-convert accounts/MY_PROFILE/SOURCE/backend/old-module/ --skip-build
|
|
874
|
+
|
|
875
|
+
# Convert an existing plugin to module format
|
|
876
|
+
/fluent-module-convert accounts/MY_PROFILE/SOURCE/backend/my-legacy-plugin/
|
|
678
877
|
|
|
679
878
|
# Repair an existing module with structural issues
|
|
680
|
-
/fluent-
|
|
879
|
+
/fluent-module-convert accounts/MY_PROFILE/SOURCE/backend/fluentcommerce-fc-module-ext/
|
|
681
880
|
```
|
|
682
881
|
|
|
683
882
|
## Post-Execution: Feedback Capture
|
|
@@ -686,13 +885,13 @@ After completing this skill (whether success or failure), write a feedback recor
|
|
|
686
885
|
|
|
687
886
|
1. **Classify outcome:** `SUCCESS` (completed cleanly), `PARTIAL_SUCCESS` (completed after fixing issues), `FAILURE` (could not complete), `BLOCKED` (prereq missing), `USER_CORRECTED` (user overrode approach)
|
|
688
887
|
2. **Build record:** Create a `feedback-record-v1` JSON object with:
|
|
689
|
-
- `skill`: `"fluent-
|
|
888
|
+
- `skill`: `"fluent-module-convert"`
|
|
690
889
|
- `feature`: feature slug if applicable, null otherwise
|
|
691
890
|
- `phases`: trace of each phase with PASS/FAIL/SKIP
|
|
692
891
|
- `learnings`: any gotchas discovered during execution
|
|
693
892
|
- `userCorrections`: any corrections the user provided
|
|
694
893
|
3. **Redact secrets:** Strip tokens, passwords, API keys. Keep business identifiers.
|
|
695
|
-
4. **Append** one JSON line to `accounts/<PROFILE>/feedback/fluent-
|
|
894
|
+
4. **Append** one JSON line to `accounts/<PROFILE>/feedback/fluent-module-convert.jsonl`
|
|
696
895
|
5. **Update** `accounts/<PROFILE>/feedback/index.json` counters (create with `mkdir -p` if missing)
|
|
697
896
|
|
|
698
897
|
**Skip capture if:** The execution was trivially simple (e.g., user asked a question, no actual write operation happened).
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-module-scaffold
|
|
3
|
-
description: Scaffold a new Fluent Commerce extension module
|
|
3
|
+
description: Scaffold a new Fluent Commerce extension module with Java plugins, Maven structure, module.json, build scripts, and test skeletons. Use for creating new extension modules that include compiled Java code.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: <module-name> [--entity-types ORDER,FULFILMENT] [--rules RuleName1,RuleName2] [--account-prefix ACCT]
|
|
7
7
|
cursor-tier: manual
|
|
8
8
|
planning-gate: mandatory
|
|
9
9
|
---
|
|
10
|
+
<!-- routing-notes: HARD NEGATIVE — Do NOT route here for "data-only module", "no Java", "no plugins", "workflow-only module", "settings-only module", "resources-only" (→ fluent-data-module-scaffold for modules without Java plugin code). -->
|
|
10
11
|
|
|
11
12
|
# Module Scaffolder
|
|
12
13
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-module-validate
|
|
3
|
-
description:
|
|
3
|
+
description: Discover, classify, and validate Fluent Commerce modules with structural checks, rule-to-source mapping, and reference-vs-custom classification. Use for module inventory, structure validation, or deployment health checks.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: [module-root-path | inventory] [--fix] [--force]
|
|
7
7
|
cursor-tier: manual
|
|
8
8
|
---
|
|
9
|
+
<!-- routing-notes: ROUTING PRIORITY — if the prompt says "inventory modules", "classify modules", "validate module structure", "module health", "list modules", or "what modules are deployed", route HERE — do NOT route to fluent-implementation-map. fluent-implementation-map maps business features and flows; this skill inventories and validates module structures. -->
|
|
9
10
|
|
|
10
11
|
# Module Inventory and Structure Validator
|
|
11
12
|
|
|
@@ -136,8 +137,8 @@ servicepoint, wave, returns, b2c-sample-data, b2c-sample-data-inventory
|
|
|
136
137
|
|------|-------------|-----------|-------------|---------|
|
|
137
138
|
| **REFERENCE** | Standard Fluent Commerce modules from repository. Deployed via `fluent module install <name>`. | Yes (OOTB rules) | No (closed-source) | `fluent-commerce/core`, `fluent-commerce/order` |
|
|
138
139
|
| **CUSTOM_EXTENSION** | Account-specific modules with custom Rubix rules. Built from Java source. | Yes (custom rules) | Yes (under `accounts/<PROFILE>/SOURCE/backend/`) | `fluent-commerce/fc-module-custom-extension` |
|
|
139
|
-
| **CUSTOM_WORKFLOW** | Workflow definitions packaged as deployable modules. | No | Workflow JSON in module ZIP | `fluent-commerce/fc-workflow-order-
|
|
140
|
-
| **CUSTOM_DATA** | Configuration, settings, sample data, access control. No executable rules. | No | JSON/config files in module ZIP | `
|
|
140
|
+
| **CUSTOM_WORKFLOW** | Workflow definitions packaged as deployable modules. | No | Workflow JSON in module ZIP | `fluent-commerce/fc-workflow-order-acme-updated` |
|
|
141
|
+
| **CUSTOM_DATA** | Configuration, settings, sample data, access control. No executable rules. | No | JSON/config files in module ZIP | `ACME`, `acme-inventory-data`, `acme/global-access` |
|
|
141
142
|
|
|
142
143
|
**All types must be deployed** — even reference modules are deployed per-retailer via `fluent module install`.
|
|
143
144
|
|
|
@@ -236,10 +237,10 @@ console.log(age > 3600 ? 'stale' : 'fresh');
|
|
|
236
237
|
}
|
|
237
238
|
],
|
|
238
239
|
"customWorkflow": [
|
|
239
|
-
{ "name": "fluent-commerce/fc-workflow-order-
|
|
240
|
+
{ "name": "fluent-commerce/fc-workflow-order-acme-updated", "version": "1.0.0" }
|
|
240
241
|
],
|
|
241
242
|
"customData": [
|
|
242
|
-
{ "name": "
|
|
243
|
+
{ "name": "ACME", "version": "1.0.13" }
|
|
243
244
|
]
|
|
244
245
|
},
|
|
245
246
|
"referenceArtifacts": [
|
|
@@ -254,10 +255,10 @@ console.log(age > 3600 ? 'stale' : 'fresh');
|
|
|
254
255
|
],
|
|
255
256
|
"undeployedModules": [
|
|
256
257
|
{
|
|
257
|
-
"name": "fluent-commerce/fc-module-
|
|
258
|
+
"name": "fluent-commerce/fc-module-acme-return",
|
|
258
259
|
"version": "0.0.6",
|
|
259
260
|
"moduleType": "configuration_only",
|
|
260
|
-
"sourcePath": "accounts/<PROFILE>/SOURCE/backend/fluentcommerce-fc-module-
|
|
261
|
+
"sourcePath": "accounts/<PROFILE>/SOURCE/backend/fluentcommerce-fc-module-acme-return",
|
|
261
262
|
"deploymentStatus": "not_deployed"
|
|
262
263
|
}
|
|
263
264
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-mystique-assess
|
|
3
|
-
description: Validate and analyze Mystique manifest JSON
|
|
3
|
+
description: Validate and analyze Mystique manifest JSON with schema checks, complexity scoring, component usage patterns, and i18n coverage. Use for manifest validation, lint, or UI architecture health assessment.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: <manifest-file-or-directory> [--validate-only] [--analyze-only] [--strict] [--fix-suggestions] [--deep] [--mermaid] [--deployed] [--component <alias>] [--profile <name>]
|
|
@@ -257,13 +257,13 @@ Exit codes: `0` = PASS (no CRITICAL/HIGH), `1` = FAIL.
|
|
|
257
257
|
|
|
258
258
|
### Automated Validator
|
|
259
259
|
|
|
260
|
-
A Node.js linter script is available at `fluent-ai-skills/
|
|
260
|
+
A Node.js linter script is available at `fluent-ai-skills/tools/manifest-validator.mjs`. **Always run this first** before manual review.
|
|
261
261
|
|
|
262
262
|
```bash
|
|
263
|
-
node fluent-ai-skills/
|
|
264
|
-
node validator.mjs <manifest.json> --strict --fix-suggestions
|
|
265
|
-
node validator.mjs <manifest.json> --component fc.list
|
|
266
|
-
node validator.mjs <manifest.json> --json
|
|
263
|
+
node fluent-ai-skills/tools/manifest-validator.mjs <manifest.json>
|
|
264
|
+
node fluent-ai-skills/tools/manifest-validator.mjs <manifest.json> --strict --fix-suggestions
|
|
265
|
+
node fluent-ai-skills/tools/manifest-validator.mjs <manifest.json> --component fc.list
|
|
266
|
+
node fluent-ai-skills/tools/manifest-validator.mjs <manifest.json> --json
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
If `--validate-only` is set, stop here and output the validation report. Otherwise continue to analysis.
|
|
@@ -665,6 +665,22 @@ Summary: 2 instances found, 1 FAIL, 1 PASS
|
|
|
665
665
|
- **Backup**: Existing setting MUST be backed up before overwriting
|
|
666
666
|
- **Approval**: User MUST explicitly approve before any setting update
|
|
667
667
|
|
|
668
|
+
### Full Deploy Chain (emit after PASS when user wants to deploy)
|
|
669
|
+
|
|
670
|
+
```
|
|
671
|
+
/fluent-mystique-assess PASS
|
|
672
|
+
↓
|
|
673
|
+
Choose deployment method:
|
|
674
|
+
• Interactive: /fluent-settings (MCP setting_upsert with valueType JSON)
|
|
675
|
+
• Production: /fluent-module-deploy --include settings (CLI, repeatable)
|
|
676
|
+
↓
|
|
677
|
+
/fluent-ui-test (verify rendered page matches expectations)
|
|
678
|
+
↓
|
|
679
|
+
FAIL? → /fluent-trace (diagnose why component isn't rendering)
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
**First-time app deployment?** Verify: (1) target app entity exists, (2) user has setting write permissions, (3) custom SDK bundle is hosted and accessible. See `/fluent-retailer-config` for entity setup, `/fluent-account-snapshot` for environment state.
|
|
683
|
+
|
|
668
684
|
---
|
|
669
685
|
|
|
670
686
|
## Graceful Degradation
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-mystique-builder
|
|
3
|
-
description: Build and edit Mystique manifest JSON definitions
|
|
3
|
+
description: Build and edit Mystique manifest JSON definitions with pages, routes, component trees, data queries, and fragment compositions using the v2.0 schema. Use for manifest authoring or editing UI configuration.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: <operation> [manifest-file] [--page <path>] [--section <name>] [--fragment]
|
|
7
7
|
cursor-tier: manual
|
|
8
8
|
planning-gate: mandatory
|
|
9
9
|
---
|
|
10
|
+
<!-- routing-notes: HARD NEGATIVE — if the user asks for a preview, mockup, visual approval, or "show me how it would look before we build", route to fluent-mystique-preview instead. This skill owns real manifest authoring, not pre-build visual approval. -->
|
|
10
11
|
|
|
11
12
|
# Mystique Manifest Builder
|
|
12
13
|
|
|
@@ -369,6 +370,36 @@ Before building a manifest that references custom SDK components (non-`fc.*` ali
|
|
|
369
370
|
|
|
370
371
|
Understanding how manifests and custom components reach users is critical for correct builder output.
|
|
371
372
|
|
|
373
|
+
### New App Prerequisites
|
|
374
|
+
|
|
375
|
+
When building a manifest for a brand-new Fluent UX App (not modifying an existing one), verify these prerequisites before building:
|
|
376
|
+
|
|
377
|
+
1. **Spec exists (recommended)** — Check `accounts/<PROFILE>/features/<slug>/status.json` for `spec: "APPROVED"`. If no spec exists, recommend `/fluent-use-case-discover` to gather requirements first, or get explicit user acknowledgment to skip. The `fluent-frontend-dev` agent enforces this as a gate at Phase 1.5.
|
|
378
|
+
2. **App entity exists** — The target app (OMS, Store, or custom) must exist in the environment. Check with `/fluent-account-snapshot` or MCP `entity_get`.
|
|
379
|
+
3. **Setting namespace available** — Root manifests use `fc.mystique.manifest.<app-name>`. Confirm no existing setting conflicts. Fragments use `fc.mystique.manifest.<app-name>.<section>`.
|
|
380
|
+
4. **Permissions** — The deploying user/role needs permission to create settings with `context: "ACCOUNT"`, `contextId: 0`. See `knowledge/platform/roles-and-permissions.md` for the three-layer access control model (platform permissions, custom roles, manifest-based visibility).
|
|
381
|
+
5. **Plugin hosting** — If using custom SDK components, the bundle hosting URL must be accessible from end-user browsers. Localhost is fine for development only.
|
|
382
|
+
|
|
383
|
+
If any prerequisite is missing, recommend: `/fluent-use-case-discover` (gather requirements), `/fluent-retailer-config` (create entities), `/fluent-settings` (manage settings), `/fluent-mystique-scaffold` (set up SDK project).
|
|
384
|
+
|
|
385
|
+
### Full New App Sequence
|
|
386
|
+
|
|
387
|
+
For building a complete new Mystique app end-to-end, follow this lifecycle. Each step can be skipped if scope is clear and user acknowledges:
|
|
388
|
+
|
|
389
|
+
```
|
|
390
|
+
1. /fluent-use-case-discover → Gather requirements (UI pages, roles, entities, data queries)
|
|
391
|
+
2. /fluent-feature-plan → Plan with frontend architecture (route map, component tree, settings)
|
|
392
|
+
3. /fluent-mystique-builder → Create root manifest + fragments (this skill, Operation 1)
|
|
393
|
+
4. /fluent-mystique-scaffold → Scaffold SDK project (only if custom components needed)
|
|
394
|
+
5. /fluent-mystique-assess → Validate manifest (49 rules, 6 phases — 0 CRITICAL/HIGH to proceed)
|
|
395
|
+
6. /fluent-mystique-preview → Visual preview in browser (optional but recommended)
|
|
396
|
+
7. /fluent-frontend-build → Build SDK bundle (7 gates — only if SDK project exists)
|
|
397
|
+
8. Deploy manifest → Via GraphQL createSetting or CLI module install (see Safety Guardrails below)
|
|
398
|
+
9. /fluent-ui-test → Verify in browser (login, navigate, render, user actions, roles)
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
The `fluent-frontend-dev` agent orchestrates this entire sequence with gates at Phase 1.5 (spec), Phase 2 (plan approval), Phase 4 (validation), and Phase 5 (deploy safety).
|
|
402
|
+
|
|
372
403
|
### Manifests are JSON Configuration
|
|
373
404
|
|
|
374
405
|
Manifests are pure JSON — they are NOT compiled or bundled. They are deployed to Fluent UX Apps through one of:
|
|
@@ -852,7 +883,7 @@ Every Mystique manifest follows this top-level structure:
|
|
|
852
883
|
| `plugins` | `MystiquePlugin[]` | `[]` | External component bundle URLs or setting references |
|
|
853
884
|
| `orchestrationAlias` | `string` | none | Overrides the `module` value the app sends to the Transition API. OMS App uses `"adminconsole"` so `modules: ["adminconsole"]` in workflow user actions. Store App uses `"servicepoint"` as its orchestration alias (distinct from the manifest setting name `fc.mystique.manifest.store`). |
|
|
854
885
|
|
|
855
|
-
**
|
|
886
|
+
**Context switching (Store + OMS):** When `context.level` is `"location"` (Store) or `"retailer"` (OMS), the app scopes queries to the active context. Set `"switcher": true` and the appropriate `"role"` array to enable the OOTB dropdown. The switcher only appears when the user has roles at multiple contexts. Context is persisted in `localStorage` — `mystique.auth.context.location` (Store, stores ID) or `mystique.auth.context.retailer` (OMS, stores ID). Deep-link with `?user.location.ref=<REF>` (Store) or `?user.retailer.ref=<REF>` (OMS) after the hash path. See `knowledge/platform/mystique-routing.md` §"Context Switching" for full resolution order and permission enforcement.
|
|
856
887
|
|
|
857
888
|
### Route Types
|
|
858
889
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-mystique-component
|
|
3
|
-
description: Add new components, form fields, or template helpers to an existing Mystique SDK project
|
|
3
|
+
description: Add new components, form fields, or template helpers to an existing Mystique SDK project with file generation, registry wiring, and build integration. Use for extending an existing SDK project with new components.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
6
|
argument-hint: <ComponentName> [--project <project-path>] [--type component|field|template] [--category content|layout|page|filter]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-mystique-diff
|
|
3
|
-
description: Compare Mystique manifest settings against CDN baselines
|
|
3
|
+
description: Compare Mystique manifest settings against CDN baselines showing customized fragments, CDN defaults, account-only additions, and OOTB vs custom component classification. Use for manifest diff or CDN baseline comparison.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash, Read, Write, Glob, Grep
|
|
6
6
|
argument-hint: --profile <PROFILE> [--app oms|store] [--deep] [--components] [--verbose] [--refresh-cdn]
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fluent-mystique-preview
|
|
3
|
-
description:
|
|
3
|
+
description: Mock, modify, and preview Mystique UI components in the live Fluent Commerce app before building or deploying with ADD, MODIFY, and REMOVE modes. Use for visual previews, UI mockups, or pre-build approval.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
read-only: true
|
|
6
6
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
7
7
|
argument-hint: "[--mode add|modify|remove] [--app oms|store|servicepoint] [--route /orders] [--manifest <path>] [--component <alias>] [--feature <slug>]"
|
|
8
8
|
cursor-tier: manual
|
|
9
9
|
---
|
|
10
|
+
<!-- routing-notes: ROUTING PRIORITY — if the user asks for a preview, mockup, visual approval, static mock, or "show me how it would look before we build", route HERE instead of fluent-mystique-builder. This skill owns pre-build visual approval, not real manifest authoring. -->
|
|
10
11
|
|
|
11
12
|
# Mystique UI Preview & Iteration
|
|
12
13
|
|
|
@@ -1008,7 +1009,7 @@ When a preview is approved, add a visual reference to the feature plan:
|
|
|
1008
1009
|
|
|
1009
1010
|
#### Embedding in feature dashboard
|
|
1010
1011
|
|
|
1011
|
-
The dashboard generator (`fluent-ai-skills/tools/
|
|
1012
|
+
The dashboard generator (`fluent-ai-skills/tools/feature-dashboard.mjs`) can detect preview reports and embed the flip widget:
|
|
1012
1013
|
|
|
1013
1014
|
```javascript
|
|
1014
1015
|
// In buildDetailPanel, check for preview report
|
|
@@ -1167,6 +1168,22 @@ The approved preview report becomes the visual reference:
|
|
|
1167
1168
|
- Width/positioning decided
|
|
1168
1169
|
- **Change manifest** — exact list of ADD/MODIFY/REMOVE operations to implement
|
|
1169
1170
|
|
|
1171
|
+
### Full Deploy Chain After Approval
|
|
1172
|
+
|
|
1173
|
+
```
|
|
1174
|
+
Preview APPROVED
|
|
1175
|
+
↓
|
|
1176
|
+
/fluent-mystique-builder (build manifest matching approved preview)
|
|
1177
|
+
↓
|
|
1178
|
+
/fluent-mystique-assess (validate manifest structure before deploy)
|
|
1179
|
+
↓
|
|
1180
|
+
/fluent-settings or /fluent-module-deploy (deploy manifest as setting)
|
|
1181
|
+
↓
|
|
1182
|
+
/fluent-ui-test (verify live page matches preview)
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
If custom SDK components are needed (non-`fc.*` aliases in the preview), insert `/fluent-mystique-scaffold` before the builder step.
|
|
1186
|
+
|
|
1170
1187
|
### Verification via `/fluent-ui-test`
|
|
1171
1188
|
|
|
1172
1189
|
After the real manifest is built and deployed, `/fluent-ui-test` can compare the live page against the approved preview screenshots to verify visual fidelity.
|