@fluentcommerce/ai-skills 0.1.0 → 0.2.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 +10 -16
- package/content/cli/skills/fluent-bootstrap/SKILL.md +9 -0
- package/content/cli/skills/fluent-cli-reference/SKILL.md +0 -408
- package/content/cli/skills/fluent-module-deploy/SKILL.md +21 -127
- package/content/dev/agents/fluent-dev/AGENT.md +76 -0
- package/content/dev/agents/fluent-dev/agent.json +2 -12
- package/content/dev/agents/fluent-dev.md +5 -6
- package/content/dev/skills/fluent-build/SKILL.md +16 -38
- package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +9 -13
- package/content/dev/skills/fluent-feature-plan/SKILL.md +8 -14
- package/content/dev/skills/fluent-module-scaffold/SKILL.md +9 -78
- package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +5 -23
- package/content/dev/skills/fluent-retailer-config/SKILL.md +9 -0
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +9 -0
- package/content/dev/skills/fluent-scope-decompose/SKILL.md +1 -1
- package/content/dev/skills/fluent-settings/SKILL.md +10 -0
- package/content/dev/skills/fluent-source-onboard/SKILL.md +9 -0
- package/content/dev/skills/fluent-sourcing/SKILL.md +1171 -0
- package/content/dev/skills/fluent-use-case-discover/SKILL.md +471 -0
- package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +260 -0
- package/content/dev/skills/fluent-version-manage/SKILL.md +10 -0
- package/content/dev/skills/fluent-workflow-builder/SKILL.md +10 -3
- package/content/mcp-extn/agents/fluent-mcp.md +65 -2
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +343 -4
- package/docs/CAPABILITY_MAP.md +3 -7
- package/docs/USE_CASES.md +4 -3
- package/docs/USE_CASES.pdf +0 -0
- package/metadata.json +8 -9
- package/package.json +2 -6
- package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +0 -714
- package/content/dev/skills/fluent-workflow-deploy/SKILL.md +0 -267
package/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# @fluentcommerce/ai-skills
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@fluentcommerce/ai-skills)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://nodejs.org/)
|
|
6
|
-
|
|
7
3
|
> **Alpha** — This package is under active development. Skill content, CLI options, and supported targets may change between releases without notice. Use in non-production environments and pin to a specific version if stability matters.
|
|
8
4
|
|
|
9
5
|
Modular [Fluent Commerce](https://fluentcommerce.com) AI skill packs for coding assistants.
|
|
@@ -113,7 +109,7 @@ For non-Claude targets, the installer writes a managed block (`<!-- fluent-ai-sk
|
|
|
113
109
|
| `mcp-official` | Official Fluent CLI MCP server operations | `/fluent-mcp-core` |
|
|
114
110
|
| `mcp-extn` | Extension MCP tools (events, transitions, GraphQL, metrics, batch) | `/fluent-mcp-tools` |
|
|
115
111
|
| `rfl` | Ready For Launch assessments | `/fluent-rfl-assess` |
|
|
116
|
-
| `dev` | Feature planning (with universal NEW/EXISTING/MODIFIED/REUSED/OOTB classification), workflow builder,
|
|
112
|
+
| `dev` | Feature planning (with universal NEW/EXISTING/MODIFIED/REUSED/OOTB classification), workflow builder, analyzer, connection analysis (with `--validate` static-vs-dynamic comparison and cross-entity event tracing), custom code analysis, transition API, rule scaffold, module scaffold, source onboarding, module validation, build, version management, trace, event API (model + causality analysis), system monitoring, batch ingestion, E2E, test data, settings (with Phase 2B value format validation and cascading scope resolution), environment setup, pre-deploy checks, session summary, session audit export, scope decomposition, feature explanation, sourcing framework reference | `/fluent-feature-plan` `/fluent-workflow-builder` `/fluent-workflow-analyzer` `/fluent-connection-analysis` `/fluent-custom-code` `/fluent-transition-api` `/fluent-rule-scaffold` `/fluent-module-scaffold` `/fluent-source-onboard` `/fluent-module-validate` `/fluent-build` `/fluent-version-manage` `/fluent-trace` `/fluent-event-api` `/fluent-system-monitoring` `/fluent-job-batch` `/fluent-e2e-test` `/fluent-test-data` `/fluent-settings` `/fluent-retailer-config` `/fluent-session-summary` `/fluent-scope-decompose` `/fluent-pre-deploy-check` `/fluent-session-audit-export` `/fluent-feature-explain` `/fluent-sourcing` |
|
|
117
113
|
|
|
118
114
|
> Slash commands are Claude Code specific. Other targets receive the same knowledge as merged instruction content.
|
|
119
115
|
|
|
@@ -155,9 +151,8 @@ Event API source docs are curated into skills via selective extraction; they are
|
|
|
155
151
|
| Validate | `/fluent-module-validate` | Check module structure, version consistency, rule wiring, test coverage; cached report with content hash |
|
|
156
152
|
| Version | `/fluent-version-manage` | Read, bump, sync, and tag versions across POM files, module.json, and CHANGELOG |
|
|
157
153
|
| Build | `/fluent-build` | Version bump, Maven compile, ZIP packaging |
|
|
158
|
-
| Pre-deploy | `/fluent-pre-deploy-check` |
|
|
159
|
-
| Deploy
|
|
160
|
-
| Deploy workflow | `/fluent-workflow-deploy` | Workflow upload via MCP tool, REST API fallback, CLI last resort |
|
|
154
|
+
| Pre-deploy | `/fluent-pre-deploy-check` | 25 quality gates across 8 phases (env, module, workflow, connections, settings, target, risk, completeness) |
|
|
155
|
+
| Deploy | `/fluent-module-deploy` or `flow-run` | Module install or REST workflow upload |
|
|
161
156
|
| Test | `/fluent-e2e-test` | Create entities, fire events, poll states, assert transitions |
|
|
162
157
|
| Test data | `/fluent-test-data` | Discover retailer environment and generate valid test entity payloads |
|
|
163
158
|
| Settings | `/fluent-settings` | Manage retailer settings — discover, audit (with Phase 2B value format validation), create/update, migrate; cascading scope resolution (RETAILER -> ACCOUNT) for module-installed settings |
|
|
@@ -165,6 +160,7 @@ Event API source docs are curated into skills via selective extraction; they are
|
|
|
165
160
|
| Diagnose | `/fluent-trace`, `/fluent-event-api` | Trace failed events, correlate with rulesets, and build causality chains across parent/child events |
|
|
166
161
|
| Fix | (routes back to Implement/Build/Deploy) | Apply fix based on diagnosis, re-test |
|
|
167
162
|
| Explain | `/fluent-feature-explain` | Reverse-engineer existing feature into a Feature Architecture Document with Mermaid diagrams, data flow, and runtime evidence; tiered analysis (plugin.list → decompiled JAR / source code → runtime), auto-discovers entities, JAR decompilation fallback, Analysis Confidence section; saved to `accounts/<PROFILE>/analysis/features/` |
|
|
163
|
+
| Sourcing | `/fluent-sourcing` | Reference for sourcing profiles, strategies, conditions, criteria, scoring algorithms, permutation search, custom extensions, and GraphQL patterns |
|
|
168
164
|
| Audit | `/fluent-session-summary`, `/fluent-session-audit-export` | Track all changes made during session; export machine-readable JSON audit trail |
|
|
169
165
|
|
|
170
166
|
Artifacts from custom code analysis are written to `accounts/<PROFILE>/analysis/custom-code/` and reused by other skills (workflow-analyzer, trace, rule-scaffold, etc.). A `fingerprint.json` file is used to detect input changes and skip re-parsing when nothing changed. Module validation reports are written to `accounts/<PROFILE>/analysis/module-validate/` with a content hash — re-validation is skipped when the module source is unchanged.
|
|
@@ -390,7 +386,7 @@ This clones the `fluent-mcp-extn` source into your project, builds it, and wires
|
|
|
390
386
|
cd fluent-ai-skills && npm pack
|
|
391
387
|
|
|
392
388
|
# Install from tarball on any machine
|
|
393
|
-
npx ./fluentcommerce-ai-skills-0.0.
|
|
389
|
+
npx ./fluentcommerce-ai-skills-0.2.0.tgz install
|
|
394
390
|
```
|
|
395
391
|
|
|
396
392
|
## End-to-End Validation (Recommended)
|
|
@@ -577,13 +573,11 @@ flowchart TD
|
|
|
577
573
|
B -->|"claude (default)"| C["~/.claude/agents + ~/.claude/skills"]
|
|
578
574
|
B -->|"cursor"| D[".cursor/rules/*.mdc"]
|
|
579
575
|
B -->|"copilot"| E[".github/copilot-instructions.md"]
|
|
580
|
-
B -->|"
|
|
581
|
-
B -->|"
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
J -->|"no"| K["install all groups"]
|
|
586
|
-
J -->|"yes"| L["install selected groups only"]
|
|
576
|
+
B -->|"windsurf"| F[".windsurfrules"]
|
|
577
|
+
B -->|"codex"| G["AGENTS.md"]
|
|
578
|
+
A --> H{"groups specified?"}
|
|
579
|
+
H -->|"no"| I["install all groups"]
|
|
580
|
+
H -->|"yes"| J["install selected groups only"]
|
|
587
581
|
```
|
|
588
582
|
|
|
589
583
|
### flow-run Execution
|
|
@@ -12,6 +12,15 @@ Complete account setup from profile creation to sample data installation.
|
|
|
12
12
|
|
|
13
13
|
## Planning Gate
|
|
14
14
|
|
|
15
|
+
### Pre-flight: Plan Verification
|
|
16
|
+
|
|
17
|
+
Before proceeding, check for an existing approved plan:
|
|
18
|
+
|
|
19
|
+
1. **Search** `accounts/<PROFILE>/plans/` for a file with `Status: APPROVED` that covers this bootstrap
|
|
20
|
+
2. **If multi-artifact work** (bootstrap + custom rules + workflows): STOP. Invoke `/fluent-feature-plan` first — this skill cannot be used for multi-artifact work without a feature plan
|
|
21
|
+
3. **If approved plan found:** Skip to implementation, referencing the plan's relevant sections
|
|
22
|
+
4. **If no plan found:** Continue to the Planning Gate below to write a plan for this skill
|
|
23
|
+
|
|
15
24
|
**Before bootstrapping any account, write a plan using the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill.** Account bootstrap is a high-impact operation.
|
|
16
25
|
|
|
17
26
|
**Bootstrap-specific emphasis — ensure these are covered:**
|
|
@@ -610,414 +610,6 @@ No `.test.` or `.sandbox.` qualifier = **production** — proceed with caution.
|
|
|
610
610
|
|
|
611
611
|
---
|
|
612
612
|
|
|
613
|
-
## Module Types
|
|
614
|
-
|
|
615
|
-
Fluent modules fall into three categories:
|
|
616
|
-
|
|
617
|
-
| Type | Description | Contains Plugins? | Examples |
|
|
618
|
-
|------|-------------|-------------------|----------|
|
|
619
|
-
| **Reference** | Core Fluent-provided modules that deliver standard OMS functionality. Downloaded by name during `module install`. | Yes (OOTB rules) | `core`, `fulfilment`, `order`, `inventory` |
|
|
620
|
-
| **Extension** | Custom modules built by implementation teams. Contain Java plugin code (business rules), workflow fragments, settings, and data assets. | Yes (custom rules) | `fc-module-custom-extensions`, `fc-module-returns` |
|
|
621
|
-
| **Data** | Modules that carry only data assets (locations, products, inventory, settings) with no plugin code. Used for environment seeding, test data, or retailer-specific configuration. | No | `b2c-sample-data`, `product-catalog-data` |
|
|
622
|
-
|
|
623
|
-
**Reference modules** are versioned and hosted by Fluent. Install them by name:
|
|
624
|
-
```bash
|
|
625
|
-
fluent module install core -p <profile> -r <retailer>
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
**Extension and Data modules** are built locally and installed from a path or ZIP:
|
|
629
|
-
```bash
|
|
630
|
-
fluent module install dist/my-module-1.0.0.zip -p <profile> -r <retailer> -c <config>
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
---
|
|
634
|
-
|
|
635
|
-
## Module Dependencies
|
|
636
|
-
|
|
637
|
-
Reference modules have a strict install order. Installing out of order causes `Module dependency '<module>' not installed` errors.
|
|
638
|
-
|
|
639
|
-
| Order | Module | Dependencies | What It Provides |
|
|
640
|
-
|-------|--------|-------------|------------------|
|
|
641
|
-
| 1 | `core` | None | Base entity types, OOTB rules (SetState, SendEvent, etc.), core workflows |
|
|
642
|
-
| 2 | `fulfilment` | `core` | Fulfilment workflows, wave management, pick/pack rules |
|
|
643
|
-
| 3 | `order` | `core`, `fulfilment` | Order workflows (HD, CC), fulfilment options, sourcing |
|
|
644
|
-
| 4 | `inventory` | `core` | Inventory management, catalogue rules, stock adjustments |
|
|
645
|
-
| 5 | Custom extensions | Varies (check `module.json`) | Your business logic, custom rules, workflow fragments |
|
|
646
|
-
|
|
647
|
-
**Always verify dependencies before install:**
|
|
648
|
-
```bash
|
|
649
|
-
fluent module describe <module-source> # shows module.json including dependencies
|
|
650
|
-
fluent module list -p <profile> # shows what is already installed
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
**Common sequence for a new retailer:**
|
|
654
|
-
```bash
|
|
655
|
-
fluent module install core -p <profile> -r <retailer> -c <core-config>
|
|
656
|
-
fluent module install fulfilment -p <profile> -r <retailer> -c <fulfilment-config>
|
|
657
|
-
fluent module install order -p <profile> -r <retailer> -c <order-config>
|
|
658
|
-
fluent module install inventory -p <profile> -r <retailer> -c <inventory-config>
|
|
659
|
-
fluent module install dist/my-extension.zip -p <profile> -r <retailer> -c <ext-config>
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
---
|
|
663
|
-
|
|
664
|
-
## Config Prefix System
|
|
665
|
-
|
|
666
|
-
The CLI uses a **prefix system** in `module.config.<retailer>.<module>.json` files to scope variable values to specific asset contexts. This allows the same variable name to resolve to different values in workflows vs. settings vs. data assets.
|
|
667
|
-
|
|
668
|
-
### Prefix Format
|
|
669
|
-
|
|
670
|
-
Config keys follow the pattern: `<prefix>:<variable.name>`
|
|
671
|
-
|
|
672
|
-
| Prefix | Applies To | Specificity | Example |
|
|
673
|
-
|--------|-----------|-------------|---------|
|
|
674
|
-
| `default:` | All assets (workflows, settings, data) | 0 (lowest, fallback) | `"default:network.ref": "NET_DEFAULT"` |
|
|
675
|
-
| `workflow:` | Workflows only | 0 | `"workflow:notification.enabled": "true"` |
|
|
676
|
-
| `workflow:<type>:` | Workflows matching entity type | 1 | `"workflow:order:network.ref": "NET_ORDER"` |
|
|
677
|
-
| `workflow:<type>:<subtype>:` | Workflows matching type + subtype | 2 (highest) | `"workflow:order:hd:carrier.ref": "HD_CARRIER"` |
|
|
678
|
-
| `setting:` | Settings only | 0 | `"setting:api.timeout": "30000"` |
|
|
679
|
-
|
|
680
|
-
### Specificity Rules
|
|
681
|
-
|
|
682
|
-
The CLI counts colons in the prefix to determine specificity. More colons = higher priority. When two keys resolve to the same variable, the most specific wins. On a tie, the first key in the file wins.
|
|
683
|
-
|
|
684
|
-
**Example resolution for workflow `ORDER::HD`:**
|
|
685
|
-
```json
|
|
686
|
-
{
|
|
687
|
-
"default:network.ref": "NET1", // specificity 0
|
|
688
|
-
"workflow:network.ref": "NET2", // specificity 0 (tie with default)
|
|
689
|
-
"workflow:order:network.ref": "NET3", // specificity 1
|
|
690
|
-
"workflow:order:hd:network.ref": "NET4" // specificity 2 — WINS
|
|
691
|
-
}
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
Result: `[[network.ref]]` in the ORDER::HD workflow resolves to `"NET4"`.
|
|
695
|
-
|
|
696
|
-
### Context-Based Filtering
|
|
697
|
-
|
|
698
|
-
The CLI filters recognized prefixes based on which asset folder is being processed:
|
|
699
|
-
|
|
700
|
-
| Asset Folder | Recognized Prefixes |
|
|
701
|
-
|-------------|---------------------|
|
|
702
|
-
| `assets/workflows/` | `default:`, `workflow:`, `workflow:<type>:`, `workflow:<type>:<subtype>:` |
|
|
703
|
-
| `assets/settings/` | `default:`, `setting:` |
|
|
704
|
-
| All other folders (locations, products, etc.) | `default:` only |
|
|
705
|
-
|
|
706
|
-
**Important:** Data assets (users, locations, networks, products, carriers, etc.) only recognize the `default:` prefix. There is no `location:`, `network:`, or `product:` prefix.
|
|
707
|
-
|
|
708
|
-
### Built-in Auto-Injected Variables
|
|
709
|
-
|
|
710
|
-
These variables are always available without defining them in `module.config.json`:
|
|
711
|
-
|
|
712
|
-
| Variable | Description |
|
|
713
|
-
|----------|-------------|
|
|
714
|
-
| `account.id` | Account identifier (used in rule name prefixes) |
|
|
715
|
-
| `retailer.id` | Retailer numeric ID |
|
|
716
|
-
| `retailer.ref` | Retailer reference string |
|
|
717
|
-
| `retailer.name` | Retailer trading name |
|
|
718
|
-
|
|
719
|
-
**Note:** `account.host` is NOT auto-injected. Define it in config if needed (e.g., `"default:account.host": "acme.sandbox.api.fluentretail.com"`).
|
|
720
|
-
|
|
721
|
-
### Config Example
|
|
722
|
-
|
|
723
|
-
**module.config.RETAILER_A.my-module.json:**
|
|
724
|
-
```json
|
|
725
|
-
{
|
|
726
|
-
"default:network.ref": "NETWORK_DEFAULT",
|
|
727
|
-
"default:catalogue.ref": "PC:MASTER:5",
|
|
728
|
-
|
|
729
|
-
"workflow:order:network.ref": "NETWORK_FULFILMENT",
|
|
730
|
-
"workflow:order:hd:carrier.ref": "HD_CARRIER",
|
|
731
|
-
"workflow:order:cc:carrier.ref": "CC_CARRIER",
|
|
732
|
-
|
|
733
|
-
"setting:api.timeout": "30000",
|
|
734
|
-
"setting:retry.count": "3"
|
|
735
|
-
}
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
---
|
|
739
|
-
|
|
740
|
-
## Variable Syntax
|
|
741
|
-
|
|
742
|
-
The CLI uses `[[variable]]` tokens in JSON and CSV asset files for environment-specific substitution during `module install`.
|
|
743
|
-
|
|
744
|
-
| Syntax | Used In | Example |
|
|
745
|
-
|--------|---------|---------|
|
|
746
|
-
| `[[variable]]` | JSON/CSV assets, workflow fragments | `[[retailer.id]]`, `[[network.ref]]`, `[[account.id]]` |
|
|
747
|
-
|
|
748
|
-
### Substitution Rules
|
|
749
|
-
|
|
750
|
-
- **Only `[[...]]` is processed.** Other syntaxes (`${}`, `{{}}`) are NOT recognized.
|
|
751
|
-
- **Unresolved tokens are left as-is.** The CLI does not error on missing values — it silently keeps the `[[token]]` in the output. Always check for unreplaced tokens before installing: `rg '\[\[.*\]\]' module.config.*.json`
|
|
752
|
-
- **`module.config.json` is a values-only template.** Keys must be scoped with prefixes (`default:`, `workflow:`, `setting:`). Unscoped keys do not participate in substitution.
|
|
753
|
-
- **Config values must be scalars** (string, number, boolean). If your template uses metadata objects with `type`/`description` fields, replace them with real values before installing.
|
|
754
|
-
|
|
755
|
-
### Variable Flow
|
|
756
|
-
|
|
757
|
-
1. Define variables in `resources/module.config.json` (template)
|
|
758
|
-
2. Use `[[variable]]` tokens in asset files under `resources/assets/`
|
|
759
|
-
3. Run `fluent module config <module> -p <profile> -r <retailer>` to generate a config file
|
|
760
|
-
4. Edit the generated `module.config.<retailer>.<module>.json` with real values
|
|
761
|
-
5. Install with `fluent module install <module> -c <config-file> ...`
|
|
762
|
-
|
|
763
|
-
---
|
|
764
|
-
|
|
765
|
-
## Module Structure
|
|
766
|
-
|
|
767
|
-
Complete canonical directory layout for a Fluent CLI module:
|
|
768
|
-
|
|
769
|
-
```
|
|
770
|
-
my-module/
|
|
771
|
-
|
|
|
772
|
-
+-- resources/ <- Module content root
|
|
773
|
-
| |
|
|
774
|
-
| +-- module.json <- Module metadata (name, version, dependencies)
|
|
775
|
-
| +-- module.config.json <- Variable template (required; can be empty {})
|
|
776
|
-
| |
|
|
777
|
-
| +-- assets/ <- All deployable assets
|
|
778
|
-
| +-- workflows/ <- Workflow JSON files (*.json)
|
|
779
|
-
| +-- settings/ <- Settings JSON files (*.json)
|
|
780
|
-
| +-- locations/ <- Location JSON files (*.json)
|
|
781
|
-
| +-- users/ <- User JSON files (*.json)
|
|
782
|
-
| +-- roles/ <- Role JSON files (*.json)
|
|
783
|
-
| +-- networks/ <- Network JSON files (*.json)
|
|
784
|
-
| +-- carriers/ <- Carrier JSON files (*.json)
|
|
785
|
-
| +-- product-catalogues/ <- Product catalogue JSON files (*.json)
|
|
786
|
-
| +-- categories/ <- Category CSV files (*.csv)
|
|
787
|
-
| +-- products/ <- Product CSV files (*.csv)
|
|
788
|
-
| +-- inventory-catalogues/ <- Inventory catalogue JSON files (*.json)
|
|
789
|
-
| +-- inventory/ <- Inventory CSV files (*.csv)
|
|
790
|
-
| +-- virtual-catalogues/ <- Virtual catalogue JSON files (*.json)
|
|
791
|
-
| +-- control-groups/ <- Control group JSON files (*.json)
|
|
792
|
-
| +-- controls/ <- Control JSON files (*.json)
|
|
793
|
-
| +-- storage-areas/ <- Storage area JSON files (*.json)
|
|
794
|
-
| +-- payment-service-providers/ <- PSP JSON files (*.json)
|
|
795
|
-
| +-- workflow-fragments/ <- Workflow fragment files (optional)
|
|
796
|
-
| +-- <workflow-name>/ <- Subfolder per target workflow
|
|
797
|
-
| +-- *.json
|
|
798
|
-
|
|
|
799
|
-
+-- plugins/ <- Java plugin code (optional, extension modules only)
|
|
800
|
-
| +-- pom.xml <- Maven parent POM
|
|
801
|
-
| +-- rules/ <- Business rule Java classes
|
|
802
|
-
| +-- types/ <- Model/DTO Java classes
|
|
803
|
-
| +-- util/ <- Utility Java classes
|
|
804
|
-
|
|
|
805
|
-
+-- scripts/
|
|
806
|
-
| +-- build-module.sh <- Build script
|
|
807
|
-
|
|
|
808
|
-
+-- dist/ <- Build output (created after build)
|
|
809
|
-
+-- my-module-1.0.0.zip <- Deployable module package
|
|
810
|
-
```
|
|
811
|
-
|
|
812
|
-
**Key notes:**
|
|
813
|
-
- `module.config.json` is required even if empty (`{}`).
|
|
814
|
-
- `plugins/` is only present in extension modules with custom Java rules.
|
|
815
|
-
- Workflow fragments must be in subfolders under `workflow-fragments/` named after the target workflow. Files placed directly under `workflow-fragments/` are ignored.
|
|
816
|
-
- `module.json` defines `name`, `version`, `title`, `description`, `authors`, `dependencies`, and `contracts`.
|
|
817
|
-
|
|
818
|
-
**module.json example:**
|
|
819
|
-
```json
|
|
820
|
-
{
|
|
821
|
-
"_schema": "1.0.0",
|
|
822
|
-
"name": "sample/custom-extensions",
|
|
823
|
-
"version": "1.0.0",
|
|
824
|
-
"title": "Custom Extensions",
|
|
825
|
-
"description": "Custom business rules and workflow extensions",
|
|
826
|
-
"authors": [{ "name": "Implementation Team" }],
|
|
827
|
-
"dependencies": [],
|
|
828
|
-
"contracts": []
|
|
829
|
-
}
|
|
830
|
-
```
|
|
831
|
-
|
|
832
|
-
---
|
|
833
|
-
|
|
834
|
-
## Selective Asset Installation
|
|
835
|
-
|
|
836
|
-
Use `--include` and `--exclude` flags on `module install` to deploy only specific asset types. Paths match folder names inside the module's `assets/` directory.
|
|
837
|
-
|
|
838
|
-
### Filterable Paths
|
|
839
|
-
|
|
840
|
-
| Path | Asset Type |
|
|
841
|
-
|------|-----------|
|
|
842
|
-
| `workflows` | Workflow JSON files |
|
|
843
|
-
| `settings` | Settings JSON files |
|
|
844
|
-
| `rules` | Java plugin JARs |
|
|
845
|
-
| `locations` | Location definitions |
|
|
846
|
-
| `users` | User definitions |
|
|
847
|
-
| `roles` | Role definitions |
|
|
848
|
-
| `networks` | Network definitions |
|
|
849
|
-
| `carriers` | Carrier definitions |
|
|
850
|
-
| `products` | Product CSV data |
|
|
851
|
-
| `categories` | Category CSV data |
|
|
852
|
-
| `inventory` | Inventory CSV data |
|
|
853
|
-
| `product-catalogues` | Product catalogue definitions |
|
|
854
|
-
| `inventory-catalogues` | Inventory catalogue definitions |
|
|
855
|
-
| `virtual-catalogues` | Virtual catalogue definitions |
|
|
856
|
-
| `workflow-fragments` | Workflow fragment files |
|
|
857
|
-
|
|
858
|
-
### Common Scenarios
|
|
859
|
-
|
|
860
|
-
**Skip workflows for multi-retailer installs** (when each retailer has unique workflows):
|
|
861
|
-
```bash
|
|
862
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> --exclude workflows
|
|
863
|
-
```
|
|
864
|
-
|
|
865
|
-
**Plugin-only update** (recompiled Java rules, workflows/settings unchanged):
|
|
866
|
-
```bash
|
|
867
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> --include rules --force
|
|
868
|
-
```
|
|
869
|
-
|
|
870
|
-
**Workflows + settings only** (common update pattern):
|
|
871
|
-
```bash
|
|
872
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> \
|
|
873
|
-
--include workflows settings --force
|
|
874
|
-
```
|
|
875
|
-
|
|
876
|
-
**Production install without test data:**
|
|
877
|
-
```bash
|
|
878
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> \
|
|
879
|
-
--exclude products inventory categories
|
|
880
|
-
```
|
|
881
|
-
|
|
882
|
-
**Large dataset chunking** (avoid timeouts):
|
|
883
|
-
```bash
|
|
884
|
-
# Step 1: Infrastructure (everything except bulk data)
|
|
885
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> --exclude products inventory
|
|
886
|
-
|
|
887
|
-
# Step 2: Products (with increased wait)
|
|
888
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> --include products --wait 5000
|
|
889
|
-
|
|
890
|
-
# Step 3: Inventory
|
|
891
|
-
fluent module install dist/my-module.zip -p <profile> -r <retailer> --include inventory --wait 5000
|
|
892
|
-
```
|
|
893
|
-
|
|
894
|
-
**Fast dev iteration** (deploy only what changed):
|
|
895
|
-
```bash
|
|
896
|
-
# Full install first time
|
|
897
|
-
fluent module install dist/my-module.zip -p dev -r DEV -c config.json
|
|
898
|
-
|
|
899
|
-
# Subsequent iterations — only changed assets
|
|
900
|
-
fluent module install dist/my-module.zip -p dev -r DEV --include workflows --force
|
|
901
|
-
```
|
|
902
|
-
|
|
903
|
-
---
|
|
904
|
-
|
|
905
|
-
## Workflow Fragment Strategies
|
|
906
|
-
|
|
907
|
-
Workflow fragments use `mergeStrategy` on rulesets, rules, statuses, and triggers to control how they combine with the base workflow during `module install` or `workflow merge`.
|
|
908
|
-
|
|
909
|
-
| Strategy | Behavior | When to Use |
|
|
910
|
-
|----------|----------|-------------|
|
|
911
|
-
| **`merge`** | Adds or updates rules/triggers/userActions within an existing ruleset. New rulesets are added. Duplicate rules (same name + props) are ignored. Use `index` on rules to control insertion position. | Adding custom logic to reference module rulesets. Extending without breaking existing rules. |
|
|
912
|
-
| **`replace`** | Completely replaces the entire matched ruleset (or rule/status/trigger). The fragment's content becomes the new content. | Replacing obsolete logic. Taking full ownership of a ruleset. |
|
|
913
|
-
| **`keep`** | Preserves the original element from the base workflow. The fragment's element is ignored if a match exists. | Conditional additions — only add if not already present. Safe defaults. |
|
|
914
|
-
| **`delete`** | Removes the matched element from the workflow. No-op if the element does not exist. Processed before `replace` and `merge`. | Removing deprecated rulesets or rules. Cleanup during upgrades. |
|
|
915
|
-
|
|
916
|
-
### Matching Keys
|
|
917
|
-
|
|
918
|
-
Elements are matched for strategy resolution using these keys:
|
|
919
|
-
|
|
920
|
-
| Element | Matching Key |
|
|
921
|
-
|---------|-------------|
|
|
922
|
-
| Rulesets | `name \| type \| subtype \| [trigger statuses]` |
|
|
923
|
-
| Statuses | `name \| entityType` |
|
|
924
|
-
| Triggers | `status` |
|
|
925
|
-
| User Actions | `context[0].label` |
|
|
926
|
-
|
|
927
|
-
### Fragment Location in Modules
|
|
928
|
-
|
|
929
|
-
```
|
|
930
|
-
resources/assets/workflow-fragments/<workflow-name>/*.json
|
|
931
|
-
```
|
|
932
|
-
|
|
933
|
-
Fragments are sorted alphabetically by filename and processed in order. Files directly under `workflow-fragments/` (not in a subfolder) are ignored.
|
|
934
|
-
|
|
935
|
-
### Fragment Template
|
|
936
|
-
|
|
937
|
-
```json
|
|
938
|
-
{
|
|
939
|
-
"name": "ORDER::<SUBTYPE>",
|
|
940
|
-
"entityType": "ORDER",
|
|
941
|
-
"entitySubtype": "<SUBTYPE>",
|
|
942
|
-
"rulesets": [
|
|
943
|
-
{
|
|
944
|
-
"name": "<RULESET_NAME>",
|
|
945
|
-
"type": "ORDER",
|
|
946
|
-
"mergeStrategy": "merge",
|
|
947
|
-
"rules": [
|
|
948
|
-
{
|
|
949
|
-
"name": "[[account.id]].<module>.<RuleName>",
|
|
950
|
-
"mergeStrategy": "merge",
|
|
951
|
-
"index": 0,
|
|
952
|
-
"props": {
|
|
953
|
-
"yourProp": "<value>"
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
],
|
|
957
|
-
"triggers": [{ "status": "CREATED" }],
|
|
958
|
-
"userActions": []
|
|
959
|
-
}
|
|
960
|
-
]
|
|
961
|
-
}
|
|
962
|
-
```
|
|
963
|
-
|
|
964
|
-
---
|
|
965
|
-
|
|
966
|
-
## Troubleshooting Quick Reference
|
|
967
|
-
|
|
968
|
-
Top error messages from the Fluent CLI with causes and fixes.
|
|
969
|
-
|
|
970
|
-
### Critical Errors
|
|
971
|
-
|
|
972
|
-
| Error | Cause | Fix |
|
|
973
|
-
|-------|-------|-----|
|
|
974
|
-
| `Auth failed: 401 for <email>` | Invalid credentials or expired password | Update password: `fluent profile update <profile> --username <user> --password <new-pass>`. Purge sessions: `fluent profile purge-sessions`. |
|
|
975
|
-
| `Module dependency '<module>' not installed` | Required module not present on account | Install dependencies in order: `core` -> `fulfilment` -> `order` -> `inventory` -> custom. Check `module.json` dependencies. |
|
|
976
|
-
| `Invalid Module: core - a valid module should contain: assets folder, module.json file` | Module structure invalid or corrupt | Verify with `fluent module describe <module>`. Ensure `resources/module.json` and `resources/assets/` exist. |
|
|
977
|
-
| `Request timeout` / `connect ETIMEDOUT` | Network timeout or API unavailable | Check network connectivity. Verify API endpoint is reachable. Retry command. Use `--wait` to increase delays. |
|
|
978
|
-
|
|
979
|
-
### High Priority Errors
|
|
980
|
-
|
|
981
|
-
| Error | Cause | Fix |
|
|
982
|
-
|-------|-------|-----|
|
|
983
|
-
| `Module not found: <module>` | Wrong module name or path | For reference modules use exact names: `core`, `fulfilment`, `order`. For local modules verify the path exists. |
|
|
984
|
-
| `Profile '<name>' not found` | Profile does not exist | List profiles: `fluent profile list`. Create: `fluent profile create <name> ...`. |
|
|
985
|
-
| `Retailer configuration is required but was not provided` | Missing `--retailer` flag or active context | Set active retailer: `fluent profile use <profile> --retailer <ref>`. Or add `--retailer <ref>` to the command. |
|
|
986
|
-
| `Token '<placeholder>' not resolved` | Missing variable in config file | Run `fluent module config <module> -p <profile> -r <retailer>` to regenerate config. Fill all `[[...]]` placeholders before install. |
|
|
987
|
-
| `Missing required option: --id` / `--email` | Required parameter omitted | Check command help: `fluent <command> --help`. Add the required flag. |
|
|
988
|
-
|
|
989
|
-
### Medium Priority Errors
|
|
990
|
-
|
|
991
|
-
| Error | Cause | Fix |
|
|
992
|
-
|-------|-------|-----|
|
|
993
|
-
| `Setting '<name>' not found` | Setting does not exist or wrong name | List settings with wildcard: `fluent setting list -p <profile> -r <retailer> --name '%<pattern>%'`. Check spelling and context. |
|
|
994
|
-
| `Workflow '<name>' already exists` | Workflow conflict during install | Use `--exclude workflows` to skip, or `--force` to overwrite. |
|
|
995
|
-
| `Invalid workflow definition` | Workflow JSON has structural errors | Validate JSON syntax. Check required fields: `name`, `entityType`, `statuses`, `rulesets`. |
|
|
996
|
-
| `Workflow '<name>' not found` | Workflow does not exist in retailer | List workflows: `fluent workflow list -p <profile> -r <retailer>`. Verify spelling. |
|
|
997
|
-
| `Fragment workflow file does not exist` | Fragment file path invalid | Verify the file exists at the specified path. Use absolute or correct relative path. |
|
|
998
|
-
|
|
999
|
-
### Low Priority Warnings
|
|
1000
|
-
|
|
1001
|
-
| Error | Cause | Fix |
|
|
1002
|
-
|-------|-------|-----|
|
|
1003
|
-
| `Command not found: fluent` | CLI not in PATH or not installed | Verify: `npm list -g fluent-cli`. Reinstall if needed. Check PATH includes npm global bin directory. |
|
|
1004
|
-
| `No active profile set` | No profile selected | Set active: `fluent profile use <profile> --retailer <retailer>`. |
|
|
1005
|
-
| `Module config file not found` | Config file missing or wrong name | Generate: `fluent module config <module> -p <profile> -r <retailer>`. Expected name: `module.config.<retailer>.<module>.json`. |
|
|
1006
|
-
| `Workflow log position '<pos>' not found` | Invalid log entry position | List logs: `fluent workflowlog describe <workflow> -p <profile> -r <retailer>`. Positions are 0-based. |
|
|
1007
|
-
|
|
1008
|
-
### Quick Diagnostic Commands
|
|
1009
|
-
|
|
1010
|
-
```bash
|
|
1011
|
-
fluent --version # Verify CLI installed
|
|
1012
|
-
fluent profile active # Check active profile/retailer
|
|
1013
|
-
fluent profile purge-sessions # Clear cached tokens (fixes many auth issues)
|
|
1014
|
-
fluent --debug <command> # Enable verbose debug output
|
|
1015
|
-
fluent module describe <module-path> # Validate module structure
|
|
1016
|
-
fluent module list -p <profile> # Check installed modules on account
|
|
1017
|
-
```
|
|
1018
|
-
|
|
1019
|
-
---
|
|
1020
|
-
|
|
1021
613
|
## Quick Reference Card
|
|
1022
614
|
|
|
1023
615
|
```
|