@fluentcommerce/ai-skills 0.1.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 (168) hide show
  1. package/README.md +866 -622
  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 -181
  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 -1031
  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 +63 -5
  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 -0
  19. package/content/dev/agents/fluent-dev/agent.json +14 -2
  20. package/content/dev/agents/fluent-dev.md +194 -525
  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 -192
  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 +19 -2
  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 +27 -2
  33. package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -227
  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 +64 -2
  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 -1108
  135. package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1111
  136. package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
  137. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -385
  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 +160 -1
  142. package/content/dev/skills/fluent-source-onboard/SKILL.md +31 -3
  143. package/content/dev/skills/fluent-sourcing/SKILL.md +1185 -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 -0
  149. package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +281 -0
  150. package/content/dev/skills/fluent-version-manage/SKILL.md +53 -2
  151. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
  152. package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -319
  153. package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -267
  154. package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
  155. package/content/mcp-extn/agents/fluent-mcp.md +133 -69
  156. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -461
  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 -77
  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 +909 -52
  167. package/metadata.json +184 -156
  168. package/package.json +3 -2
@@ -1,195 +1,320 @@
1
- ---
2
- name: fluent-session-summary
3
- description: Track and summarize all code and Fluent environment changes made during a session. Maintains a running change log and produces a structured audit report (Text or JSON). Triggers on "session summary", "what did we change", "change summary", "show changes", "export audit".
4
- user-invocable: true
5
- allowed-tools: Bash, Read, Write
6
- argument-hint: [show|reset|export --json]
7
- ---
8
-
9
- # Session Change Tracking
10
-
11
- Track ALL changes made during a session — both code modifications and Fluent Commerce environment mutations — and produce a structured audit summary on demand.
12
-
13
- ## Behaviour
14
-
15
- This is a **cross-cutting concern**, not a phase-specific skill. It applies alongside every other skill.
16
-
17
- ### What to Track
18
-
19
- **Fluent environment changes (live account):**
20
- - GraphQL mutations executed (entity type, ref/id, fields changed)
21
- - Workflows deployed or uploaded (name, version, retailer)
22
- - Settings created or updated (key, context, value summary)
23
- - Events sent via `event.send` (name, entity type, entity ref, sync/async, outcome)
24
- - Modules deployed via CLI (name, version, retailer)
25
- - Batch jobs created and sent (job name, entity type, record count, outcome)
26
- - Entities created or updated (locations, networks, catalogues, carriers, users, orders, fulfilments, inventory positions, products, virtual catalogues, etc.)
27
-
28
- **Code changes (local workspace):**
29
- - Files created, modified, or deleted (path + brief description)
30
- - Workflow JSON edits (ruleset added/removed, trigger changed, state added)
31
- - Rule classes scaffolded or modified
32
- - Git commits made (hash, message, repo)
33
- - Git pushes (repo, branch, remote)
34
-
35
- **Read-only operations are NOT tracked** — queries, downloads, analysis, introspection, event listing, and diagnostics are informational and do not change state.
36
-
37
- ### When to Present
38
-
39
- - When the user asks: "what did we change?", "summary", "show changes", "wrap up", or invokes `/fluent-session-summary`
40
- - Proactively before ending a session that involved significant changes (3+ write operations)
41
- - After completing a multi-step task (e.g., build-deploy-test cycle)
42
-
43
- ### Text Summary Format (Default)
44
-
45
- ```markdown
46
- ## Session Change Summary
47
-
48
- **Profile:** <PROFILE> | **Account:** <account> | **Retailer:** <RETAILER_REF> (ID <N>)
49
- **Duration:** <first change time> - <last change time>
50
-
51
- ### Environment Changes
52
- | # | Action | Type | Ref / Key | Details |
53
- |---|--------|------|-----------|---------|
54
- | 1 | Created | Setting | WEBHOOK_ORDER_URL | context=RETAILER:5, value=https://... |
55
- | 2 | Created | Order | HD_TEST_20260222_1 | type=HD, status=CREATED |
56
- | 3 | Sent Event | CreateOrder | ORDER/HD_TEST_20260222_1 | async, SUCCESS |
57
- | 4 | Mutation | Order | HD_TEST_20260222_1 | status CREATED -> BOOKED |
58
- | 5 | Deployed | Workflow | ORDER::HD | v12 -> retailer HM_TEST |
59
- | 6 | Deployed | Module | hm-extensions | v1.2.3 -> retailer HM_TEST |
60
- | 7 | Batch | Product | job-12345 | 50 records, COMPLETE |
61
-
62
- ### Code Changes
63
- | # | Action | Path | Details |
64
- |---|--------|------|---------|
65
- | 1 | Modified | workflows/ORDER__HD.json | Added ruleset HandleCancellation |
66
- | 2 | Created | src/.../CancelOrderRule.java | New rule class + test |
67
- | 3 | Modified | resources/module.json | Registered CancelOrderRule |
68
- | 4 | Committed | fluent-mcp-extn | abc1234 - feat: add cancel support |
69
- | 5 | Pushed | fluent-mcp-extn | main -> origin/main |
70
-
71
- ### Totals
72
- | Category | Count |
73
- |----------|-------|
74
- | GraphQL mutations | N |
75
- | Events sent | N |
76
- | Settings changed | N |
77
- | Workflows deployed | N |
78
- | Modules deployed | N |
79
- | Batch jobs | N |
80
- | Files modified | N |
81
- | Git commits | N |
82
-
83
- ### Irreversible Actions
84
- > List any destructive or hard-to-reverse changes here (entity deletions, workflow version overwrites, forced re-deploys). Flag prominently so the user is aware.
85
- ```
86
-
87
- ### JSON Export Format (`export --json`)
88
-
89
- > **For compliance-grade exports** with traceability matrices, rollback commands, and external system mapping, use `/fluent-session-audit-export`. This quick JSON export is a lightweight alternative for simple session records.
90
-
91
- When the user asks to "export audit" or runs with `export --json`, generate a JSON file (e.g., `session-audit-<TIMESTAMP>.json`) with this structure:
92
-
93
- <!-- Validate Mermaid blocks per /fluent-mermaid-validate rules -->
94
- ```mermaid
95
- classDiagram
96
- class SessionAudit {
97
- String session_id
98
- String timestamp
99
- Target target
100
- Changes changes
101
- String summary
102
- }
103
- class Target {
104
- String profile
105
- String retailer
106
- String account
107
- }
108
- class Changes {
109
- CodeChange[] code
110
- EnvChange[] environment
111
- }
112
- class CodeChange {
113
- String timestamp
114
- String action
115
- String file
116
- String description
117
- }
118
- class EnvChange {
119
- String timestamp
120
- String action
121
- String type
122
- String ref
123
- String details
124
- String outcome
125
- }
126
-
127
- SessionAudit *-- Target
128
- SessionAudit *-- Changes
129
- Changes *-- CodeChange
130
- Changes *-- EnvChange
131
- ```
132
-
133
- ```json
134
- {
135
- "session_id": "UUID",
136
- "timestamp": "ISO-8601",
137
- "target": {
138
- "profile": "PROFILE_NAME",
139
- "retailer": "RETAILER_REF",
140
- "account": "ACCOUNT_NAME"
141
- },
142
- "changes": {
143
- "code": [
144
- { "timestamp": "ISO", "action": "modified", "file": "path/to/file", "description": "Added ruleset" },
145
- { "timestamp": "ISO", "action": "created", "file": "path/to/file", "description": "New rule class" }
146
- ],
147
- "environment": [
148
- { "timestamp": "ISO", "action": "mutation", "type": "ORDER", "ref": "ORD-123", "details": "status -> BOOKED" },
149
- { "timestamp": "ISO", "action": "event", "name": "ConfirmPick", "entity": "FULFILMENT", "ref": "FUL-123", "outcome": "SUCCESS" }
150
- ]
151
- },
152
- "summary": "Brief text summary of the session goals and outcomes."
153
- }
154
- ```
155
-
156
- ### Tracking Protocol
157
-
158
- 1. **As changes happen:** After each write operation (mutation, event send, deploy, file edit, commit), mentally append it to the running log. Do not wait until the end to reconstruct.
159
- 2. **On `/fluent-session-summary show`:** Present the full text table.
160
- 3. **On `/fluent-session-summary export --json`:** Write the JSON artifact to the workspace root.
161
- 4. **On `/fluent-session-summary reset`:** Clear the running log (start fresh, e.g., when switching accounts mid-session).
162
- 5. **Group by account/retailer** if the session spans multiple profiles or retailers.
163
- 6. **Include outcome** where known (SUCCESS, FAILED, NO_MATCH) — especially for events.
164
- 7. **For mutations**, note the key fields changed rather than full payloads.
165
- 8. **For workflow deploys**, note the version number deployed.
166
-
167
- ### Integration with Other Skills
168
-
169
- Every skill that performs write operations should contribute to this log:
170
-
171
- | Skill | Tracked actions |
172
- |-------|----------------|
173
- | `fluent-workflow-builder` | Workflow JSON edits (local file changes) |
174
- | `fluent-build` | Version bumps, module packaging |
175
- | `fluent-module-deploy` | Module installs to retailers |
176
- | `fluent-workflow-deploy` | Workflow uploads to retailers |
177
- | `fluent-settings` | Setting create/update mutations |
178
- | `fluent-retailer-config` | Entity creation (locations, networks, catalogues, etc.) |
179
- | `fluent-test-data` | Test entity creation |
180
- | `fluent-e2e-test` | Events sent, entities created during test |
181
- | `fluent-rule-scaffold` | New Java classes and module.json changes |
182
- | `fluent-job-batch` | Batch job creation, record sends |
183
- | `fluent-trace` | Events sent during diagnostic re-fires |
184
- | `fluent-custom-code` | Source code edits |
185
- | `fluent-module-scaffold` | Module skeleton creation |
186
- | `fluent-version-manage` | Version bumps, CHANGELOG updates, git tags |
187
- | `fluent-pre-deploy-check` | Pre-deploy gate results |
188
- | `fluent-session-audit-export` | Consumes same tracking data for compliance JSON |
189
-
190
- ### Edge Cases
191
-
192
- - **Dry runs:** `event.send` with `dryRun: true` and `graphql.introspect` are NOT tracked (no state change).
193
- - **Failed writes:** Track with outcome=FAILED so the user knows what was attempted.
194
- - **Multi-retailer sessions:** Group changes under separate retailer headers.
195
- - **No changes made:** Report "No environment or code changes were made in this session."
1
+ ---
2
+ name: fluent-session-summary
3
+ description: Track and summarize all code and Fluent environment changes made during a session. Maintains a running change log and produces a structured audit report (Text or JSON). Triggers on "session summary", "what did we change", "change summary", "show changes", "export audit".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write
6
+ argument-hint: [show|reset|export --json]
7
+ ---
8
+
9
+ # Session Change Tracking
10
+
11
+ Track ALL changes made during a session — both code modifications and Fluent Commerce environment mutations — and produce a structured audit summary on demand.
12
+
13
+ ## Tracking Protocol Ownership
14
+
15
+ This skill owns the session change tracking log format and protocol. The log is the single source of truth for all session changes.
16
+
17
+ `/fluent-session-audit-export` consumes this log to produce compliance-grade JSON exports. Both skills MUST use the same log entries — there is no separate tracking mechanism. Changes are recorded once by this skill's protocol; the audit-export skill reads them.
18
+
19
+ If extending the tracking format (new change types, new fields), update this skill first, then update `/fluent-session-audit-export` to consume the new format.
20
+
21
+ ## Behaviour
22
+
23
+ This is a **cross-cutting concern**, not a phase-specific skill. It applies alongside every other skill.
24
+
25
+ ### Tracking Log Ownership
26
+
27
+ This skill (`/fluent-session-summary`) **owns the tracking protocol** — it defines what to track, when to present, and the output format. All other skills that perform write operations contribute entries to this log as they execute.
28
+
29
+ `/fluent-session-audit-export` **consumes the same tracking data** to produce compliance-grade JSON exports with traceability matrices and rollback commands. It does not maintain a separate tracking log — both skills share the same running session log.
30
+
31
+ ### What to Track
32
+
33
+ **Fluent environment changes (live account):**
34
+ - GraphQL mutations executed (entity type, ref/id, fields changed)
35
+ - Workflows deployed or uploaded (name, version, retailer)
36
+ - Settings created or updated (key, context, value summary)
37
+ - Events sent via `event.send` (name, entity type, entity ref, sync/async, outcome)
38
+ - Modules deployed via CLI (name, version, retailer)
39
+ - Batch jobs created and sent (job name, entity type, record count, outcome)
40
+ - Entities created or updated (locations, networks, catalogues, carriers, users, orders, fulfilments, inventory positions, products, virtual catalogues, etc.)
41
+
42
+ **Code changes (local workspace):**
43
+ - Files created, modified, or deleted (path + brief description)
44
+ - Workflow JSON edits (ruleset added/removed, trigger changed, state added)
45
+ - Rule classes scaffolded or modified
46
+ - Git commits made (hash, message, repo)
47
+ - Git pushes (repo, branch, remote)
48
+
49
+ **Skill invocations (agent decision trail):**
50
+ - Skill name invoked (e.g., `/fluent-rule-scaffold`, `/fluent-build`)
51
+ - Invocation timestamp
52
+ - Key arguments passed (profile, retailer, entity type, module name NOT full file contents)
53
+ - Outcome: `completed` | `failed` | `skipped` (with reason)
54
+ - Downstream skill recommended (from Handoff section, if any)
55
+
56
+ **MCP tool calls (API-level operations):**
57
+ - Tool name (e.g., `event.send`, `graphql.query`, `entity.create`, `workflow.upload`)
58
+ - Entity type and ref targeted
59
+ - Outcome: `ok: true/false`
60
+ - Whether it was a read (query/list/get) or write (mutation/send/create/update/deploy)
61
+ - Read-only tool calls are tracked when `--include-readonly` is specified; write tool calls are always tracked
62
+
63
+ **Decision trail (why the agent chose a path):**
64
+ - Decision timestamp + step id
65
+ - Trigger (user request, workflow gate, error recovery, or handoff)
66
+ - Options considered (2-4 short labels)
67
+ - Selected option + rationale
68
+ - Confidence (`high` | `medium` | `low`) and assumptions list
69
+
70
+ **Read-only operations are NOT tracked as state changes** — queries, downloads, analysis, introspection, event listing, and diagnostics do not appear in Environment/Code change counts. They can still be listed under `MCP Tool Calls` when `--include-readonly` is enabled.
71
+
72
+ ### When to Present
73
+
74
+ - When the user asks: "what did we change?", "summary", "show changes", "wrap up", or invokes `/fluent-session-summary`
75
+ - Proactively before ending a session that involved significant changes (3+ write operations)
76
+ - After completing a multi-step task (e.g., build-deploy-test cycle)
77
+
78
+ ### Text Summary Format (Default)
79
+
80
+ ```markdown
81
+ ## Session Change Summary
82
+
83
+ **Profile:** <PROFILE> | **Account:** <account> | **Retailer:** <RETAILER_REF> (ID <N>)
84
+ **Duration:** <first change time> - <last change time>
85
+
86
+ ### Environment Changes
87
+ | # | Action | Type | Ref / Key | Details |
88
+ |---|--------|------|-----------|---------|
89
+ | 1 | Created | Setting | <SETTING_KEY_1> | context=RETAILER:<RETAILER_ID>, value=https://... |
90
+ | 2 | Created | Order | <ORDER_REF_1> | type=<ORDER_SUBTYPE>, status=CREATED |
91
+ | 3 | Sent Event | <EVENT_NAME_1> | <ENTITY_TYPE>/<ORDER_REF_1> | async, SUCCESS |
92
+ | 4 | Mutation | Order | <ORDER_REF_1> | status <STATUS_FROM> -> <STATUS_TO> |
93
+ | 5 | Deployed | Workflow | <WORKFLOW_NAME> | v<WORKFLOW_VERSION> -> retailer <RETAILER_REF> |
94
+ | 6 | Deployed | Module | <MODULE_NAME> | v<VERSION> -> retailer <RETAILER_REF> |
95
+ | 7 | Batch | Product | <BATCH_JOB_ID> | <RECORD_COUNT> records, COMPLETE |
96
+
97
+ ### Code Changes
98
+ | # | Action | Path | Details |
99
+ |---|--------|------|---------|
100
+ | 1 | Modified | workflows/<WORKFLOW_FILE>.json | Added ruleset <RULESET_NAME> |
101
+ | 2 | Created | src/.../<RULE_CLASS>.java | New rule class + test |
102
+ | 3 | Modified | resources/module.json | Registered <RULE_CLASS> |
103
+ | 4 | Committed | <REPO_NAME> | <COMMIT_HASH> - feat: <FEATURE_DESCRIPTION> |
104
+ | 5 | Pushed | <REPO_NAME> | <BRANCH_NAME> -> <REMOTE_NAME>/<BRANCH_NAME> |
105
+
106
+ ### Skill Invocations
107
+ | # | Timestamp | Skill | Arguments | Outcome | Next |
108
+ |---|-----------|-------|-----------|---------|------|
109
+ | 1 | 09:00 | /fluent-rule-scaffold | <RULE_CLASS>, <ENTITY_TYPE> | completed | /fluent-build |
110
+ | 2 | 09:45 | /fluent-build | <MODULE_NAME> | completed | /fluent-pre-deploy-check |
111
+ | 3 | 10:00 | /fluent-pre-deploy-check | <MODULE_NAME> <VERSION> | completed (READY) | /fluent-module-deploy |
112
+
113
+ ### Decision Trail
114
+ | # | Timestamp | Trigger | Options | Selected | Rationale | Confidence |
115
+ |---|-----------|---------|---------|----------|-----------|------------|
116
+ | 1 | 08:58 | User asks for deployment readiness | Build only, Build+Checklist | Build+Checklist | Prevent unsafe deploy without gate evidence | high |
117
+ | 2 | 09:10 | Workflow mismatch detected | Re-download workflow, Patch in place | Re-download workflow | Avoid patching stale baseline | high |
118
+ | 3 | 09:40 | Build failure on missing setting | Retry build, Fix setting first | Fix setting first | Root cause is config, retry would fail again | medium |
119
+
120
+ ### MCP Tool Calls
121
+ | # | Timestamp | Tool | Target | Write? | Outcome |
122
+ |---|-----------|------|--------|--------|---------|
123
+ | 1 | 09:12 | setting.upsert | <SETTING_KEY_2> | Yes | ok |
124
+ | 2 | 10:02 | workflow.upload | <WORKFLOW_NAME> | Yes | ok |
125
+ | 3 | 10:15 | event.send | <ENTITY_TYPE>/<ENTITY_REF_1> | Yes | ok |
126
+
127
+ ### Totals
128
+ | Category | Count |
129
+ |----------|-------|
130
+ | GraphQL mutations | N |
131
+ | Events sent | N |
132
+ | Settings changed | N |
133
+ | Workflows deployed | N |
134
+ | Modules deployed | N |
135
+ | Batch jobs | N |
136
+ | Files modified | N |
137
+ | Git commits | N |
138
+ | Skills invoked | N |
139
+ | MCP tool calls (write) | N |
140
+ | Decision trail entries | N |
141
+
142
+ ### Irreversible Actions
143
+ > List any destructive or hard-to-reverse changes here (entity deletions, workflow version overwrites, forced re-deploys). Flag prominently so the user is aware.
144
+ ```
145
+
146
+ ### JSON Export Format (`export --json`)
147
+
148
+ > **For compliance-grade exports** with traceability matrices, rollback commands, and external system mapping, use `/fluent-session-audit-export`. This quick JSON export is a lightweight alternative for simple session records.
149
+
150
+ When the user asks to "export audit" or runs with `export --json`, generate a JSON file (e.g., `session-audit-<TIMESTAMP>.json`) with this structure:
151
+
152
+ <!-- Validate Mermaid blocks per /fluent-mermaid-validate rules -->
153
+ ```mermaid
154
+ classDiagram
155
+ class SessionAudit {
156
+ String session_id
157
+ String timestamp
158
+ Target target
159
+ Changes changes
160
+ String summary
161
+ }
162
+ class Target {
163
+ String profile
164
+ String retailer
165
+ String account
166
+ }
167
+ class Changes {
168
+ CodeChange[] code
169
+ EnvChange[] environment
170
+ }
171
+ class CodeChange {
172
+ String timestamp
173
+ String action
174
+ String file
175
+ String description
176
+ }
177
+ class EnvChange {
178
+ String timestamp
179
+ String action
180
+ String type
181
+ String ref
182
+ String details
183
+ String outcome
184
+ }
185
+
186
+ SessionAudit *-- Target
187
+ SessionAudit *-- Changes
188
+ Changes *-- CodeChange
189
+ Changes *-- EnvChange
190
+ ```
191
+
192
+ ```json
193
+ {
194
+ "session_id": "UUID",
195
+ "timestamp": "ISO-8601",
196
+ "target": {
197
+ "profile": "PROFILE_NAME",
198
+ "retailer": "RETAILER_REF",
199
+ "account": "ACCOUNT_NAME"
200
+ },
201
+ "changes": {
202
+ "code": [
203
+ { "timestamp": "ISO", "action": "modified", "file": "path/to/file", "description": "Added ruleset" },
204
+ { "timestamp": "ISO", "action": "created", "file": "path/to/file", "description": "New rule class" }
205
+ ],
206
+ "environment": [
207
+ { "timestamp": "ISO", "action": "mutation", "type": "ORDER", "ref": "ORD-123", "details": "status -> BOOKED" },
208
+ { "timestamp": "ISO", "action": "event", "name": "ConfirmPick", "entity": "FULFILMENT", "ref": "FUL-123", "outcome": "SUCCESS" }
209
+ ],
210
+ "skillInvocations": [
211
+ { "timestamp": "ISO", "skill": "/fluent-build", "args": { "profile": "<PROFILE>" }, "outcome": "completed", "next": "/fluent-pre-deploy-check" }
212
+ ],
213
+ "toolCalls": [
214
+ { "timestamp": "ISO", "tool": "event.send", "target": "ORDER/ORD-123", "write": true, "outcome": "ok" }
215
+ ],
216
+ "decisionTrail": [
217
+ {
218
+ "timestamp": "ISO",
219
+ "trigger": "Build failed",
220
+ "options": ["retry", "fix-setting", "rollback"],
221
+ "selected": "fix-setting",
222
+ "rationale": "Missing setting is deterministic root cause",
223
+ "confidence": "high",
224
+ "assumptions": []
225
+ }
226
+ ]
227
+ },
228
+ "summary": "Brief text summary of the session goals and outcomes."
229
+ }
230
+ ```
231
+
232
+ ### Tracking Protocol
233
+
234
+ 1. **At skill entry:** Append a `skillInvocation.start` record with skill name + sanitized arguments.
235
+ 2. **As tool calls execute:** Append `toolCall` records (write always, read only when `--include-readonly` is enabled).
236
+ 3. **At decision points:** Append `decisionTrail` records whenever the agent chooses between multiple valid paths (e.g., retry vs fix root cause, direct deploy vs pre-deploy check).
237
+ 4. **On write operations:** Append state changes (mutation, event send, deploy, file edit, commit) immediately. Do not reconstruct later.
238
+ 5. **At skill exit:** Mark invocation outcome (`completed`/`failed`/`skipped`) and recommended next skill.
239
+ 6. **On `/fluent-session-summary show`:** Present the full text table.
240
+ 7. **On `/fluent-session-summary export --json`:** Write the JSON artifact to the workspace root.
241
+ 8. **On `/fluent-session-summary reset`:** Clear the running log (start fresh, e.g., when switching accounts mid-session).
242
+ 9. **Group by account/retailer** if the session spans multiple profiles or retailers.
243
+ 10. **Include outcome** where known (SUCCESS, FAILED, NO_MATCH) — especially for events.
244
+ 11. **For mutations**, note the key fields changed rather than full payloads.
245
+ 12. **For workflow deploys**, note the version number deployed.
246
+
247
+ ### Integration with Other Skills
248
+
249
+ Every skill that performs write operations should contribute to this log:
250
+
251
+ | Skill | Tracked actions |
252
+ |-------|----------------|
253
+ | `fluent-workflow-builder` | Workflow JSON edits (local file changes) |
254
+ | `fluent-build` | Version bumps, module packaging |
255
+ | `fluent-module-deploy` | Module installs to retailers |
256
+ | `fluent-workflow-deploy` | Workflow uploads to retailers |
257
+ | `fluent-settings` | Setting create/update mutations |
258
+ | `fluent-retailer-config` | Entity creation (locations, networks, catalogues, etc.) |
259
+ | `fluent-test-data` | Test entity creation |
260
+ | `fluent-e2e-test` | Events sent, entities created during test |
261
+ | `fluent-rule-scaffold` | New Java classes and module.json changes |
262
+ | `fluent-job-batch` | Batch job creation, record sends |
263
+ | `fluent-trace` | Events sent during diagnostic re-fires |
264
+ | `fluent-custom-code` | Source code edits |
265
+ | `fluent-module-scaffold` | Module skeleton creation |
266
+ | `fluent-version-manage` | Version bumps, CHANGELOG updates, git tags |
267
+ | `fluent-pre-deploy-check` | Pre-deploy gate results |
268
+ | `fluent-session-audit-export` | Consumes same tracking data for compliance JSON |
269
+ | `fluent-archive` | Archives features — status transitions tracked |
270
+ | `fluent-rollback` | Rollback operations tracked as changes |
271
+ | `fluent-feature-status` | Complementary — feature lifecycle vs session changes |
272
+
273
+ ### Centralized Instrumentation Contract
274
+
275
+ All skills should emit tracking records through one shared capture path:
276
+
277
+ ```
278
+ track.skillStart(skillName, argsSanitized)
279
+ track.toolCall(toolName, target, write, outcome, readonly)
280
+ track.decision(trigger, options, selected, rationale, confidence, assumptions)
281
+ track.change(category, action, target, details, reversible, outcome)
282
+ track.skillEnd(skillName, outcome, nextSkill)
283
+ ```
284
+
285
+ Rules:
286
+ - Do not duplicate logs in each skill; use the shared tracker.
287
+ - Keep arguments and payloads sanitized (no secrets, no large blobs).
288
+ - Preserve chronological order across all categories.
289
+ - Session summary and session audit export must read from this exact shared log.
290
+
291
+ ### Skill Handoff Convention
292
+
293
+ All implementation skills should end their output with a structured "Recommended Next Steps" table to enable consistent agent-driven sequencing:
294
+
295
+ | Priority | Skill | Reason |
296
+ |----------|-------|--------|
297
+ | 1 | `/fluent-workflow-analyzer` | Validate modified workflow |
298
+ | 2 | `/fluent-pre-deploy-check` | Run pre-deployment validation |
299
+
300
+ This convention replaces ad-hoc prose recommendations with a machine-scannable format.
301
+
302
+ ### Error Reporting Convention
303
+
304
+ Skills should report errors using a consistent table format:
305
+
306
+ | Severity | Code | Message | Skill | Remediation |
307
+ |----------|------|---------|-------|-------------|
308
+ | CRITICAL | DEPLOY_BLOCKED | Pre-deploy check failed | /fluent-module-deploy | Run /fluent-pre-deploy-check |
309
+ | HIGH | BUILD_FAILED | Maven compilation error | /fluent-build | Fix compilation errors |
310
+ | MEDIUM | SETTINGS_MISSING | Required setting not found | /fluent-settings | Create missing setting |
311
+
312
+ ### Edge Cases
313
+
314
+ - **Dry runs:** `event.send` with `dryRun: true` and `graphql.introspect` are NOT tracked (no state change).
315
+ - **Failed writes:** Track with outcome=FAILED so the user knows what was attempted.
316
+ - **Multi-retailer sessions:** Group changes under separate retailer headers.
317
+ - **No changes made:** Report "No environment or code changes were made in this session."
318
+ - **Skill invocations with no changes:** A skill like `/fluent-workflow-analyzer` may be invoked but produce no tracked changes (read-only). It still appears in the Skill Invocations table but contributes 0 to change counts.
319
+ - **MCP tool dryRun calls:** Tool calls with `dryRun: true` (e.g., `event.send`, `graphql.batchMutate`) are NOT tracked as writes. They appear in tool calls only if `--include-readonly` is specified.
320
+ - **No explicit branching decision occurred:** Do not force decision records. `decisionTrail` can be empty.