@fluentcommerce/ai-skills 0.14.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 (77) hide show
  1. package/README.md +3 -0
  2. package/bin/cli.mjs +198 -49
  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 +1 -1
  8. package/content/cli/skills/fluent-workflow/SKILL.md +2 -1
  9. package/content/dev/agents/fluent-frontend-dev.md +1 -1
  10. package/content/dev/skills/fluent-account-snapshot/SKILL.md +1 -1
  11. package/content/dev/skills/fluent-archive/SKILL.md +2 -1
  12. package/content/dev/skills/fluent-build/SKILL.md +2 -2
  13. package/content/dev/skills/fluent-connection-analysis/SKILL.md +2 -1
  14. package/content/dev/skills/fluent-custom-code/SKILL.md +2 -1
  15. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +2 -1
  16. package/content/dev/skills/fluent-e2e-test/SKILL.md +1 -1
  17. package/content/dev/skills/fluent-entity-flow-diagnose/SKILL.md +2 -1
  18. package/content/dev/skills/fluent-event-api/SKILL.md +2 -1
  19. package/content/dev/skills/fluent-feature-explain/SKILL.md +2 -1
  20. package/content/dev/skills/fluent-feature-plan/SKILL.md +2 -1
  21. package/content/dev/skills/fluent-feature-status/SKILL.md +1 -1
  22. package/content/dev/skills/fluent-frontend-build/SKILL.md +1 -1
  23. package/content/dev/skills/fluent-frontend-readme/SKILL.md +2 -1
  24. package/content/dev/skills/fluent-frontend-review/SKILL.md +2 -1
  25. package/content/dev/skills/fluent-goal/SKILL.md +1 -1
  26. package/content/dev/skills/fluent-implementation-map/SKILL.md +1 -1
  27. package/content/dev/skills/fluent-inventory-catalog/SKILL.md +2 -2
  28. package/content/dev/skills/fluent-job-batch/SKILL.md +6 -3
  29. package/content/dev/skills/fluent-knowledge-init/SKILL.md +1 -1
  30. package/content/dev/skills/fluent-module-convert/SKILL.md +1 -1
  31. package/content/dev/skills/fluent-module-scaffold/SKILL.md +2 -1
  32. package/content/dev/skills/fluent-module-validate/SKILL.md +2 -1
  33. package/content/dev/skills/fluent-mystique-assess/SKILL.md +22 -6
  34. package/content/dev/skills/fluent-mystique-builder/SKILL.md +32 -1
  35. package/content/dev/skills/fluent-mystique-component/SKILL.md +1 -1
  36. package/content/dev/skills/fluent-mystique-diff/SKILL.md +1 -1
  37. package/content/dev/skills/fluent-mystique-preview/SKILL.md +19 -2
  38. package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +12 -1
  39. package/content/dev/skills/fluent-mystique-sdk-reference/SKILL.md +2 -1
  40. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +3 -3
  41. package/content/dev/skills/fluent-retailer-config/SKILL.md +1 -1
  42. package/content/dev/skills/fluent-rollback/SKILL.md +1 -1
  43. package/content/dev/skills/fluent-rule-lookup/SKILL.md +2 -1
  44. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +7 -6
  45. package/content/dev/skills/fluent-rule-test/SKILL.md +2 -1
  46. package/content/dev/skills/fluent-scope-plan/SKILL.md +1 -1
  47. package/content/dev/skills/fluent-session/SKILL.md +1 -1
  48. package/content/dev/skills/fluent-settings/SKILL.md +2 -2
  49. package/content/dev/skills/fluent-skill-observability/SKILL.md +1 -1
  50. package/content/dev/skills/fluent-sourcing/SKILL.md +38 -13
  51. package/content/dev/skills/fluent-system-monitoring/SKILL.md +1 -1
  52. package/content/dev/skills/fluent-test-data/SKILL.md +1 -1
  53. package/content/dev/skills/fluent-trace/SKILL.md +3 -2
  54. package/content/dev/skills/fluent-transition-api/SKILL.md +2 -1
  55. package/content/dev/skills/fluent-ui-record/SKILL.md +1 -1
  56. package/content/dev/skills/fluent-ui-test/SKILL.md +1 -1
  57. package/content/dev/skills/fluent-use-case-discover/SKILL.md +2 -2
  58. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +3 -2
  59. package/content/dev/skills/fluent-workspace-tree/SKILL.md +2 -1
  60. package/content/knowledge/platform/domain-model.md +1 -0
  61. package/content/knowledge/platform/workflow-json-structure.md +1 -1
  62. package/content/mcp-extn/skills/fluent-mcp-core/SKILL.md +2 -1
  63. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +3 -2
  64. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +1 -1
  65. package/docs/02-prompt-guide.md +1 -1
  66. package/docs/03-use-cases.md +15 -13
  67. package/docs/04-onboarding-plan.md +1 -1
  68. package/docs/chrome-devtools-mcp-reference.md +34 -33
  69. package/docs/fluent-ai-skills-reference.md +10 -10
  70. package/metadata.json +1 -1
  71. package/package.json +6 -1
  72. package/scripts/postinstall.mjs +38 -0
  73. package/{content/dev/skills/fluent-trace/scripts/analyze-event-capture.mjs → tools/event-capture-analyzer.mjs} +3 -3
  74. package/tools/{generate-feature-dashboard.mjs → feature-dashboard.mjs} +2 -2
  75. package/tools/manifest-diff.mjs +1 -1
  76. package/{content/dev/skills/fluent-mystique-assess/validator.mjs → tools/manifest-validator.mjs} +2 -2
  77. package/tools/workflow-explainer.mjs +1021 -0
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-frontend-readme
3
- description: "README.md GENERATOR for SDK projects reads actual TypeScript/React source code and writes a README.md file with component registrations, build instructions, settings dependencies, and deployment guide. This skill writes documentation files, NOT manifest analysis. Does NOT audit code quality (→ fluent-frontend-review), does NOT analyze manifest JSON health (→ fluent-mystique-assess). ROUTING — This generates README.md documentation for SDK component projects. It does NOT analyze manifest complexity (use fluent-mystique-assess). Triggers on 'generate readme', 'document components', 'SDK readme', 'component documentation'. ROUTING PRIORITY — if the prompt says \"generate README\", \"write readme\", \"document component registrations\", \"SDK readme\", \"README for SDK project\", \"create documentation\", \"build instructions\", \"settings dependencies\", or \"document registrations\", route HERE — do NOT route to fluent-mystique-assess. fluent-mystique-assess reads manifest JSON for complexity scoring; this skill reads .ts/.tsx source files and writes a README.md. Triggers on \"generate readme\", \"document component\", \"frontend readme\", \"sdk readme\", \"component docs\", \"write readme\", \"create documentation\", \"README for SDK project\", \"document registrations\", \"README.md\", \"build instructions\", \"settings dependencies\", \"generate README.md for SDK project\". ROUTING PRIORITY for frontend documentation — route here instead of fluent-mystique-assess when prompt asks about generating README, docs, or documentation for a Mystique/frontend project."
3
+ description: README.md generator for SDK projects that reads TypeScript/React source code and writes documentation with component registrations, build instructions, and deployment guide. Use for generating frontend project README or SDK documentation.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [project-path]
7
7
  cursor-tier: auto
8
8
  planning-gate: none
9
9
  ---
10
+ <!-- routing-notes: ROUTING PRIORITY — if the prompt says "generate README", "write readme", "SDK readme", or "README for SDK project", route HERE — do NOT route to fluent-mystique-assess. fluent-mystique-assess reads manifest JSON for complexity scoring; this skill reads .ts/.tsx source files and writes a README.md. Does NOT audit code quality (→ fluent-frontend-review), does NOT analyze manifest JSON health (→ fluent-mystique-assess). -->
10
11
 
11
12
  # Frontend README Generator
12
13
 
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-frontend-review
3
- description: "SDK SOURCE CODE quality audit reviews TypeScript/React .ts/.tsx files for strictness, React anti-patterns, SDK compliance, GraphQL schemas, test quality, and bundle size. Frontend equivalent of /fluent-custom-code. Audits SDK project source files (.ts, .tsx, package.json, webpack config) — does NOT analyze manifest JSON health (→ fluent-mystique-assess) and does NOT validate manifest schema (→ fluent-mystique-assess). ROUTING — This runs code quality review: TypeScript quality, React patterns, SDK compliance, test coverage audit. It does NOT validate manifest JSON schema (use fluent-mystique-assess). Triggers on 'code review', 'quality audit', 'review SDK code', 'frontend code patterns'. ROUTING PRIORITY — if the prompt says \"review frontend\", \"code quality audit\", \"frontend review\", \"TypeScript strictness\", \"React anti-patterns\", \"React patterns\", \"SDK compliance\", \"review source code\", \"audit SDK project\", or \"bundle size\", route HERE — do NOT route to fluent-mystique-assess. fluent-mystique-assess checks manifest JSON schema; this skill audits .ts/.tsx source files for code quality. Triggers on \"review frontend\", \"code quality\", \"frontend review\", \"review component\", \"audit sdk\", \"check quality\", \"TypeScript strictness\", \"React anti-patterns\", \"React patterns\", \"SDK compliance\", \"review source code\", \"bundle size\", \"code review\", \"quality audit\", \"review SDK code\", \"frontend code patterns\". ROUTING PRIORITY for source code quality — route here instead of fluent-mystique-assess when prompt asks about TypeScript/React code quality, code review, or source file auditing."
3
+ description: SDK source code quality audit for TypeScript/React files covering strictness, React anti-patterns, SDK compliance, GraphQL schemas, test quality, and bundle size. Use for frontend code review or SDK project audits.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: [project-path]
7
7
  cursor-tier: manual
8
8
  planning-gate: none
9
9
  ---
10
+ <!-- routing-notes: ROUTING PRIORITY — if the prompt says "review frontend", "code quality audit", "frontend review", "TypeScript strictness", "React anti-patterns", "SDK compliance", "review source code", or "bundle size", route HERE — do NOT route to fluent-mystique-assess. fluent-mystique-assess checks manifest JSON schema; this skill audits .ts/.tsx source files for code quality. Does NOT analyze manifest JSON health (→ fluent-mystique-assess). -->
10
11
 
11
12
  # Frontend Code Review
12
13
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-goal
3
- description: "Goal-directed autonomous orchestrator. Takes any Fluent Commerce goal, decomposes into verifiable sub-goals, delegates to existing skills, verifies outcomes via MCP, self-critiques, adjusts approach, and persists until the goal is met or genuinely blocked. Triggers on 'make it work', 'keep going until', 'get this working', 'resolve end to end', 'fix until done', 'goal:', 'achieve', 'pursue goal'."
3
+ description: Goal-directed autonomous orchestrator that decomposes any Fluent Commerce goal into verifiable sub-goals, delegates to skills, and verifies outcomes via MCP. Use when pursuing an end-to-end goal autonomously.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: "<goal in plain English>" [--autonomy guided|gated|autonomous] [--max-attempts 3] [--entity-ref <ref>]
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-implementation-map
3
- description: Reverse-engineer an entire Fluent Commerce implementation into a feature inventory with end-to-end flow diagrams, cross-feature dependency maps, customisation scoring, and gap analysis. Triggers on "implementation map", "what's been built", "analyze implementation", "reverse engineer account", "feature inventory", "end to end flows", "map this account", "what exists", "onboard to account".
3
+ description: Reverse-engineer an entire Fluent Commerce implementation into a feature inventory with flow diagrams, dependency maps, and gap analysis. Use for understanding what has been built across an account.
4
4
  user-invocable: true
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
6
  argument-hint: --profile PROFILE --retailer RETAILER [--depth summary|detailed] [--focus ENTITY_TYPE] [--include-ootb] [--create-stubs] [--include-runtime]
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-inventory-catalog
3
- description: "Manage Fluent Commerce virtual inventory: catalogues, VirtualPositions, VirtualSegments, inventory feeds, and control groups. Schema-gated only runs when VirtualSegment type exists. Triggers on \"inventory catalog\", \"virtual position\", \"virtual segment\", \"inventory feed\", \"control group\", \"catalogue structure\", \"virtual inventory\". ROUTING — This handles virtual inventory structure queries and management. It does NOT handle account-wide snapshots (use fluent-account-snapshot) or sourcing configuration (use fluent-sourcing)."
3
+ description: Manage Fluent Commerce virtual inventory including catalogues, VirtualPositions, VirtualSegments, inventory feeds, and control groups. Schema-gated and only runs when VirtualSegment type exists.
4
4
  user-invocable: true
5
5
  trigger-patterns:
6
6
  - "inventory catalog"
@@ -38,7 +38,7 @@ graphql_introspect({ type: "VirtualSegment" })
38
38
  - **If `VirtualSegment` type exists:** proceed.
39
39
  - **If NOT found:** STOP immediately with this message:
40
40
 
41
- > Virtual Segments not available on this account's schema version. This feature requires platform version with segment support (expected April 2026+). Run `graphql_introspect` with `type: 'VirtualSegment'` to check availability.
41
+ > Virtual Segments not available on this account's schema version. Run `graphql_introspect` with `type: 'VirtualSegment'` to check if your platform version supports segments.
42
42
 
43
43
  Do NOT fall back to non-segment inventory operations. The entire skill is gated on segment support.
44
44
 
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-job-batch
3
- description: Diagnose and monitor JOB and BATCH orchestration entities in Fluent Commerce. The dedicated skill for JOB/BATCH workflow status tracking, stuck-job investigation, batch failure triage, and job performance monitoring. Any prompt mentioning JOB or BATCH entity types routes here — not to fluent-entity-flow-diagnose or fluent-trace. Distinct from batch data ingestion API (which is fluent-mcp-tools). ROUTING PRIORITY — Any prompt mentioning "JOB" or "BATCH" entity types MUST route here, even if the prompt also says "stuck" or "diagnose". JOB/BATCH are specialized orchestration entities with unique lifecycle patterns — fluent-entity-flow-diagnose and fluent-trace do NOT understand JOB/BATCH semantics. Triggers on "job batch", "job stuck", "batch stuck", "job lifecycle", "job status", "batch monitoring", "batch operations", "job entity", "JOB/BATCH", "why is the job stuck", "batch failure", "JOB entity is stuck", "job not progressing", "batch not progressing", "job orchestration".
3
+ description: Diagnose and monitor JOB and BATCH orchestration entities in Fluent Commerce including lifecycle tracking, stuck-job investigation, and batch failure triage. Use for any JOB or BATCH entity questions or debugging.
4
4
  user-invocable: true
5
5
  read-only: true
6
6
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep
7
7
  argument-hint: [--job-id <id>] [--batch-id <id>] [--status ACTIVE|COMPLETED|FAILED]
8
8
  cursor-tier: auto
9
9
  ---
10
+ <!-- routing-notes: ROUTING PRIORITY — Any prompt mentioning "JOB" or "BATCH" entity types MUST route here, even if the prompt also says "stuck" or "diagnose". JOB/BATCH are specialized orchestration entities — fluent-entity-flow-diagnose and fluent-trace do NOT understand JOB/BATCH semantics. Distinct from batch data ingestion API (→ fluent-mcp-tools). -->
10
11
 
11
12
  # JOB/BATCH Orchestration Lifecycle
12
13
 
@@ -37,7 +38,9 @@ The batch ingestion API *creates* JOB and BATCH entities. This skill covers what
37
38
 
38
39
  ## JOB Entity Lifecycle
39
40
 
40
- JOB is one of the 10 root entity types that can have orchestration workflows.
41
+ > **Note:** JOB and BATCH lifecycle details below are inferred from runtime API evidence and implementation observation. They are not yet documented in the core platform knowledge base (`domain-model.md`). Validate against your environment's actual workflow definitions.
42
+
43
+ JOB is a root entity type that can have orchestration workflows.
41
44
 
42
45
  ### Status Flow
43
46
  ```
@@ -46,7 +49,7 @@ ACTIVE → FAILED (one or more batches failed)
46
49
  ```
47
50
 
48
51
  ### Key Behaviors
49
- - **Auto-close:** JOB entities automatically close at midnight UTC
52
+ - **Auto-close:** JOB entities automatically close at midnight UTC (observed behavior — verify via workflow definition in your environment)
50
53
  - **Workflow type:** `JOB::<subtype>` (subtype varies by implementation)
51
54
  - **Root entity:** JOB is always its own root entity in event context
52
55
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-knowledge-init
3
- description: "Interactive wizard to set up project knowledge. Asks plain-English questions, ingests existing docs, or captures progressive learnings then writes structured knowledge files. Triggers on \"knowledge init\", \"set up knowledge\", \"project knowledge\", \"teach me about your project\", \"knowledge setup\", \"onboard knowledge\"."
3
+ description: Interactive wizard to set up project knowledge by asking questions, ingesting existing docs, or capturing progressive learnings into structured knowledge files. Use for knowledge initialization or onboarding.
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-module-convert
3
- description: Convert existing Java source code into a proper Fluent Commerce extension module. Analyzes non-standard code layouts (loose files, decompiled JARs, plugins, different build systems), restructures into Maven multi-module format with module.json, validates the result, and optionally attempts a build. Triggers on "convert to module", "convert plugin to module", "refactor to module", "restructure module", "onboard source", "migrate to fluent module", "import source code", "convert to module format".
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]
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: fluent-module-scaffold
3
- description: Scaffold a new Fluent Commerce extension module WITH Java plugins. Generates Maven project structure, module.json, build scripts, initial rule classes, test skeletons, and .gitignore. If the user says "no Java", "no code", "workflow-only", "JSON-only", or "data-only module", route to /fluent-data-module-scaffold instead — those are data modules, not extension modules. 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). Triggers on "scaffold module", "new module", "create module", "initialize module", "create Java module", "new 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: MODULE INVENTORY AND STRUCTURAL VALIDATION — Discover, classify, and validate Fluent Commerce modules. Inventories all deployed modules (reference vs custom), validates extension module structure, and maps registered rules to their source. Produces cached JSON artifacts with content hashing. ROUTING PRIORITY — if the prompt says "inventory all deployed modules", "classify modules as reference vs custom", "validate extension 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. Triggers on "validate module", "check module structure", "module health", "what modules are deployed", "list modules", "is my module correct", "inventory deployed modules", "classify modules", "reference vs custom".
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
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fluent-mystique-assess
3
- description: Validate and analyze Mystique manifest JSON. Phase 1 validates against the v2.0 schema, lints component configurations, cross-references aliases, data sources, and i18n keys. Phase 2 scores complexity, analyzes component usage patterns, i18n coverage, query efficiency, and architectural health. Produces structured reports and Mermaid diagrams. Do not use this for TypeScript/React source-code review of .ts/.tsx files; that belongs to fluent-frontend-review. Triggers on "validate manifest", "check mystique", "lint manifest", "analyze manifest", "mystique audit", "ui complexity", "manifest analysis", "component usage", "mystique health", "mystique issues".
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/content/dev/skills/fluent-mystique-assess/validator.mjs`. **Always run this first** before manual review.
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/content/dev/skills/fluent-mystique-assess/validator.mjs <manifest.json>
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. Create pages, routes, component trees, data queries, and fragment compositions using the v2.0 schema. HARD NEGATIVE — if the user is asking for a preview, mockup, visual approval, static mock, 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. Triggers on "build manifest", "create mystique page", "add route", "mystique component", "edit manifest", "build ui", "add page to manifest".
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:
@@ -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. Generates component files, registers with the appropriate registry, and wires into the build. Triggers on "add component", "new component", "extend sdk", "add field", "new mystique component".
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. Shows which fragments are customized, which use CDN default, which are account-only, and structural diffs (routes, components, queries, plugins). Classifies OOTB vs custom components. All analysis runs locally to minimize token usage. Triggers on "manifest diff", "compare manifests", "cdn vs custom", "manifest baseline", "what's customized", "component inventory".
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: "Mock, modify, and preview Mystique UI components in the live Fluent Commerce app before building or deploying. Three modes: ADD (inject new), MODIFY (alter existing), REMOVE (preview without). Highlights all changes with color-coded borders and badges. Supports iterative refinement. 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. Triggers on \"preview UI\", \"mock component\", \"preview manifest\", \"how will it look\", \"show me the UI\", \"preview in OMS\", \"preview in store\", \"visual preview\", \"UI mockup\", \"what would it look like if\", \"preview change\", \"modify the page\", \"static mockup\", \"before we build\"."
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/generate-feature-dashboard.mjs`) can detect preview reports and embed the flip widget:
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.
@@ -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).
@@ -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]
@@ -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]
@@ -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>]