@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.
Files changed (97) hide show
  1. package/README.md +17 -12
  2. package/bin/cli.mjs +219 -43
  3. package/content/cli/skills/fluent-bootstrap/SKILL.md +1 -1
  4. package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +1 -1
  5. package/content/cli/skills/fluent-cli-reference/SKILL.md +1 -1
  6. package/content/cli/skills/fluent-cli-retailer/SKILL.md +1 -1
  7. package/content/cli/skills/fluent-connect/SKILL.md +58 -3
  8. package/content/cli/skills/fluent-profile/SKILL.md +35 -5
  9. package/content/cli/skills/fluent-workflow/SKILL.md +2 -1
  10. package/content/dev/agents/fluent-backend-dev.md +2 -2
  11. package/content/dev/agents/fluent-dev.md +1 -1
  12. package/content/dev/agents/fluent-frontend-dev.md +1 -1
  13. package/content/dev/skills/fluent-account-snapshot/SKILL.md +1 -1
  14. package/content/dev/skills/fluent-archive/SKILL.md +2 -1
  15. package/content/dev/skills/fluent-build/SKILL.md +2 -2
  16. package/content/dev/skills/fluent-connection-analysis/SKILL.md +2 -1
  17. package/content/dev/skills/fluent-custom-code/SKILL.md +3 -2
  18. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +7 -6
  19. package/content/dev/skills/fluent-e2e-test/SKILL.md +1 -1
  20. package/content/dev/skills/fluent-entity-flow-diagnose/SKILL.md +2 -1
  21. package/content/dev/skills/fluent-event-api/SKILL.md +3 -2
  22. package/content/dev/skills/fluent-feature-explain/SKILL.md +2 -1
  23. package/content/dev/skills/fluent-feature-plan/SKILL.md +2 -1
  24. package/content/dev/skills/fluent-feature-status/SKILL.md +1 -1
  25. package/content/dev/skills/fluent-frontend-build/SKILL.md +1 -1
  26. package/content/dev/skills/fluent-frontend-readme/SKILL.md +2 -1
  27. package/content/dev/skills/fluent-frontend-review/SKILL.md +2 -1
  28. package/content/dev/skills/fluent-goal/SKILL.md +1 -1
  29. package/content/dev/skills/fluent-implementation-map/SKILL.md +1 -1
  30. package/content/dev/skills/fluent-inventory-catalog/SKILL.md +2 -2
  31. package/content/dev/skills/fluent-job-batch/SKILL.md +6 -3
  32. package/content/dev/skills/fluent-knowledge-init/SKILL.md +1 -1
  33. package/content/dev/skills/{fluent-source-onboard → fluent-module-convert}/SKILL.md +223 -24
  34. package/content/dev/skills/fluent-module-scaffold/SKILL.md +2 -1
  35. package/content/dev/skills/fluent-module-validate/SKILL.md +8 -7
  36. package/content/dev/skills/fluent-mystique-assess/SKILL.md +22 -6
  37. package/content/dev/skills/fluent-mystique-builder/SKILL.md +33 -2
  38. package/content/dev/skills/fluent-mystique-component/SKILL.md +1 -1
  39. package/content/dev/skills/fluent-mystique-diff/SKILL.md +1 -1
  40. package/content/dev/skills/fluent-mystique-preview/SKILL.md +19 -2
  41. package/content/dev/skills/fluent-mystique-scaffold/SDK_REFERENCE.md +2 -2
  42. package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +13 -2
  43. package/content/dev/skills/fluent-mystique-scaffold/TEMPLATES.md +1 -1
  44. package/content/dev/skills/fluent-mystique-sdk-reference/SKILL.md +2 -1
  45. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +3 -3
  46. package/content/dev/skills/fluent-retailer-config/SKILL.md +3 -3
  47. package/content/dev/skills/fluent-rollback/SKILL.md +1 -1
  48. package/content/dev/skills/fluent-rule-lookup/SKILL.md +2 -1
  49. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +7 -6
  50. package/content/dev/skills/fluent-rule-test/SKILL.md +2 -1
  51. package/content/dev/skills/fluent-scope-plan/SKILL.md +2 -2
  52. package/content/dev/skills/fluent-session/SKILL.md +1 -1
  53. package/content/dev/skills/fluent-settings/SKILL.md +2 -2
  54. package/content/dev/skills/fluent-skill-observability/SKILL.md +1 -1
  55. package/content/dev/skills/fluent-sourcing/SKILL.md +38 -13
  56. package/content/dev/skills/fluent-system-monitoring/SKILL.md +1 -1
  57. package/content/dev/skills/fluent-test-data/SKILL.md +1 -1
  58. package/content/dev/skills/fluent-trace/SKILL.md +3 -2
  59. package/content/dev/skills/fluent-transition-api/SKILL.md +3 -2
  60. package/content/dev/skills/fluent-ui-record/SKILL.md +1 -1
  61. package/content/dev/skills/fluent-ui-test/SKILL.md +9 -8
  62. package/content/dev/skills/fluent-use-case-discover/SKILL.md +2 -2
  63. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +3 -2
  64. package/content/dev/skills/fluent-workspace-tree/SKILL.md +4 -3
  65. package/content/knowledge/index.md +3 -3
  66. package/content/knowledge/platform/domain-model.md +1 -0
  67. package/content/knowledge/platform/module-structure.md +5 -5
  68. package/content/knowledge/platform/mystique-routing.md +6 -3
  69. package/content/knowledge/platform/permissions-and-contexts.md +2 -2
  70. package/content/knowledge/platform/rule-test-patterns.md +1 -1
  71. package/content/knowledge/platform/workflow-json-structure.md +1 -1
  72. package/content/mcp-extn/skills/fluent-mcp-core/SKILL.md +2 -1
  73. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +3 -2
  74. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +1 -1
  75. package/docs/01-first-session.md +175 -0
  76. package/docs/02-prompt-guide.md +246 -0
  77. package/docs/03-use-cases.md +1181 -0
  78. package/docs/04-onboarding-plan.md +355 -0
  79. package/docs/05-getting-started.md +262 -0
  80. package/docs/06-dev-workflow.md +1040 -0
  81. package/docs/INDEX.md +40 -0
  82. package/docs/agents-and-skills-guide.md +199 -0
  83. package/docs/capability-map.md +165 -0
  84. package/docs/chrome-devtools-mcp-reference.md +401 -0
  85. package/docs/fluent-ai-skills-reference.md +1351 -0
  86. package/docs/manifest-safety.md +79 -0
  87. package/docs/mcp-servers.md +209 -0
  88. package/docs/workflow-reference.md +167 -0
  89. package/lib/fluent-brand.css +55 -0
  90. package/metadata.json +7 -6
  91. package/package.json +17 -3
  92. package/scripts/postinstall.mjs +38 -0
  93. package/{content/dev/skills/fluent-trace/scripts/analyze-event-capture.mjs → tools/event-capture-analyzer.mjs} +3 -3
  94. package/tools/{generate-feature-dashboard.mjs → feature-dashboard.mjs} +2 -2
  95. package/tools/manifest-diff.mjs +1 -1
  96. package/{content/dev/skills/fluent-mystique-assess/validator.mjs → tools/manifest-validator.mjs} +2 -2
  97. package/tools/workflow-explainer.mjs +1021 -0
@@ -2114,8 +2114,8 @@ The `<namespace>` segment identifies WHO built the component. Choose based on co
2114
2114
  | Context | Namespace Strategy | Example |
2115
2115
  |---------|-------------------|---------|
2116
2116
  | **Fluent Commerce OOTB** | `fc` (reserved — never use) | `fc.list`, `fc.page`, `fc.card.attribute` |
2117
- | **Partner / SI company** | Company abbreviation (2-6 chars, lowercase) | `acme`, `tcs`, `dxc`, `wipro` |
2118
- | **Client / brand** | Brand abbreviation or project code | `nike`, `coles`, `woolies`, `proj1` |
2117
+ | **Partner / SI company** | Company abbreviation (2-6 chars, lowercase) | `acme`, `partner1`, `partner2`, `mysi` |
2118
+ | **Client / brand** | Brand abbreviation or project code | `brandx`, `retailx`, `storeco`, `proj1` |
2119
2119
  | **Feature-scoped** | Feature or domain name | `appeasement`, `returns`, `sourcing` |
2120
2120
  | **Internal / prototype** | Team or project prefix | `demo`, `poc`, `hackathon` |
2121
2121
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-mystique-scaffold
3
- description: Scaffold a new Mystique SDK component project with webpack, TypeScript, Storybook, Jest, component registration, and i18n ready to develop and deploy. Triggers on "scaffold component", "new mystique project", "create sdk component", "mystique sdk setup", "new ui plugin".
3
+ description: Scaffold a new Mystique SDK component project with webpack, TypeScript, Storybook, Jest, component registration, and i18n ready to deploy. Use for creating new SDK component projects from scratch.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <project-name> [--components ComponentA,ComponentB] [--category content|layout|page|filter]
@@ -46,6 +46,17 @@ Check for project-specific knowledge that should inform the generated SDK projec
46
46
  4. If `accounts/<PROFILE>/memory/index.md` exists, read the top account-specific frontend, Storybook, test, and deployment gotchas and apply them silently.
47
47
  5. Apply knowledge silently — do NOT show raw knowledge to user, just follow the conventions in the generated scaffold
48
48
 
49
+ ## Prerequisites — New App Checklist
50
+
51
+ Before scaffolding, verify the target environment is ready. Skip items that are already confirmed.
52
+
53
+ 1. **Target app exists** — The Fluent UX app (`oms`, `store`, or custom) must already exist in the environment. Manifests are deployed as settings attached to an app — if the app doesn't exist, deployment will fail silently.
54
+ 2. **Permissions configured** — The user or role deploying the manifest must have permission to create/update settings with `context: "ACCOUNT"`. Admin roles have this by default; custom roles may not.
55
+ 3. **SDK version compatibility** — Check the deployed app's SDK version (`sdk-version.json` at the app URL). The scaffolded project's `@anthropic-ai/sdk` and `@anthropic-ai/mystique-*` versions must be compatible with the runtime. Mismatches cause silent component registration failures.
56
+ 4. **Plugin hosting plan** — Know where the production bundle will be hosted (Vercel, S3, CloudFront, etc.). The scaffold produces `dist/bundle.[hash].js` — it needs a URL accessible from the browser.
57
+
58
+ If prerequisites are unclear, recommend: `/fluent-retailer-config` (create entities), `/fluent-settings` (verify setting access), `/fluent-account-snapshot` (inspect environment state).
59
+
49
60
  ## OMX Component SDK — Source Template
50
61
 
51
62
  Every Mystique SDK project starts from the **OMX Component SDK** template zip (or an existing SDK source folder/repo provided by the user).
@@ -444,7 +455,7 @@ Present the full plan content to the user and wait for approval before generatin
444
455
  | `-> READY: <path>` | Project directory scaffolded | `-> READY: accounts/MY_PROFILE/SOURCE/frontend/mystique-plugin-curbside/` |
445
456
  | `-> NEXT: /fluent-<skill>` | Ready for manifest wiring | `-> NEXT: /fluent-mystique-builder` |
446
457
  | `-> BLOCKED: <reason>` | Cannot proceed | `-> BLOCKED: PLAN_REQUIRED -- Write a plan via /fluent-feature-plan` |
447
- | `-> SKIP: <reason>` | Existing project covers the domain | `-> SKIP: Extend existing project mystique-plugin-hm. Add component files directly` |
458
+ | `-> SKIP: <reason>` | Existing project covers the domain | `-> SKIP: Extend existing project mystique-plugin-acme. Add component files directly` |
448
459
 
449
460
  ### Error codes
450
461
 
@@ -500,7 +500,7 @@ console.groupEnd();
500
500
  ```
501
501
 
502
502
  **Alias naming convention:** `<namespace>.<category>.<component-name>` where:
503
- - `namespace` is the company/project prefix (e.g., `acme`, `hm`, `curbside`)
503
+ - `namespace` is the company/project prefix (e.g., `acme`, `globex`, `curbside`)
504
504
  - `category` is one of `page`, `layout`, `content`, `filter`
505
505
  - `component-name` is kebab-case (e.g., `order-tracker`, `store-map`)
506
506
 
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: fluent-mystique-sdk-reference
3
- description: "Mystique Component SDK API REFERENCE LOOKUP React hooks, composition primitives, field patterns, and Material-UI constraints. Read-only documentation lookup for building custom Fluent Commerce UI components. This IS a valid platform skill — NEVER classify as 'none' or 'direct knowledge lookup'. ROUTING PRIORITY — if the prompt says '/fluent-mystique-sdk-reference', 'useSettings hook', 'SDK hook signature', 'SDK reference documentation', 'hook API', 'composition API reference', 'SDK hook', or 'look up hook', route HERE. HARD NEGATIVE — Do NOT route here for: 'add component' / 'register component' / 'extend SDK project' (→ fluent-mystique-component). This skill is READ-ONLY reference documentation. Triggers on 'mystique hooks', 'sdk reference', 'component api', 'field registry', 'mystique sdk', 'SDK hook API', 'hook patterns', 'useSettings hook', 'what hook', 'SDK documentation lookup', 'hook signature', '/fluent-mystique-sdk-reference'."
3
+ description: Mystique Component SDK API reference for React hooks, composition primitives, field patterns, and Material-UI constraints. Use for SDK hook lookups, API signatures, or component SDK documentation.
4
4
  user-invocable: true
5
5
  allowed-tools: Read, Glob, Grep
6
6
  argument-hint: [hook-name|pattern-name]
7
7
  cursor-tier: manual
8
8
  ---
9
+ <!-- routing-notes: ROUTING PRIORITY — if the prompt says "useSettings hook", "SDK hook signature", "SDK reference documentation", "hook API", or "composition API reference", route HERE. HARD NEGATIVE — Do NOT route here for "add component", "register component", "extend SDK project" (→ fluent-mystique-component). This skill is READ-ONLY reference documentation. -->
9
10
 
10
11
  # Mystique Component SDK Reference
11
12
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-pre-deploy-check
3
- description: Run a read-only pre-deployment checklist for Fluent Commerce modules and workflows. Validates environment readiness, module structure, workflow integrity, settings, and connection topology before deployment without building, packaging, or deploying artifacts. Triggers on "pre-deploy check", "deployment checklist", "ready to deploy", "deploy gate", "can I deploy", "deploy readiness".
3
+ description: Run a read-only pre-deployment checklist validating environment readiness, module structure, workflow integrity, settings, and connection topology. Use for deploy-readiness checks before pushing artifacts.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--profile <profile>] [--retailer <ref>] [--module-path <path>] [--skip <phase,...>]
@@ -10,7 +10,7 @@ planning-gate: advisory
10
10
 
11
11
  # Pre-Deployment Checklist
12
12
 
13
- Structured deployment gate between "build passes" and "deploy to retailer." Runs 9 phases of validation (29 backend gates + 5 frontend gates) producing a machine-readable pass/fail report that blocks deployment on critical failures.
13
+ Structured deployment gate between "build passes" and "deploy to retailer." Runs 9 phases of validation (32 backend gates + 5 frontend gates) producing a machine-readable pass/fail report that blocks deployment on critical failures.
14
14
 
15
15
  This skill is the final checkpoint in the Agent-Driven Development (ADD) lifecycle, positioned at Phase 6 (Demo Deployment). It aggregates validation from multiple specialized skills and MCP tools into a single, traceable pre-flight report.
16
16
 
@@ -1008,7 +1008,7 @@ wc -c accounts/<PROFILE>/SOURCE/frontend/<project>/dist/bundle.*.js
1008
1008
  **Invocation:**
1009
1009
  If manifest settings were saved to disk via `outputFile` in Gate 5.1, run the Mystique validator against them:
1010
1010
  ```bash
1011
- node content/dev/skills/fluent-mystique-assess/validator.mjs accounts/<PROFILE>/settings/backups/fc.mystique.manifest.*.json --json
1011
+ node fluent-ai-skills/tools/manifest-validator.mjs accounts/<PROFILE>/settings/backups/fc.mystique.manifest.*.json --json
1012
1012
  ```
1013
1013
  Alternatively, invoke `/fluent-mystique-assess` skill for each manifest file.
1014
1014
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-retailer-config
3
- description: Configure Fluent Commerce retailer environments by creating real platform entities warehouse locations, store locations, networks, catalogues, inventory, carriers, and users via GraphQL. This is the canonical owner for "create warehouse", "create warehouse and store locations for this retailer", "set up locations for this retailer", "create network", or other retailer entity setup. Even if the user says "configure retailer", stay here when the nouns are locations, networks, carriers, or catalogues. Do NOT route key-value settings CRUD here. Triggers on "setup retailer", "create warehouse", "create warehouse and store locations", "create warehouse and store locations for this retailer", "create store location", "create location", "create network", "setup inventory", "retailer config", "environment setup".
3
+ description: Configure Fluent Commerce retailer environments by creating platform entities like locations, networks, catalogues, inventory, carriers, and users via GraphQL. Use for retailer entity setup or environment configuration.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--retailer <ref>] [--setup-type full|locations|networks|catalogues|inventory]
@@ -880,8 +880,8 @@ Variables:
880
880
  ```json
881
881
  {
882
882
  "input": {
883
- "ref": "CARRIER_DHL",
884
- "name": "DHL Express",
883
+ "ref": "CARRIER_FAST",
884
+ "name": "Fast Freight Carrier",
885
885
  "type": "SHIPPING",
886
886
  "retailer": { "id": "<retailerId>" }
887
887
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-rollback
3
- description: Roll back workflow and module deployments in Fluent Commerce. Supports workflow version revert, module redeploy of prior versions, and settings restore from audit trail. Triggers on "rollback", "revert deployment", "undo deploy", "roll back workflow", "restore previous version".
3
+ description: Roll back workflow and module deployments in Fluent Commerce with version revert, module redeploy, and settings restore from audit trail. Use for rollback, revert, or restoring previous versions.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <workflow|module|settings> <name> [--profile PROFILE] [--retailer RETAILER_REF] [--to-version VERSION] [--dry-run]
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: fluent-rule-lookup
3
- description: "OOTB RULE REFERENCE — search and discover out-of-the-box Fluent Commerce reference module rules by keyword, entity type, module, or capability. Queries MCP plugin_list first, falls back to offline catalog. ROUTING PRIORITY if the prompt asks 'what does [RuleName] rule do', 'what parameters does [rule] accept', 'SendWebhook rule', 'OOTB rule documentation', or 'look up rule [name]', route HERE — do NOT route to fluent-custom-code. fluent-custom-code analyzes custom Java source code; this skill looks up OOTB platform rules. Does NOT reverse-engineer features (→ fluent-feature-explain) and does NOT scaffold new custom rules (→ fluent-rule-scaffold). Triggers on 'find rule', 'search rules', 'OOTB rule', 'what rule does', 'rule lookup', 'available rules', 'which rules', 'list rules', 'rule catalog', 'reference module rules', 'what does the [rule] rule do', 'what parameters does [rule] accept'."
3
+ description: Search and discover out-of-the-box Fluent Commerce reference module rules by keyword, entity type, module, or capability via MCP plugin_list. Use for OOTB rule lookups, parameter reference, or rule catalog searches.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Glob, Grep
6
6
  argument-hint: <search-term> [--module core|order|fulfilment|inventory|base|globalinventory] [--entity ORDER|FULFILMENT|...] [--offline]
7
7
  cursor-tier: manual
8
8
  ---
9
+ <!-- routing-notes: ROUTING PRIORITY — if the prompt asks "what does [RuleName] rule do", "what parameters does [rule] accept", "OOTB rule documentation", or "look up rule", route HERE — do NOT route to fluent-custom-code. fluent-custom-code analyzes custom Java source code; this skill looks up OOTB platform rules. Does NOT reverse-engineer features (→ fluent-feature-explain) and does NOT scaffold new rules (→ fluent-rule-scaffold). -->
9
10
 
10
11
  # OOTB Rule Lookup
11
12
 
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-rule-scaffold
3
- description: Scaffold new Fluent Commerce Rubix rules. Generates Java class, test class, and wires into module.json. Use this for NEW rule creation only. YIELD-BACK — if the prompt says "write tests for", "write unit tests", "generate tests for this rule", "test this rule", or "fix rule test", route to fluent-rule-test instead — that skill owns all test generation and repair for existing rules. YIELD-BACK — if the prompt says "analyze", "explain", or "understand" existing custom code, route to fluent-custom-code instead — this skill only CREATES new rules. Key knowledge — rule-development-contract.md (@ParamString vs @EventAttribute), graphql-in-rules.md (DynamicUtils vs Apollo), rule-test-patterns.md (test harness), module-structure.md (Maven layout). Triggers on "create rule", "new rule", "scaffold rule", "add rule class".
3
+ description: Scaffold new Fluent Commerce Rubix rules with Java class, test class, and module.json wiring for NEW rule creation only. Use for creating new rules, not testing or analyzing existing ones.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <rule-name> [--entity-type ORDER|FULFILMENT|...] [--package common|fulfilment|order|...]
7
7
  cursor-tier: manual
8
8
  planning-gate: mandatory
9
9
  ---
10
+ <!-- routing-notes: YIELD-BACK — if the prompt says "write tests for", "generate tests for this rule", "test this rule", or "fix rule test", route to fluent-rule-test instead. YIELD-BACK — if the prompt says "analyze", "explain", or "understand" existing custom code, route to fluent-custom-code instead — this skill only CREATES new rules. -->
10
11
 
11
12
  # Rule Scaffolder
12
13
 
@@ -288,7 +289,7 @@ If the same event hits twice due to a race condition, the rule should check curr
288
289
  ```java
289
290
  // GOOD: Idempotent — checks before creating
290
291
  @Override
291
- public void run(RuleContext context) {
292
+ public void run(ContextWrapper context) {
292
293
  // Check if child entity already exists
293
294
  List<CreditMemo> existing = context.getEntity()
294
295
  .getCreditMemos().stream()
@@ -305,7 +306,7 @@ public void run(RuleContext context) {
305
306
 
306
307
  // BAD: Not idempotent — creates duplicate child entity on retry
307
308
  @Override
308
- public void run(RuleContext context) {
309
+ public void run(ContextWrapper context) {
309
310
  // Directly creates without checking existence
310
311
  context.action().mutation(createCreditMemoMutation, variables);
311
312
  }
@@ -319,7 +320,7 @@ Never trust event payload values without validating against current entity state
319
320
 
320
321
  ```java
321
322
  @Override
322
- public void run(RuleContext context) {
323
+ public void run(ContextWrapper context) {
323
324
  // 1. Validate entity is still in expected state
324
325
  String currentStatus = context.getEntity().getStatus();
325
326
  if (!"BOOKED".equals(currentStatus)) {
@@ -534,8 +535,8 @@ class <RULE_NAME>Test {
534
535
  when(context.action()).thenReturn(action);
535
536
  when(action.mutation()).thenReturn(mutationAction);
536
537
  when(action.eventAction()).thenReturn(eventAction);
537
- when(event_getAccountId()).thenReturn("TEST_ACCOUNT");
538
- when(event_getName()).thenReturn("TestEvent");
538
+ when(event.getAccountId()).thenReturn("TEST_ACCOUNT");
539
+ when(event.getName()).thenReturn("TestEvent");
539
540
  }
540
541
 
541
542
  @Test
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-rule-test
3
- description: Generate or repair JUnit 5 unit tests for existing Fluent Commerce Rubix backend rule classes. ROUTING PRIORITY over fluent-rule-scaffold for ANY prompt that says "write tests for", "write unit tests", "generate tests for this rule", "test this rule", or "fix rule test" — even if it does not explicitly say "existing". If the prompt mentions testing or writing tests for a rule, route HERE. Rule scaffold is for creating NEW rule implementations from scratch; this skill owns all test generation and repair work. Use when Codex needs to add tests for an existing rule, backfill rule coverage, update rule fixtures after logic changes, regenerate tests after logic changes, or diagnose rule test failures. Triggers on "test Fluent rule", "write Rubix rule test", "generate backend rule test", "fix rule test", "write unit tests for this rule", "write tests for this", "write tests for", "test this rule", "generate tests".
3
+ description: Generate or repair JUnit 5 unit tests for existing Fluent Commerce Rubix backend rule classes. Use for writing rule tests, backfilling coverage, updating fixtures, or diagnosing test failures.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <RuleName> [--style auto|rule-executor|test-executor|mockito|workflow] [--coverage full|happy-path]
7
7
  category: testing
8
8
  tags: [rule, test, junit, rubix, ruleexecutor, testexecutor]
9
9
  ---
10
+ <!-- routing-notes: ROUTING PRIORITY over fluent-rule-scaffold for ANY prompt that says "write tests for", "write unit tests", "generate tests for this rule", "test this rule", or "fix rule test". Rule scaffold is for creating NEW rule implementations; this skill owns all test generation and repair work. -->
10
11
 
11
12
  # Rule Test Generator
12
13
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-scope-plan
3
- description: Break approved specs into phased delivery plans with dependency-ordered task graphs. Identifies vertical slice delivery phases, then decomposes each phase into ordered tasks with skill mappings. Triggers on "phase this feature", "split into phases", "delivery phases", "decompose scope", "plan from scope", "task breakdown", "scope to tasks", "incremental delivery", "vertical slices".
3
+ description: Break approved specs into phased delivery plans with dependency-ordered task graphs and vertical slice phases decomposed into ordered tasks. Use for delivery phasing, scope decomposition, or task breakdown.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--profile PROFILE] [--feature SLUG] [--phases N] [--scope <path>] [--output-format json|markdown] [--validate-only] [--batch-features]
@@ -421,7 +421,7 @@ Perform Kahn's algorithm (BFS-based topological sort). The priority field reflec
421
421
  ### Skill Existence Validation
422
422
 
423
423
  After generating the task list, validate that every `skill` field references a real skill. Known valid skills:
424
- `fluent-module-scaffold`, `fluent-rule-scaffold`, `fluent-workflow-builder`, `fluent-build`, `fluent-settings`, `fluent-module-deploy`, `fluent-workflow-deploy`, `fluent-e2e-test`, `fluent-pre-deploy-check`, `fluent-custom-code`, `fluent-feature-plan`, `fluent-retailer-config`, `fluent-source-onboard`, `fluent-test-data`, `fluent-job-batch`, `fluent-use-case-discover`, `fluent-module-validate`, `fluent-connection-analysis`, `fluent-mystique-builder`, `fluent-mystique-scaffold`, `fluent-mystique-component`
424
+ `fluent-module-scaffold`, `fluent-rule-scaffold`, `fluent-workflow-builder`, `fluent-build`, `fluent-settings`, `fluent-module-deploy`, `fluent-workflow-deploy`, `fluent-e2e-test`, `fluent-pre-deploy-check`, `fluent-custom-code`, `fluent-feature-plan`, `fluent-retailer-config`, `fluent-module-convert`, `fluent-test-data`, `fluent-job-batch`, `fluent-use-case-discover`, `fluent-module-validate`, `fluent-connection-analysis`, `fluent-mystique-builder`, `fluent-mystique-scaffold`, `fluent-mystique-component`
425
425
 
426
426
  ## Ambiguity Detection
427
427
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-session
3
- description: Track session changes and export structured audit trails. Maintains a running change log with text summaries and machine-readable JSON exports for CI/CD pipelines and compliance. Triggers on "session summary", "what did we change", "change summary", "show changes", "export audit", "session audit", "audit trail", "compliance report".
3
+ description: Track session changes and export structured audit trails with text summaries and machine-readable JSON exports for CI/CD and compliance. Use for session summaries, change logs, or audit exports.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Glob, Grep
6
6
  argument-hint: [show|reset|export [--format json|jsonl] [--output <path>] [--include-readonly]]
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-settings
3
- description: Manage Fluent Commerce settings discover, audit, create, update, and migrate retailer-scoped settings. Cross-reference workflow rules with settings to find gaps. Triggers on "manage settings", "create setting", "audit settings", "settings migration", "missing settings", "webhook settings".
3
+ description: Manage Fluent Commerce retailer-scoped settings with discover, audit, create, update, and migrate operations plus workflow rule cross-referencing. Use for settings management or gap analysis.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--audit <workflow-file>] [--context RETAILER|ACCOUNT|LOCATION] [--migrate --from <profile> --to <profile>]
@@ -673,7 +673,7 @@ For updates, present a clear diff:
673
673
 
674
674
  ```
675
675
  Setting: fc.webhook.order.created (ID: 365)
676
- Context: RETAILER:2
676
+ Context: RETAILER, contextId: 2
677
677
  Current value: {"url": "https://old-endpoint.com/webhook"}
678
678
  New value: {"url": "https://new-endpoint.com/webhook"}
679
679
  Backup: accounts/<PROFILE>/settings/backups/fc.webhook.order.created_2026-02-26_143000.json
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-skill-observability
3
- description: Unified skill system observability trace execution, analyze routing patterns, and review execution quality. Triggers on "skill trace", "trace skills", "what skills ran", "routing report", "routing analysis", "feedback dashboard", "show feedback", "review feedback", "promote learning", "skill effectiveness", "quality report", "skill quality", "audit skills".
3
+ description: Unified skill system observability for tracing execution, analyzing routing patterns, and reviewing execution quality across all skills. Use for skill trace, routing reports, or quality audits.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: trace [show|analyze|clear|hook-setup] | routing [full|summary|skill <name>|recommendations] | feedback [dashboard|review <skill>|promote <id>|effectiveness [<skill>]|export] | quality [<skill-name>]
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-sourcing
3
- description: "Comprehensive reference for the Fluent Commerce Responsive Sourcing Framework. Covers sourcing profiles, strategies, conditions, criteria, scoring algorithms, permutation search, settings schema, workflow integration, custom extensions, and operational GraphQL patterns. Triggers on \"sourcing\", \"sourcing profile\", \"sourcing strategy\", \"sourcing condition\", \"sourcing criteria\", \"fulfilment allocation\", \"location scoring\", \"order sourcing\", \"where to fulfil\"."
3
+ description: Comprehensive reference for the Fluent Commerce Responsive Sourcing Framework covering profiles, strategies, conditions, criteria, scoring algorithms, and workflow integration. Use for sourcing configuration or fulfilment allocation questions.
4
4
  user-invocable: true
5
5
  read-only: true
6
6
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
@@ -35,7 +35,9 @@ This is a **reference skill** — it provides domain knowledge and query pattern
35
35
 
36
36
  ## Related Knowledge
37
37
 
38
+ - `knowledge/platform/domain-model.md` — authoritative entity definitions for InventoryPosition, VirtualPosition, VirtualCatalogue, ControlGroup, Location, Network. **Read this first** for inventory entity relationships and GraphQL edges.
38
39
  - `knowledge/platform/create-order-reference.md` — how FulfilmentChoice entities are created inline with orders, item-to-FC linkage, and ORDER::MULTI patterns. Sourcing operates on FulfilmentChoice entities created by the order intake mutation.
40
+ - `knowledge/platform/reference-module-versions.md` — OOTB inventory rules (CreateInventoryPosition, ApplyThresholdControlsToVirtualPosition, etc.) and sourcing rule versions.
39
41
  - `knowledge/platform/financial-fields.md` — use for financial field naming conventions, tax/price/discount patterns on fulfilment and order entities
40
42
 
41
43
  ## When to Use
@@ -107,18 +109,28 @@ The `SourcingContext` is the runtime data object passed to conditions and criter
107
109
  | `order` | Order | The full order entity |
108
110
  | `order.totalPrice` | Float | Order total value |
109
111
  | `order.attributes[]` | List | Order-level custom attributes |
110
- | `fulfilmentChoice` | Object | Selected fulfilment option |
112
+ | `fulfilmentChoice` | Object | Selected fulfilment option (created by the order intake mutation) |
111
113
  | `fulfilmentChoice.type` | String | e.g., `HD`, `CC`, `SFS` |
112
114
  | `fulfilmentChoice.deliveryAddress` | Address | Delivery destination (lat/lng for distance) |
113
115
  | `items[]` | List | Order items to source |
114
116
  | `items[].productRef` | String | Product reference |
115
117
  | `items[].requestedQuantity` | Integer | Quantity needed |
116
- | `locations[]` | List | Candidate locations from network |
118
+ | `locations[]` | List | Candidate locations from the profile's network |
117
119
  | `locations[].ref` | String | Location reference |
118
120
  | `locations[].type` | String | e.g., `WAREHOUSE`, `STORE` |
119
121
  | `locations[].address` | Address | Location coordinates |
120
122
  | `locations[].attributes[]` | List | Location custom attributes |
121
- | `inventoryPositions[]` | List | Stock data per location per product |
123
+ | `inventoryPositions[]` | List | **InventoryPosition** records — raw on-hand stock per location per product |
124
+
125
+ > **IMPORTANT — InventoryPosition vs VirtualPosition:** The SourcingContext uses **InventoryPosition** (raw on-hand stock from the InventoryCatalogue), NOT **VirtualPosition** (available-to-sell after ControlGroup buffers/exclusions are applied). This distinction is critical:
126
+ >
127
+ > | Entity | What it holds | Used by sourcing? |
128
+ > |--------|--------------|-------------------|
129
+ > | **InventoryPosition** | Raw on-hand quantity at a location for a product | **Yes** — loaded into SourcingContext |
130
+ > | **VirtualPosition** | ATS quantity after ControlGroup buffers applied | **No** — used by storefront availability, not sourcing |
131
+ > | **ControlGroup / Control** | Buffer/exclusion rules that adjust ATS | **No** — affects VirtualPosition only, not sourcing decisions |
132
+ >
133
+ > When `inventoryAvailabilityExclusion` and `inventoryAvailability` criteria check stock, they check **InventoryPosition.onHand**, not VirtualPosition.quantity. See `knowledge/platform/domain-model.md` for full entity definitions and GraphQL edges.
122
134
 
123
135
  Conditions use JSON path expressions to navigate this model. For example, `fulfilmentChoice.type` extracts the delivery type, `order.attributes[?(@.name=='priority')].value` extracts a custom attribute.
124
136
 
@@ -134,7 +146,7 @@ A Sourcing Profile is configured as a GraphQL entity and loaded at runtime by th
134
146
  "status": "ACTIVE",
135
147
  "retailerId": 1,
136
148
  "catalogueRef": "DEFAULT:1",
137
- "virtualCatalogueRef": "FC:DEFAULT:1",
149
+ "virtualCatalogueRef": "VC_DEFAULT:1",
138
150
  "networkRef": "HD_NETWORK",
139
151
  "maxSplit": 2,
140
152
  "sourcingStrategies": [
@@ -157,8 +169,8 @@ A Sourcing Profile is configured as a GraphQL entity and loaded at runtime by th
157
169
  | `ref` | Yes | Unique identifier for the profile |
158
170
  | `status` | Yes | `DRAFT`, `ACTIVE`, or `INACTIVE` |
159
171
  | `retailerId` | Yes | Owning retailer ID |
160
- | `catalogueRef` | No | Product catalogue for inventory lookup |
161
- | `virtualCatalogueRef` | No | Virtual catalogue (overrides catalogueRef) |
172
+ | `catalogueRef` | No | InventoryCatalogue ref for InventoryPosition lookup |
173
+ | `virtualCatalogueRef` | No | VirtualCatalogue ref — **overrides `catalogueRef`** when both are set. Uses ref-based linking (not id-based edges). |
162
174
  | `networkRef` | No | Default network for location candidates |
163
175
  | `maxSplit` | No | Maximum number of fulfilment locations (default: 1) |
164
176
  | `sourcingStrategies` | Yes | Ordered list of strategies |
@@ -405,16 +417,16 @@ Criteria are classified by tag:
405
417
  | `fc.sourcing.criterion.locationDistanceExclusion` | Exclusion | Exclude locations beyond a distance threshold | `value` (max distance), `valueUnit` (`KILOMETRES` or `MILES`) |
406
418
  | `fc.sourcing.criterion.locationTypeExclusion` | Exclusion | Exclude locations of specified types | `value` (list of type strings, e.g., `["STORE"]`) |
407
419
  | `fc.sourcing.criterion.locationNetworkExclusion` | Exclusion | Exclude locations not in the specified network | `value` (network ref string) |
408
- | `fc.sourcing.criterion.inventoryAvailabilityExclusion` | Exclusion | Exclude locations with insufficient stock for all order items | *(none)* |
420
+ | `fc.sourcing.criterion.inventoryAvailabilityExclusion` | Exclusion | Exclude locations with insufficient on-hand stock (InventoryPosition) for all order items | *(none)* |
409
421
  | `fc.sourcing.criterion.locationDistance` | Sorter | Score by distance from delivery address (closest = highest score) | *(none)* |
410
422
  | `fc.sourcing.criterion.locationDistanceBanded` | Sorter | Score by distance using configurable bands | `bands` (list of `{from, to, score}`) |
411
423
  | `fc.sourcing.criterion.locationDailyCapacity` | Sorter | Score by remaining daily fulfilment capacity | *(none)* |
412
424
  | `fc.sourcing.criterion.networkPriority` | Sorter | Score by the location's network priority field | *(none)* |
413
- | `fc.sourcing.criterion.inventoryAvailability` | Sorter | Score by stock quantity (more stock = higher score) | *(none)* |
425
+ | `fc.sourcing.criterion.inventoryAvailability` | Sorter | Score by on-hand stock quantity from InventoryPosition (more stock = higher score) | *(none)* |
414
426
  | `fc.sourcing.criterion.inventoryAvailabilityBanded` | Sorter | Score by stock quantity using configurable bands | `bands` (list of `{from, to, score}`) |
415
427
  | `fc.sourcing.criterion.orderValue` | Sorter | Score by order value handling capability | *(none)* |
416
428
 
417
- > **Note on Parameter Names:** In `util-sourcing-2.1.0`, the JSON parsing logic uses generic keys like `"value"` and `"valueUnit"` (via `params.get("value")`). Newer versions may use descriptive names like `maxDistance`, `distanceUnit`, `excludedTypes`. Always check your specific version.
429
+ > **Note on Parameter Names:** In `util-sourcing-2.1.0`, the JSON parsing logic uses generic keys like `"value"` and `"valueUnit"` (via `params.get("value")`). Newer versions may use descriptive names like `maxDistance`, `distanceUnit`, `excludedTypes`. To discover parameter names for your version, use `/fluent-trace` to inspect a sourcing event's rule execution, or decompile the util-sourcing JAR deployed in your environment.
418
430
 
419
431
  ### Scoring and Normalization
420
432
 
@@ -907,7 +919,10 @@ compact: false
907
919
 
908
920
  Review the flow inspection output for condition evaluation results.
909
921
 
910
- **3. Verify inventory data exists for candidate locations:**
922
+ **3. Verify InventoryPosition data exists for candidate locations:**
923
+
924
+ Sourcing reads **InventoryPosition** (raw on-hand), not VirtualPosition (ATS). If locations are excluded for insufficient stock, verify InventoryPosition records exist:
925
+
911
926
  ```
912
927
  Tool: graphql_query
913
928
  Query: {
@@ -915,12 +930,22 @@ Query: {
915
930
  catalogue: { ref: "DEFAULT:1" }
916
931
  productRef: "<PRODUCT_REF>"
917
932
  ) {
918
- edges { node { locationRef quantity status } }
933
+ edges { node { ref locationRef onHand quantity status } }
919
934
  }
920
935
  }
921
936
  ```
922
937
 
923
- **4. Check settings for custom type registration:**
938
+ If InventoryPosition exists but sourcing still excludes the location, the `onHand` value may be below the requested quantity. Do NOT check VirtualPosition for sourcing issues — VirtualPosition reflects ATS after ControlGroup buffers, which sourcing does not use.
939
+
940
+ **4. Verify catalogueRef vs virtualCatalogueRef precedence:**
941
+
942
+ If both are set on the profile, `virtualCatalogueRef` overrides `catalogueRef`. Verify which is active:
943
+ ```
944
+ Tool: graphql_query
945
+ Query: { sourcingProfile(ref: "<PROFILE_REF>") { catalogueRef virtualCatalogueRef } }
946
+ ```
947
+
948
+ **5. Check settings for custom type registration:**
924
949
  ```
925
950
  Tool: graphql_query
926
951
  Query: {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-system-monitoring
3
- description: Monitor Fluent Commerce event processing health using Prometheus queries and aggregated analytics. Detect failure rate anomalies, triage alert patterns, interpret event volume trends, and identify workflow gaps through deep metric analysis. Specialized in **anomaly detection and alert triage** NOT for infrastructure monitoring or generic metrics queries. Triggers on "system monitoring", "event analytics", "failure rate anomaly", "event volume trend", "top failing events", "alert triage", "prometheus queries", "latency analysis", "throughput spike", "no-match rate".
3
+ description: Monitor Fluent Commerce event processing health using Prometheus queries and aggregated analytics for anomaly detection and alert triage. Use for failure rate analysis, event volume trends, or workflow gap identification.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--from <ISO-datetime>] [--entity-type ORDER|FULFILMENT] [--top-n 20]
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-test-data
3
- description: Discover retailer configuration and generate valid test entity PAYLOADS dynamically via GraphQL. No hardcoded refs — everything is queried from the live environment. Does NOT own event sending — for sending events use /fluent-mcp-tools (event_build + event_send). This skill generates payloads; MCP tools dispatch them. Triggers on "create test order", "test data", "create test entity", "discover products", "discover locations".
3
+ description: Discover retailer configuration and generate valid test entity payloads dynamically via GraphQL with no hardcoded refs. Use for creating test data, discovering products or locations, or generating test entity payloads.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [entity-type] [--type HD|CC|SFS] [--count N]
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: fluent-trace
3
- description: "FIRST-RESPONDER debugging skill if ANY entity is stuck, broken, or not progressing, route HERE first. Traces and debugs Fluent Commerce event processing. Analyzes failed events, correlates them with workflows and rules, and identifies runtime root causes. ROUTING PRIORITY — this skill MUST win over fluent-entity-flow-diagnose when the prompt says \"stuck\", \"trace why\", \"root cause\", \"not progressing\", \"debug\", \"correlate events with rules\", \"identify root cause\", \"show live state\" WITHOUT comparison language like \"expected vs observed\" or \"compare runtime\". YIELD-BACK — if the prompt ALSO contains \"compare runtime vs expected\", \"compare runtime vs workflow\", \"expected vs observed\", or \"what should have happened\", route to fluent-entity-flow-diagnose instead, even if it also says \"stuck\" or \"diagnose\". Those comparison prompts need full lifecycle reconstruction, not just first-responder debugging. HARD NEGATIVE — do NOT route here for conceptual Event API reference questions like event categories, event statuses, how events are routed to rulesets, run-once behavior, or log action vs audit action when there is no specific entity, failure, or debugging context; those belong to fluent-event-api. Key knowledge — domain-model.md (entity relationships and event flows), sync-vs-async-patterns.md (execution flow), workflow-json-structure.md (status transitions). ROUTING PRIORITY — This skill MUST win over fluent-entity-flow-diagnose when the prompt says \"trace why X is stuck\", \"correlate events with rules\", \"identify root cause\", \"show live state\" WITHOUT comparison language like \"expected vs observed\" or \"compare runtime\". Triggers on \"trace event\", \"event trace\", \"trace why\", \"why did event fail\", \"failed orchestration\", \"debug fulfilment\", \"stuck at [status]\", \"not progressing\", \"not moving\", \"event didn't fire\", \"why is this order stuck\", \"why is this fulfilment stuck\", \"why is this consignment stuck\", \"what happened to order\", \"what happened to fulfilment\", \"order not advancing\", \"entity not changing state\", \"root cause\", \"likely root cause\", \"live state\", \"correlate events with rules\".
3
+ description: First-responder debugging skill that traces and debugs Fluent Commerce event processing by analyzing failed events, correlating with workflows/rules, and identifying root causes. Use when any entity is stuck, broken, or not progressing.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <entity-ref> [--entity-type ORDER|FULFILMENT] [--status FAILED]
7
7
  cursor-tier: manual
8
8
  ---
9
+ <!-- routing-notes: ROUTING PRIORITY — this skill MUST win over fluent-entity-flow-diagnose when the prompt says "stuck", "trace why", "root cause", "not progressing", "debug" WITHOUT comparison language like "expected vs observed" or "compare runtime". YIELD-BACK — if the prompt ALSO contains "compare runtime vs expected", "expected vs observed", or "what should have happened", route to fluent-entity-flow-diagnose instead. HARD NEGATIVE — do NOT route here for conceptual Event API reference questions (event categories, statuses, run-once, log action vs audit action without a specific entity) — those belong to fluent-event-api. -->
9
10
 
10
11
  # Event Trace & Debug
11
12
 
@@ -448,7 +449,7 @@ When the user asks questions like:
448
449
  Use the bundled local analyzer after raw capture:
449
450
 
450
451
  ```text
451
- node scripts/analyze-event-capture.mjs \
452
+ node fluent-ai-skills/tools/event-capture-analyzer.mjs \
452
453
  accounts/<PROFILE>/analysis/event-captures/<EVENT_ID>.event.json \
453
454
  accounts/<PROFILE>/analysis/event-captures/<EVENT_ID>.window.json \
454
455
  --root-ref <ORDER_REF> \
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: fluent-transition-api
3
- description: Query the Fluent Commerce Transition API to discover available user actions for entities at any workflow status. This is read-only action discovery ONLY — it does NOT send events. YIELD-BACK — if the prompt says "send" + event name (e.g., "send a ConfirmShipment event"), "dispatch event", "verify it landed", or "send and verify", route to fluent-mcp-tools instead. This skill discovers what actions EXIST; fluent-mcp-tools SENDS the events. ROUTING PRIORITY for prompts like "what user actions are available at BOOKED?", "which actions/buttons should appear for ORDER::HD?", or "what attributes does each action need?" — those belong here, not in fluent-workflow-analyzer. Key knowledge — user-action-contract.md (workflow user action shape), workflow-design.md (status and action placement), permissions-and-contexts.md (module and visibility context). Enables dynamic test sequences and UI action validation. Triggers on "transition api", "user actions", "available actions", "workflow transitions", "what actions", "what attributes each action needs".
3
+ description: Query the Fluent Commerce Transition API to discover available user actions for entities at any workflow status. Read-only action discovery. Use for listing available actions, mapping required attributes, or UI action validation.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <entity-type> <subtype> <status> [--retailer-id <id>]
7
7
  cursor-tier: auto
8
8
  ---
9
+ <!-- routing-notes: YIELD-BACK — if the prompt says "send" + event name, "dispatch event", "verify it landed", or "send and verify", route to fluent-mcp-tools instead. This skill discovers what actions EXIST; fluent-mcp-tools SENDS the events. ROUTING PRIORITY for prompts like "what user actions are available at BOOKED?" or "what attributes does each action need?" — those belong here, not in fluent-workflow-analyzer. -->
9
10
 
10
11
  # Transition API — User Action Discovery
11
12
 
@@ -397,7 +398,7 @@ event_send({
397
398
  "retailerId": "2",
398
399
  "attributes": {
399
400
  "trackingNumber": "TRACK-001",
400
- "carrierRef": "DHL"
401
+ "carrierRef": "CARRIER_FAST"
401
402
  }
402
403
  })
403
404
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-ui-record
3
- description: "Record annotated UI walkthroughs of Fluent Commerce apps. Captures before/after screenshots with DOM annotations, Chrome DevTools screencast recording, manifest diffs, and generates self-contained HTML evidence reports. Triggers on \"record UI\", \"record walkthrough\", \"capture UI changes\", \"document UI\", \"UI recording\", \"before after\", \"evidence report\", \"annotated recording\"."
3
+ description: Record annotated UI walkthroughs of Fluent Commerce apps with before/after screenshots, DOM annotations, screencast recording, and HTML evidence reports. Use for capturing UI changes or documenting walkthroughs.
4
4
  user-invocable: true
5
5
  read-only: false
6
6
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-ui-test
3
- description: Browser-based UI testing for Fluent Commerce OMS App and Store App using Chrome DevTools MCP. Verifies manifest deployments render correctly, pages load, components display data, and user actions are functional. Triggers on "test UI", "verify manifest in browser", "browser test", "OMS test", "devtools test", "does the page work", "check OMS", "verify page renders".
3
+ description: Browser-based UI testing for Fluent Commerce OMS and Store apps using Chrome DevTools MCP to verify page rendering, component display, and user action functionality. Use for UI testing or manifest deployment verification.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--app oms|store|servicepoint] [--route /orders] [--entity-id <id>] [--screenshot] [--login]
@@ -300,17 +300,18 @@ Where:
300
300
  - `<env>` — `test`, `sandbox`, `staging`, or `prod` (omitted for prod)
301
301
  - `<app>` — `oms`, `store`, or `servicepoint`
302
302
 
303
- ### Store App Location Pre-Selection
303
+ ### Context Pre-Selection (Store + OMS)
304
304
 
305
- The Store app operates at `context.level: "location"`. To test a specific store location, append `?user.location.ref=<LOCATION_REF>` **after the hash path**:
305
+ Both apps support pre-selecting a context via URL parameter **appended after the hash path**:
306
306
 
307
- ```
308
- https://<account>.<env>.apps.fluentcommerce.com/store/#/waves?user.location.ref=LOC_SYD_001
309
- ```
307
+ | App | Context Level | URL Parameter | Example |
308
+ |---|---|---|---|
309
+ | **Store** | `location` | `user.location.ref` | `store/#/waves?user.location.ref=LOC_SYD_001` |
310
+ | **OMS** | `retailer` | `user.retailer.ref` | `oms/#/orders?user.retailer.ref=RETAILER_AU` |
310
311
 
311
- Location context resolution order: (1) `user.location.ref` URL param, (2) `localStorage["mystique.auth.context.location"]` (persisted ID from previous selection), (3) first accessible location. The URL param is consumed on load and stripped — localStorage persists across sessions.
312
+ Context resolution order: (1) URL param (consumed on load, then stripped), (2) `localStorage["mystique.auth.context.<type>"]` (persisted ID from previous selection), (3) first accessible context. localStorage persists across sessions.
312
313
 
313
- If the test user lacks AGENT-context permission for that location, the system falls back to the next priority. See `knowledge/platform/mystique-routing.md` §"Store App — Default Location via URL Parameter" for full details.
314
+ If the test user lacks the required role context (AGENT for locations, RETAILER for retailers), the system falls back to the next priority. See `knowledge/platform/mystique-routing.md` §"Context Switching" for full details.
314
315
 
315
316
  ## Protocol Phases
316
317
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-use-case-discover
3
- description: Interactive requirements gathering wizard that produces a structured Business Specification. Walks through use cases, actors, business rules, integrations, and acceptance criteria. Supports interactive mode, document analysis mode, and structured PRD template intake. Triggers on "discover use case", "gather requirements", "business spec", "use case discovery", "what are we building", "requirements gathering", "spec wizard", "analyze requirements", "prd intake", "fill prd".
3
+ description: Interactive requirements gathering wizard that produces a structured Business Specification covering use cases, actors, business rules, integrations, and acceptance criteria. Use for requirements gathering, use case discovery, or PRD intake.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [--analyze <path-or-paste>] [--prd <path>] [--profile PROFILE] [--retailer RETAILER_REF]
@@ -322,7 +322,7 @@ UC-04: [Edge Case] <title> — <one-line summary>
322
322
 
323
323
  **Rules:**
324
324
  - One diagram per primary use case (UC-01) at minimum. Add diagrams for alternative/exception paths only if the flow is materially different (not just a different error message).
325
- - Keep diagrams HIGH-LEVEL — 5-10 interactions max. Implementation detail (GraphQL fields, attribute names, CSS) belongs in the plan, not the spec.
325
+ - Keep diagrams HIGH-LEVEL — 5-10 interactions max. Prefer business language (e.g., "Trigger StartPick event") over API detail (e.g., `POST /event/sync`). Detailed GraphQL fields, attribute names, and CSS belong in the plan, not the spec.
326
326
  - Use Mermaid syntax — validated by `knowledge/mermaid-syntax-rules.md`.
327
327
  - Diagrams go in spec §5a (after use cases, before entity model).
328
328
 
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: fluent-workflow-analyzer
3
- description: Validate and analyze Fluent Commerce workflow JSON definitions. Structural validation (schema, status graph, triggers, rules, user actions, cross-entity checks), status graph mapping, event chain tracing, orphan detection, dependency reports, and Mermaid diagrams. ROUTING PRIORITY if the user wants to validate, check, review, lint, or sanity-check a workflow before editing or deployment, route HERE even when the prompt also says "download workflow" or "download it first". Download-plus-validate requests are still validation-led, so prefer this skill over fluent-workflow. Triggers on "analyze workflow", "validate workflow", "check workflow", "lint workflow", "workflow analysis", "workflow graph", "workflow dependencies", "workflow review", "workflow issues", "workflow health", "download and validate workflow", "download workflow and check it".
3
+ description: Validate and analyze Fluent Commerce workflow JSON definitions with structural checks, status graph mapping, event chain tracing, and orphan detection. Use for workflow validation, review, lint, or dependency analysis.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: <workflow-file-or-name> [--validate-only] [--strict] [--fix-suggestions] [--deep] [--mermaid] [--explain-rules] [--profile <name>] [--output <path>]
7
7
  cursor-tier: manual
8
8
  ---
9
+ <!-- routing-notes: ROUTING PRIORITY — if the user wants to validate, check, review, lint, or sanity-check a workflow, route HERE even when the prompt also says "download workflow". Download-plus-validate requests are validation-led, so prefer this skill over fluent-workflow. -->
9
10
 
10
11
  # Workflow Analyzer
11
12
 
@@ -153,7 +154,7 @@ WorkflowDefinition
153
154
  |----|-------|----------|--------|
154
155
  | G01 | All statuses have `name` | CRITICAL | Every entry in `statuses[]` must have a non-empty `name` string. |
155
156
  | G02 | All statuses have `category` | HIGH | Every status should have a `category` from the standard set. Missing category = wrong UI badge rendering. |
156
- | G03 | Category values are valid | MEDIUM | Category must be one of: `BOOKING`, `FULFILMENT`, `DELIVERY`, `DONE`, `EXCEPTION`. |
157
+ | G03 | Category values are valid | MEDIUM | Category must be one of: `BOOKING`, `FULFILMENT`, `DELIVERY`, `DONE`, `EXCEPTION`, `GENERATION` (FO/FP workflows only). |
157
158
  | G04 | No duplicate status names | HIGH | Two statuses with the same `name` (within the same entity type) cause undefined behavior. |
158
159
  | G05 | Orphaned statuses | HIGH | A status defined in `statuses[]` but never referenced in any ruleset trigger or as a SetState destination is unreachable dead config. |
159
160
  | G06 | Unreachable statuses | HIGH | If a status cannot be reached from the initial status (CREATED or first defined), it is unreachable. |