@fluentcommerce/ai-skills 0.2.0 → 0.3.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.

Potentially problematic release.


This version of @fluentcommerce/ai-skills might be problematic. Click here for more details.

Files changed (169) hide show
  1. package/README.md +866 -616
  2. package/bin/cli.mjs +2112 -1973
  3. package/content/cli/agents/fluent-cli/agent.json +149 -149
  4. package/content/cli/agents/fluent-cli.md +132 -132
  5. package/content/cli/skills/fluent-bootstrap/SKILL.md +214 -190
  6. package/content/cli/skills/fluent-cli-index/SKILL.md +1 -1
  7. package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +117 -1
  8. package/content/cli/skills/fluent-cli-reference/SKILL.md +1040 -623
  9. package/content/cli/skills/fluent-cli-retailer/SKILL.md +27 -2
  10. package/content/cli/skills/fluent-cli-settings/SKILL.md +21 -1
  11. package/content/cli/skills/fluent-connect/SKILL.md +937 -886
  12. package/content/cli/skills/fluent-module-deploy/SKILL.md +181 -17
  13. package/content/cli/skills/fluent-profile/SKILL.md +73 -0
  14. package/content/cli/skills/fluent-workflow/SKILL.md +360 -310
  15. package/content/dev/agents/fluent-backend-dev/AGENT.md +58 -0
  16. package/content/dev/agents/fluent-backend-dev/agent.json +69 -0
  17. package/content/dev/agents/fluent-backend-dev.md +287 -0
  18. package/content/dev/agents/fluent-dev/AGENT.md +98 -76
  19. package/content/dev/agents/fluent-dev/agent.json +24 -2
  20. package/content/dev/agents/fluent-dev.md +194 -524
  21. package/content/dev/agents/fluent-frontend-dev/AGENT.md +63 -0
  22. package/content/dev/agents/fluent-frontend-dev/agent.json +52 -0
  23. package/content/dev/agents/fluent-frontend-dev.md +323 -0
  24. package/content/dev/skills/fluent-archive/SKILL.md +234 -0
  25. package/content/dev/skills/fluent-build/SKILL.md +312 -170
  26. package/content/dev/skills/fluent-connection-analysis/SKILL.md +422 -386
  27. package/content/dev/skills/fluent-custom-code/SKILL.md +15 -9
  28. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +731 -0
  29. package/content/dev/skills/fluent-e2e-test/SKILL.md +501 -394
  30. package/content/dev/skills/fluent-event-api/SKILL.md +962 -945
  31. package/content/dev/skills/fluent-feature-explain/SKILL.md +680 -603
  32. package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +40 -11
  33. package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -221
  34. package/content/dev/skills/fluent-feature-status/SKILL.md +335 -0
  35. package/content/dev/skills/fluent-feedback/SKILL.md +221 -0
  36. package/content/dev/skills/fluent-implementation-map/SKILL.md +644 -0
  37. package/content/dev/skills/fluent-job-batch/SKILL.md +10 -0
  38. package/content/dev/skills/fluent-module-scaffold/SKILL.md +134 -3
  39. package/content/dev/skills/fluent-module-validate/SKILL.md +778 -775
  40. package/content/dev/skills/fluent-mystique-analyze/SKILL.md +817 -0
  41. package/content/dev/skills/fluent-mystique-builder/COMPONENT_TEMPLATE.md +81 -0
  42. package/content/dev/skills/fluent-mystique-builder/README.md +63 -0
  43. package/content/dev/skills/fluent-mystique-builder/SKILL.md +1294 -0
  44. package/content/dev/skills/fluent-mystique-builder/components/INDEX.md +92 -0
  45. package/content/dev/skills/fluent-mystique-builder/components/fc.accordion.md +48 -0
  46. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.fulfilmentpack.md +20 -0
  47. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.multiparcel.md +21 -0
  48. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.returnitems.md +21 -0
  49. package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.wavepick.md +21 -0
  50. package/content/dev/skills/fluent-mystique-builder/components/fc.action.inline.md +24 -0
  51. package/content/dev/skills/fluent-mystique-builder/components/fc.activity.entity.md +25 -0
  52. package/content/dev/skills/fluent-mystique-builder/components/fc.analytics.viz.md +20 -0
  53. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.column.md +111 -0
  54. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.json.md +20 -0
  55. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.jsoneditor.md +54 -0
  56. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.locationId.md +51 -0
  57. package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.retailerId.md +52 -0
  58. package/content/dev/skills/fluent-mystique-builder/components/fc.button.bar.md +57 -0
  59. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.download.md +53 -0
  60. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.compatibility.md +60 -0
  61. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.md +53 -0
  62. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.md +24 -0
  63. package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.pick.md +61 -0
  64. package/content/dev/skills/fluent-mystique-builder/components/fc.buttons.add.reject.md +20 -0
  65. package/content/dev/skills/fluent-mystique-builder/components/fc.card.attribute.md +73 -0
  66. package/content/dev/skills/fluent-mystique-builder/components/fc.card.attributes.grid.md +40 -0
  67. package/content/dev/skills/fluent-mystique-builder/components/fc.card.image.md +37 -0
  68. package/content/dev/skills/fluent-mystique-builder/components/fc.card.map.point.md +24 -0
  69. package/content/dev/skills/fluent-mystique-builder/components/fc.card.multi.md +79 -0
  70. package/content/dev/skills/fluent-mystique-builder/components/fc.card.product.md +27 -0
  71. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.md +34 -0
  72. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.wrapper.feed.md +98 -0
  73. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.md +52 -0
  74. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.wrapper.source.md +104 -0
  75. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.md +28 -0
  76. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.wrapper.threshold.md +118 -0
  77. package/content/dev/skills/fluent-mystique-builder/components/fc.chart.line.md +32 -0
  78. package/content/dev/skills/fluent-mystique-builder/components/fc.conditional.md +62 -0
  79. package/content/dev/skills/fluent-mystique-builder/components/fc.dashboard.threshold.md +65 -0
  80. package/content/dev/skills/fluent-mystique-builder/components/fc.daterange.wrapper.forwarder.md +56 -0
  81. package/content/dev/skills/fluent-mystique-builder/components/fc.drawer.button.md +21 -0
  82. package/content/dev/skills/fluent-mystique-builder/components/fc.event.detail.md +20 -0
  83. package/content/dev/skills/fluent-mystique-builder/components/fc.events.search.md +21 -0
  84. package/content/dev/skills/fluent-mystique-builder/components/fc.field.daterange.md +83 -0
  85. package/content/dev/skills/fluent-mystique-builder/components/fc.field.filterComplex.md +106 -0
  86. package/content/dev/skills/fluent-mystique-builder/components/fc.field.intrange.md +82 -0
  87. package/content/dev/skills/fluent-mystique-builder/components/fc.field.multistring.md +50 -0
  88. package/content/dev/skills/fluent-mystique-builder/components/fc.filterPanel.md +53 -0
  89. package/content/dev/skills/fluent-mystique-builder/components/fc.json.editor.md +22 -0
  90. package/content/dev/skills/fluent-mystique-builder/components/fc.json.viewer.md +21 -0
  91. package/content/dev/skills/fluent-mystique-builder/components/fc.list.customAction.md +79 -0
  92. package/content/dev/skills/fluent-mystique-builder/components/fc.list.md +116 -0
  93. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.bppmetrics.md +69 -0
  94. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.feed.md +65 -0
  95. package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.source.md +64 -0
  96. package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.addItem.md +60 -0
  97. package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.md +21 -0
  98. package/content/dev/skills/fluent-mystique-builder/components/fc.mutation.inline.md +88 -0
  99. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.attributes.md +83 -0
  100. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.text.md +33 -0
  101. package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.link.md +30 -0
  102. package/content/dev/skills/fluent-mystique-builder/components/fc.order.itemDetails.md +20 -0
  103. package/content/dev/skills/fluent-mystique-builder/components/fc.order.shipmentDetails.md +20 -0
  104. package/content/dev/skills/fluent-mystique-builder/components/fc.page.filter.select.md +87 -0
  105. package/content/dev/skills/fluent-mystique-builder/components/fc.page.md +64 -0
  106. package/content/dev/skills/fluent-mystique-builder/components/fc.page.refresh.md +48 -0
  107. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.column.md +71 -0
  108. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.header.md +61 -0
  109. package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.md +59 -0
  110. package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.md +45 -0
  111. package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.summary.md +56 -0
  112. package/content/dev/skills/fluent-mystique-builder/components/fc.progress.circular.md +20 -0
  113. package/content/dev/skills/fluent-mystique-builder/components/fc.provider.graphql.md +71 -0
  114. package/content/dev/skills/fluent-mystique-builder/components/fc.quantity.list.md +87 -0
  115. package/content/dev/skills/fluent-mystique-builder/components/fc.repeater.md +56 -0
  116. package/content/dev/skills/fluent-mystique-builder/components/fc.reports.ipuipc.md +54 -0
  117. package/content/dev/skills/fluent-mystique-builder/components/fc.return.rowExpansion.md +19 -0
  118. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcode.md +21 -0
  119. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcodeFilter.md +72 -0
  120. package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.camera.md +20 -0
  121. package/content/dev/skills/fluent-mystique-builder/components/fc.settingForm.md +64 -0
  122. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.drawer.button.md +19 -0
  123. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.modal.button.md +64 -0
  124. package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.strategy.modal.button.md +20 -0
  125. package/content/dev/skills/fluent-mystique-builder/components/fc.stepper.md +20 -0
  126. package/content/dev/skills/fluent-mystique-builder/components/fc.tab.content.md +56 -0
  127. package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.card.md +64 -0
  128. package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.md +69 -0
  129. package/content/dev/skills/fluent-mystique-builder/components/fc.tile.metric.md +73 -0
  130. package/content/dev/skills/fluent-mystique-builder/components/fc.workflow.provider.md +77 -0
  131. package/content/dev/skills/fluent-mystique-builder/validate-docs.ps1 +260 -0
  132. package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +1830 -0
  133. package/content/dev/skills/fluent-mystique-validate/SKILL.md +646 -0
  134. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1144 -1090
  135. package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1120
  136. package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
  137. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -394
  138. package/content/dev/skills/fluent-scope-decompose/SKILL.md +1123 -1021
  139. package/content/dev/skills/fluent-session-audit-export/SKILL.md +880 -632
  140. package/content/dev/skills/fluent-session-summary/SKILL.md +320 -195
  141. package/content/dev/skills/fluent-settings/SKILL.md +151 -2
  142. package/content/dev/skills/fluent-source-onboard/SKILL.md +23 -4
  143. package/content/dev/skills/fluent-sourcing/SKILL.md +14 -0
  144. package/content/dev/skills/fluent-system-monitoring/SKILL.md +771 -767
  145. package/content/dev/skills/fluent-test-data/SKILL.md +514 -513
  146. package/content/dev/skills/fluent-trace/SKILL.md +1169 -1143
  147. package/content/dev/skills/fluent-transition-api/SKILL.md +364 -346
  148. package/content/dev/skills/fluent-use-case-discover/SKILL.md +593 -471
  149. package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +22 -1
  150. package/content/dev/skills/fluent-version-manage/SKILL.md +44 -3
  151. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
  152. package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -326
  153. package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -0
  154. package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
  155. package/content/mcp-extn/agents/fluent-mcp.md +133 -132
  156. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -800
  157. package/content/mcp-official/agents/fluent-mcp-core.md +91 -91
  158. package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -94
  159. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -172
  160. package/docs/CAPABILITY_MAP.md +106 -73
  161. package/docs/DEPLOYMENT_PROMOTION_RUNBOOK.md +218 -0
  162. package/docs/DESIGN-implementation-map.md +698 -0
  163. package/docs/DEV_WORKFLOW.md +814 -802
  164. package/docs/FLOW_RUN.md +142 -142
  165. package/docs/GETTING_STARTED.md +427 -0
  166. package/docs/USE_CASES.md +906 -50
  167. package/metadata.json +184 -155
  168. package/package.json +7 -2
  169. package/docs/USE_CASES.pdf +0 -0
@@ -1,170 +1,312 @@
1
- ---
2
- name: fluent-build
3
- description: Build, version, package, and deploy Fluent Commerce extension modules. Handles Maven compilation, version bumping, module packaging, and deployment. Triggers on "build module", "bump version", "package module", "deploy module", "maven build".
4
- user-invocable: true
5
- allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
- argument-hint: [build|version|package|deploy|full] [--skip-tests]
7
- ---
8
-
9
- # Build and Packaging
10
-
11
- Build and package Fluent extension modules with consistent versioning.
12
-
13
- ## Planning Gate
14
-
15
- ### Pre-flight: Plan Verification
16
-
17
- Before proceeding, check for an existing approved plan:
18
-
19
- 1. **Search** `accounts/<PROFILE>/plans/` for a file with `Status: APPROVED` that covers this build/version change
20
- 2. **If multi-artifact work** (build + rules + workflows + settings): STOP. Invoke `/fluent-feature-plan` first — this skill cannot be used for multi-artifact work without a feature plan
21
- 3. **If approved plan found:** Skip to implementation, referencing the plan's §17 (Deployment) section
22
- 4. **If build-only work with no plan:** Continue to the Planning Gate below to write a plan for this skill
23
- 5. **Plain `mvn clean install` builds** (no version change) are always exempt from planning
24
-
25
- **Before version bumping or packaging, write a plan using the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill.** Plain `mvn clean install` builds (no version change) are exempt.
26
-
27
- **Build-specific emphasis — ensure these are covered:**
28
-
29
- 1. **Business Context (Section 1)** — what change drives this version bump
30
- 2. **Scope (Section 2)** — current version → new version, bump type (patch/minor/major) with rationale
31
- 3. **Files (Section 6)** — all pom.xml files, module.json, CHANGELOG.md that will be modified
32
- 4. **Impacted retailers (Section 4.8)** — which environments get the new version
33
- 5. **Test Plan (Section 8)** — confirm tests pass before versioning
34
- 6. **Deployment Sequence (Section 9)** — build → test → version bump → package → deploy order
35
-
36
- **Write the plan to:** `accounts/<PROFILE>/plans/<YYYY-MM-DD>-build-<slug>.md`. Set `Status: PENDING`.
37
-
38
- Present the full plan content to the user and wait for approval before bumping versions. On approval, update the file to `Status: APPROVED`. If the user says "just do it", proceed directly (still write the file for audit trail).
39
-
40
- ## Ownership Boundary
41
-
42
- This skill owns:
43
-
44
- - version bumping
45
- - Maven build/test execution
46
- - module ZIP packaging
47
-
48
- This skill does **not** own deployment runbooks. For deployment:
49
-
50
- - use `/fluent-module-deploy` for manual installs
51
- - use `flow-run` for guarded automation and JSON run reporting
52
-
53
- ## When to Use
54
-
55
- - Java rule or utility code changed
56
- - module version needs bumping before redeploy
57
- - a new deployable ZIP artifact is required
58
- - build errors need diagnosis and recovery
59
-
60
- ## Pre-Check: Module Validation
61
-
62
- Before building, check the cached validation report from `/fluent-module-validate`:
63
-
64
- ```
65
- accounts/<PROFILE>/analysis/module-validate/<module-name>.report.json
66
- ```
67
-
68
- If the report exists and `summary.status` is `NEEDS_FIXES`, warn the user and list the FAIL items before proceeding. If the report is missing or stale (hash mismatch), recommend running `/fluent-module-validate` first.
69
-
70
- ## Pre-Check: Load Source Analysis
71
-
72
- Before building, check if `/fluent-custom-code` analysis artifacts exist:
73
-
74
- ```
75
- accounts/<PROFILE>/analysis/custom-code/source-map.json
76
- ```
77
-
78
- If found, read to discover:
79
- - `modules[].buildRoot` — correct directory to run Maven from
80
- - `modules[].buildCommand` — build command
81
- - `modules[].packageScript` packaging script path
82
- - `modules[].outputArtifact` — expected output ZIP
83
- - `modules[].version` — current version (for bump validation)
84
-
85
- If not found, fall back to the defaults below. Treat artifact-gate failures as "not found" (for example missing required files, missing hashes, or blocking `missingSources` in `constraints.json`).
86
-
87
- ## Prerequisites Check
88
-
89
- Run before building:
90
-
91
- ```bash
92
- node --version
93
- java --version
94
- mvn --version
95
- fluent --version
96
- ```
97
-
98
- Use the repository-supported runtime versions for your environment.
99
-
100
- ## 1) Version Bump (required before redeploy)
101
-
102
- > **Full version lifecycle:** For version status, sync, CHANGELOG updates, and git tagging, use `/fluent-version-manage`. This section covers the minimum bump needed before a build.
103
-
104
- Fluent ignores re-uploading the same module version. Keep these files in sync:
105
-
106
- | File | Field |
107
- |---|---|
108
- | `plugins/pom.xml` | parent `<version>` |
109
- | `plugins/rules/<module-alias>/pom.xml` | parent/module `<version>` |
110
- | `plugins/types/<module-alias>/pom.xml` | parent/module `<version>` |
111
- | `plugins/util/<module-alias>/pom.xml` | parent/module `<version>` |
112
- | `resources/module.json` | `"version"` |
113
-
114
- Procedure:
115
-
116
- 1. Read current `resources/module.json` version.
117
- 2. Increment patch version.
118
- 3. Update all files above.
119
- 4. Verify old version no longer exists in the module source tree.
120
-
121
- ## 2) Build
122
-
123
- From `plugins/`:
124
-
125
- ```bash
126
- # Full build
127
- mvn clean install
128
-
129
- # Build without tests
130
- mvn clean install -DskipTests
131
-
132
- # Build targeted module with dependencies
133
- mvn clean install -pl rules/<module-alias> -am
134
- ```
135
-
136
- ## 3) Package
137
-
138
- After a successful build, create a deployable ZIP:
139
-
140
- ```bash
141
- # Bash (macOS/Linux/Git Bash on Windows)
142
- ./scripts/build-module.sh
143
- ./scripts/build-module.sh -p # skip plugins (packaging only)
144
- ```
145
-
146
- ```powershell
147
- # PowerShell (Windows native)
148
- .\scripts\build-module.ps1
149
- .\scripts\build-module.ps1 -SkipPlugins
150
- ```
151
-
152
- Expected output:
153
-
154
- `dist/fluent-commerce-<module-name>-<VERSION>.zip`
155
-
156
- ## 4) Hand Off to Deploy Owner
157
-
158
- After packaging completes:
159
-
160
- - manual path: `/fluent-module-deploy`
161
- - automated path: `npx @fluentcommerce/ai-skills flow-run --deploy --yes ...`
162
-
163
- ## Common Build Failures
164
-
165
- | Symptom | Likely cause | First check |
166
- |---|---|---|
167
- | `cannot find symbol` | import/type mismatch | validate changed classes and imports |
168
- | dependency/module not found | wrong module scope/build root | run from `plugins/` and include `-am` where needed |
169
- | tests fail after model changes | fixture/schema drift | update test fixtures and expected payloads |
170
- | package script succeeds but ZIP missing expected assets | resource path mismatch | verify `resources/` contents and module build script inputs |
1
+ ---
2
+ name: fluent-build
3
+ description: Build, version, package, and deploy Fluent Commerce extension modules. Handles Maven compilation, version bumping, module packaging, and deployment. Triggers on "build module", "bump version", "package module", "deploy module", "maven build".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ argument-hint: [build|version|package|deploy|full] [--skip-tests]
7
+ ---
8
+
9
+ # Build and Packaging
10
+
11
+ Build and package Fluent extension modules with consistent versioning.
12
+
13
+ ## Planning Gate
14
+
15
+ ### Pre-flight: Plan Verification
16
+
17
+ Before proceeding, check for an existing approved plan:
18
+
19
+ 1. **Search** `accounts/<PROFILE>/features/*/status.json` for an entry with `plan: "APPROVED"` that covers this build/version change, OR check `accounts/<PROFILE>/tasks/` for a task plan with `Status: APPROVED`
20
+ 2. **If multi-artifact work** (build + rules + workflows + settings): STOP. Invoke `/fluent-feature-plan` first — this skill cannot be used for multi-artifact work without a feature plan
21
+ 3. **If approved plan found:** Skip to implementation, referencing the plan's §17 (Deployment) section
22
+ 4. **If build-only work with no plan:** Continue to the Planning Gate below to write a plan for this skill
23
+ 5. **Plain `mvn clean install` builds** (no version change) are always exempt from planning
24
+
25
+ **Before version bumping or packaging, write a plan using the template from `PLAN_TEMPLATE.md` in the `fluent-feature-plan` skill.** Plain `mvn clean install` builds (no version change) are exempt.
26
+
27
+ **Build-specific emphasis — ensure these are covered:**
28
+
29
+ 1. **Business Context (Section 1)** — what change drives this version bump
30
+ 2. **Scope (Section 2)** — current version → new version, bump type (patch/minor/major) with rationale
31
+ 3. **Files (Section 6)** — all pom.xml files, module.json, CHANGELOG.md that will be modified
32
+ 4. **Impacted retailers (Section 4.8)** — which environments get the new version
33
+ 5. **Test Plan (Section 8)** — confirm tests pass before versioning
34
+ 6. **Deployment Sequence (Section 9)** — build → test → version bump → package → deploy order
35
+
36
+ **Write the plan to:** `accounts/<PROFILE>/tasks/<YYYY-MM-DD>-build-<slug>.md`. Set `Status: PENDING`.
37
+
38
+ Present the full plan content to the user and wait for approval before bumping versions. On approval, update the file to `Status: APPROVED`. If the user says "just do it", proceed directly (still write the file for audit trail).
39
+
40
+ ## Ownership Boundary
41
+
42
+ This skill owns:
43
+
44
+ - version bumping
45
+ - Maven build/test execution
46
+ - module ZIP packaging
47
+
48
+ This skill does **not** own deployment runbooks. For deployment:
49
+
50
+ - use `/fluent-module-deploy` for manual installs
51
+ - use `flow-run` for guarded automation and JSON run reporting
52
+
53
+ ## Handoff Protocol
54
+
55
+ ### Signals emitted by this skill
56
+
57
+ | Signal | Condition | Example |
58
+ |--------|-----------|---------|
59
+ | `-> READY: <path>` | Build successful, artifact produced | `-> READY: accounts/HMDEV/SOURCE/fc-module-hm-extensions/dist/module-0.0.30.jar` |
60
+ | `-> NEXT: /fluent-<skill>` | Ready for pre-deploy check | `-> NEXT: /fluent-pre-deploy-check` |
61
+ | `-> BLOCKED: <reason>` | Build failed | `-> BLOCKED: VALIDATION_FAILED — Compilation error in CancelOrderRule.java:45` |
62
+
63
+ ### Error codes
64
+
65
+ | Code | Condition | Recovery |
66
+ |------|-----------|----------|
67
+ | `PLAN_REQUIRED` | Version bump attempted without approved plan | Run `/fluent-feature-plan` first |
68
+ | `PREREQ_MISSING` | Module validation report missing or stale | Run `/fluent-module-validate` first |
69
+ | `VALIDATION_FAILED` | Compilation error or test failure | Fix code and re-run `/fluent-build` |
70
+
71
+ ## When to Use
72
+
73
+ - Java rule or utility code changed
74
+ - Workflow JSON, settings, or resource files changed in `resources/`
75
+ - module version needs bumping before redeploy
76
+ - a new deployable ZIP artifact is required
77
+ - build errors need diagnosis and recovery
78
+
79
+ ## Progress
80
+
81
+ Emit this block at each phase transition to show progress:
82
+
83
+ ```
84
+ ▸ /fluent-build [1/4]
85
+ Module validation gate Version bump
86
+ ○ Compile (mvn install) ○ Package ZIP
87
+ ```
88
+
89
+ Update the block as each phase completes — mark completed phases with `✓`, the active phase with `→`, and remaining phases with `○`. Replace `[1/4]` with the current phase number.
90
+
91
+ ## Pre-Check: Module Validation (Enforced Gate)
92
+
93
+ Before building, check the cached validation report from `/fluent-module-validate`:
94
+
95
+ ```
96
+ accounts/<PROFILE>/reports/module-validate/<module-name>.report.json
97
+ ```
98
+
99
+ **This is a gating check, not advisory:**
100
+
101
+ 1. **Report exists and `summary.status == "NEEDS_FIXES"`** -- **STOP**. List all FAIL items from the report. Ask the user to confirm proceeding despite validation failures. Do NOT silently continue.
102
+
103
+ 2. **Report exists and `summary.status == "READY_FOR_BUILD"`** -- proceed with build.
104
+
105
+ 3. **Report is missing or stale** (content hash in `.hash` file doesn't match current source) -- **run `/fluent-module-validate` inline** before building. This ensures validation is always current. If inline validation finds FAIL items, apply the same gating behavior as case 1.
106
+
107
+ The validation report checks: module.json structure, POM consistency, version alignment, rule wiring, test coverage, and more. Building a module that fails validation wastes time and may produce a broken artifact.
108
+
109
+ ## Pre-Check: Load Source Analysis
110
+
111
+ Before building, check if `/fluent-custom-code` analysis artifacts exist:
112
+
113
+ ```
114
+ accounts/<PROFILE>/analysis/code/source-map.json
115
+ ```
116
+
117
+ If found, read to discover:
118
+ - `modules[].buildRoot` correct directory to run Maven from
119
+ - `modules[].buildCommand` build command
120
+ - `modules[].packageScript` — packaging script path
121
+ - `modules[].outputArtifact` — expected output ZIP
122
+ - `modules[].version` — current version (for bump validation)
123
+
124
+ If not found, fall back to the defaults below. Treat artifact-gate failures as "not found" (for example missing required files, missing hashes, or blocking `missingSources` in `constraints.json`).
125
+
126
+ ## Prerequisites Check
127
+
128
+ Run before building:
129
+
130
+ ```bash
131
+ node --version
132
+ java --version
133
+ mvn --version
134
+ fluent --version
135
+ ```
136
+
137
+ Use the repository-supported runtime versions for your environment.
138
+
139
+ ## 1) Version Bump (required before redeploy)
140
+
141
+ > **Full version lifecycle:** For version status, sync, CHANGELOG updates, and git tagging, use `/fluent-version-manage`. This section covers the minimum bump needed before a build.
142
+
143
+ ### When to Bump
144
+
145
+ **A version bump is required whenever ANY content in the module changes — not just Java code.**
146
+
147
+ | Change Type | Examples | Bump Required? | Why |
148
+ |------------|---------|---------------|-----|
149
+ | Java code | New rule, bug fix, refactor | **YES** | JAR filename includes version; CLI skips upload if same version exists |
150
+ | Workflow JSON | New ruleset, status change, rule reorder | **YES** | Module version tracks what's deployed; without bump the module install looks identical to last deploy |
151
+ | Settings | New setting, value change | **YES** | Same reason — traceability of what version introduced the change |
152
+ | Resources | New assets, config templates | **YES** | Packaged into the module ZIP; version is the audit trail |
153
+ | No content change | Re-deploy same content | **NO** | Use `--force` flag if re-install is needed |
154
+
155
+ **Key gotcha:** The Fluent CLI checks the plugin JAR filename against what's already uploaded. If `fc-module-<name>-0.0.30.jar` is already active, uploading the same version results in `"already uploaded: Active - nothing more to do"` — the JAR is silently skipped. **Both `resources/module.json` AND all `pom.xml` files must be bumped in sync**, because Maven uses the POM version for the JAR filename while the CLI uses `module.json` version for the module-level check.
156
+
157
+ ### Version Sync — All Files Must Match
158
+
159
+ Fluent ignores re-uploading the same module version. Keep these files in sync:
160
+
161
+ | File | Field |
162
+ |---|---|
163
+ | `plugins/pom.xml` | parent `<version>` |
164
+ | `plugins/rules/<module-alias>/pom.xml` | parent/module `<version>` |
165
+ | `plugins/types/<module-alias>/pom.xml` | parent/module `<version>` |
166
+ | `plugins/util/<module-alias>/pom.xml` | parent/module `<version>` |
167
+ | `resources/module.json` | `"version"` |
168
+
169
+ ### Bump Procedure
170
+
171
+ 1. Read current `resources/module.json` version.
172
+ 2. Increment patch version (or minor/major per semver rationale).
173
+ 3. Update `resources/module.json` version field.
174
+ 4. Update all POM files — use Maven to ensure consistency:
175
+ ```bash
176
+ cd plugins/ && mvn versions:set -DnewVersion=<NEW_VERSION> -DgenerateBackupPoms=false
177
+ ```
178
+ 5. Verify old version no longer exists in the module source tree:
179
+ ```bash
180
+ grep -r "<old-version>" plugins/*/pom.xml resources/module.json
181
+ ```
182
+
183
+ ## 2) Build
184
+
185
+ ### Pre-Build Version Check
186
+
187
+ Before running Maven, verify the version is deployable:
188
+
189
+ 1. Read the current version from `pom.xml` (`<version>` tag) or `module.json` (`version` field).
190
+ 2. Check deployed versions: run `fluent module list -p <PROFILE>` or `/fluent-version-manage status`.
191
+ 3. If the current version **matches an already-deployed version**, WARN:
192
+ > "Version X.Y.Z is already deployed. The Fluent CLI will silently skip the upload. Run `/fluent-version-manage bump` to increment the version first."
193
+ 4. Only proceed after the user confirms ("build anyway") or bumps the version.
194
+
195
+ ### Maven Execution
196
+
197
+ From `plugins/`:
198
+
199
+ ```bash
200
+ # Full build
201
+ mvn clean install
202
+
203
+ # Build without tests
204
+ mvn clean install -DskipTests
205
+
206
+ # Build targeted module with dependencies
207
+ mvn clean install -pl rules/<module-alias> -am
208
+ ```
209
+
210
+ ### Post-Build Output Analysis
211
+
212
+ After Maven completes, parse the output for actionable signals:
213
+
214
+ 1. **BUILD FAILURE**: If output contains `BUILD FAILURE`, extract the error message and report as a **blocking failure**. Do not proceed to packaging.
215
+ 2. **Warnings**: Collect all `[WARNING]` lines. Report count and summary as non-blocking warnings.
216
+ 3. **Test results**: Find the `Tests run:` summary line. Extract passed/failed/skipped/errors counts. If `Failures > 0` or `Errors > 0`, report as **blocking** -- tests must pass before deployment.
217
+ 4. **Skipped tests**: If output contains `Tests are skipped` or `-DskipTests`, warn: "Tests were skipped. Run full test suite before deployment."
218
+ 5. **Save structured result** to `accounts/<PROFILE>/reports/build/<MODULE>-<VERSION>.build-result.json`:
219
+ ```json
220
+ { "status": "SUCCESS|FAILED", "warnings": 0, "tests": { "passed": 0, "failed": 0, "skipped": 0, "errors": 0 }, "errors": [] }
221
+ ```
222
+ This file is consumed by `/fluent-pre-deploy-check` for automated validation.
223
+
224
+ ## 3) Package
225
+
226
+ After a successful build, create a deployable ZIP:
227
+
228
+ ```bash
229
+ # Bash (macOS/Linux/Git Bash on Windows)
230
+ ./scripts/build-module.sh
231
+ ./scripts/build-module.sh -p # skip plugins (packaging only)
232
+ ```
233
+
234
+ ```powershell
235
+ # PowerShell (Windows native)
236
+ .\scripts\build-module.ps1
237
+ .\scripts\build-module.ps1 -SkipPlugins
238
+ ```
239
+
240
+ Expected output:
241
+
242
+ `dist/fluent-commerce-<module-name>-<VERSION>.zip`
243
+
244
+ ## Post-Build Validation
245
+
246
+ After Maven build completes, validate the output before handing off to deploy:
247
+
248
+ 1. **Parse Maven output** — Check for:
249
+ - `BUILD SUCCESS` (required to proceed)
250
+ - `[WARNING]` lines — report to user, especially dependency convergence warnings
251
+ - Skipped tests — flag as concern: "N tests were skipped; consider running full suite"
252
+ - `BUILD FAILURE` — STOP, do not proceed to packaging
253
+
254
+ 2. **JAR sanity check** — For extension modules, verify:
255
+ - JAR file exists at expected path (`plugins/rules/target/*.jar`)
256
+ - JAR size is non-zero and reasonable (> 1KB)
257
+ - JAR manifest references expected rule classes
258
+
259
+ 3. **Version pre-check** — Before build, call `/fluent-version-manage status` or read `module.json` version. If version matches the already-deployed version (from `fluent module list`), WARN: "Version {X} is already deployed. Bump version before building, or the deploy will be silently skipped."
260
+
261
+ Report build results as structured output: `{ success: true/false, warnings: [...], skippedTests: N, jarSize: N }` so downstream skills can consume it.
262
+
263
+ ## 4) Hand Off to Deploy Owner
264
+
265
+ After packaging completes:
266
+
267
+ - manual path: `/fluent-module-deploy`
268
+ - automated path: `npx @fluentcommerce/ai-skills flow-run --deploy --yes ...`
269
+
270
+ ## Session Tracking
271
+
272
+ When invoked, log the following to the session tracking protocol (consumed by `/fluent-session-summary` and `/fluent-session-audit-export`):
273
+
274
+ **On entry:**
275
+ ```json
276
+ { "skill": "<this-skill-name>", "timestamp": "<ISO-8601>", "arguments": { "<key>": "<value>", "...": "..." } }
277
+ ```
278
+
279
+ **On exit:**
280
+ ```json
281
+ { "skill": "<this-skill-name>", "outcome": "<completed|failed|skipped>", "changesProduced": ["<seq-numbers>"], "toolCallsProduced": ["<seq-numbers>"], "nextRecommended": "<from-handoff-section>" }
282
+ ```
283
+
284
+ All MCP tool calls made during execution should include `"skill": "<this-skill-name>"` in their tracking record for attribution. The `arguments` object should capture the key parameters actually passed (profile, retailer, entity type, etc.) — not a fixed schema. The `nextRecommended` value comes from the Handoff section below.
285
+
286
+ ## Handoff
287
+
288
+ | Output Artifact | Consumed By | Path |
289
+ |----------------|-------------|------|
290
+ | Module ZIP artifact | `/fluent-pre-deploy-check` | `accounts/<PROFILE>/SOURCE/<repo>/dist/<module-name>-<version>.zip` |
291
+ | Module ZIP artifact | `/fluent-module-deploy` | `accounts/<PROFILE>/SOURCE/<repo>/dist/<module-name>-<version>.zip` |
292
+ | Build log (Maven output) | `/fluent-pre-deploy-check` | stdout from `mvn clean install` |
293
+
294
+ ## Error Reporting
295
+
296
+ Errors from this skill follow the standard format:
297
+
298
+ | Field | Description |
299
+ |-------|-------------|
300
+ | `phase` | Skill phase where error occurred (e.g., `pre-check`, `compilation`, `test`, `packaging`) |
301
+ | `severity` | `CRITICAL` (blocks downstream), `HIGH` (needs fix), `MEDIUM` (advisory), `LOW` (informational) |
302
+ | `message` | Human-readable error description |
303
+ | `resolution` | Suggested fix or downstream skill to invoke |
304
+
305
+ ## Common Build Failures
306
+
307
+ | Symptom | Likely cause | First check |
308
+ |---|---|---|
309
+ | `cannot find symbol` | import/type mismatch | validate changed classes and imports |
310
+ | dependency/module not found | wrong module scope/build root | run from `plugins/` and include `-am` where needed |
311
+ | tests fail after model changes | fixture/schema drift | update test fixtures and expected payloads |
312
+ | package script succeeds but ZIP missing expected assets | resource path mismatch | verify `resources/` contents and module build script inputs |