@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,632 +1,880 @@
1
- ---
2
- name: fluent-session-audit-export
3
- description: Export a structured JSON audit trail of all session changes. Covers code modifications, Fluent environment mutations, events sent, deployments, and compliance metadata. Machine-readable companion to /fluent-session-summary. Triggers on "export audit", "session audit", "audit trail", "export changes", "compliance report".
4
- user-invocable: true
5
- allowed-tools: Bash, Read, Write, Glob, Grep
6
- argument-hint: [--format json|jsonl] [--output <path>] [--include-readonly]
7
- ---
8
-
9
- # Session Audit Export
10
-
11
- Export the session's complete change history as a structured JSON document. Captures code changes, Fluent environment mutations, events sent, deployments, test results, and compliance metadata in a machine-readable format.
12
-
13
- ## Purpose
14
-
15
- This skill produces the **machine-readable audit trail** for the ADD Feedback Loop (Phase 7) and compliance reporting. Every write operation performed during a session is captured as a typed change record with full provenance: which tool was called, which skill invoked it, what the previous and new state was, and whether the action is reversible.
16
-
17
- The JSON output is designed for consumption by CI/CD pipelines, audit systems, Jira integrations, Confluence deployment records, and the ADD feedback loop's scope-completion measurement.
18
-
19
- ## Ownership Boundary
20
-
21
- This skill owns the **JSON export format** and the serialization of tracked changes into the audit document schema.
22
-
23
- It does NOT own the tracking itself. The running change log is a cross-cutting concern shared with `/fluent-session-summary`. Both skills read the same underlying tracking data maintained by the agent throughout the session. This skill never maintains a separate tracking log.
24
-
25
- Related skills:
26
- - Human-readable session report -> `/fluent-session-summary`
27
- - Scope document and task tracking -> `/fluent-scope-decompose`
28
- - Pre-deploy gate results -> `/fluent-pre-deploy-check`
29
- - Version lifecycle -> `/fluent-version-manage`
30
-
31
- ## When to Use
32
-
33
- - **End of session** -- export a complete record of everything that was changed
34
- - **CI/CD integration** -- produce a gate artifact that downstream pipelines can parse
35
- - **Compliance reporting** -- generate traceability from user stories to deployed changes
36
- - **ADD feedback loop** -- measure scope completion (tasks completed vs total)
37
- - **Post-incident review** -- reconstruct exactly what was deployed and when
38
- - **Handover documentation** -- provide the next engineer with a precise change manifest
39
-
40
- ## Relationship to `/fluent-session-summary`
41
-
42
- | Aspect | `/fluent-session-summary` | `/fluent-session-audit-export` |
43
- |--------|--------------------------|-------------------------------|
44
- | Format | Human-readable Markdown tables | Machine-readable JSON / JSONL |
45
- | Audience | Developer reviewing session in terminal | CI/CD pipelines, audit systems, feedback loops |
46
- | Detail level | Grouped summary tables with counts | Per-operation records with full metadata |
47
- | Compliance | Flags irreversible actions in prose | Story-to-change traceability matrix, pre-deploy checklist cross-ref |
48
- | Rollback info | Lists irreversible actions prominently | Includes concrete rollback command strings per change |
49
- | Previous/new values | Key fields noted in "Details" column | Structured `previousValue` / `newValue` fields |
50
- | Tool attribution | Not included | MCP tool name and skill name per change |
51
- | Invocation | `/fluent-session-summary show` | `/fluent-session-audit-export` |
52
- | Data source | Shared tracking log | Same shared tracking log |
53
-
54
- Both skills consume the same underlying change tracking data. They MUST NOT maintain separate tracking logs. The audit export reads the same data that session-summary presents, then serializes it into the structured schema below.
55
-
56
- ## Inputs
57
-
58
- | Parameter | Required | Default | Description |
59
- |-----------|----------|---------|-------------|
60
- | `--format` | No | `json` | Output format: `json` (single document) or `jsonl` (one change record per line) |
61
- | `--output` | No | Auto-generated path | Output file path. Default: `accounts/<PROFILE>/analysis/session-audit/<sessionId>.audit.json` |
62
- | `--include-readonly` | No | `false` | Include read-only operations (queries, downloads, introspection). By default only write operations are tracked. |
63
- | `--profile` | No | Active profile | Profile context for the audit. Determines the output directory. |
64
-
65
- ## Audit Document JSON Schema
66
-
67
- The complete schema for the exported JSON document. Every field, type, and enum value is specified.
68
-
69
- ### Top-Level Structure
70
-
71
- ```json
72
- {
73
- "$schema": "fluent-session-audit/v1",
74
- "sessionId": "string (UUID v4)",
75
- "startedAt": "string (ISO-8601 timestamp of first tracked change)",
76
- "endedAt": "string (ISO-8601 timestamp of last tracked change)",
77
- "context": {
78
- "profile": "string (Fluent CLI profile name, e.g. HMDEV)",
79
- "account": "string (API base URL, e.g. hmdev.sandbox.api.fluentretail.com)",
80
- "retailer": {
81
- "ref": "string (retailer reference, e.g. HM_TEST)",
82
- "id": "number (retailer ID, e.g. 5)"
83
- },
84
- "user": "string (authenticated username, e.g. admin@hmdev)",
85
- "agentModel": "string (AI model identifier, e.g. claude-opus-4-6)"
86
- },
87
- "summary": {
88
- "codeChanges": "number (total CODE category changes)",
89
- "environmentMutations": "number (total ENVIRONMENT category changes)",
90
- "eventsSent": "number (total EVENT actions)",
91
- "deploymentsCompleted": "number (total DEPLOY actions)",
92
- "testsRun": "number (total TEST category changes)",
93
- "testsPassed": "number (tests with result=PASS)",
94
- "testsFailed": "number (tests with result=FAIL)",
95
- "irreversibleActions": "number (changes where reversible=false)"
96
- },
97
- "changes": ["array of Change objects (see below)"],
98
- "compliance": {
99
- "scopeDocumentRef": "string|null (path to scope document if available)",
100
- "tasksCompleted": "number (completed tasks from scope decomposition)",
101
- "tasksTotal": "number (total tasks from scope decomposition)",
102
- "traceability": {
103
- "<storyRef>": {
104
- "tasks": ["array of task IDs (e.g. T-001, T-002)"],
105
- "status": "string (complete|partial|not_started)",
106
- "changes": ["array of seq numbers from the changes array"]
107
- }
108
- },
109
- "preDeployChecklist": "string|null (path to pre-deploy checklist JSON if available)",
110
- "irreversibleActions": [
111
- {
112
- "seq": "number (references changes[].seq)",
113
- "description": "string (human-readable explanation)",
114
- "risk": "string (LOW|MEDIUM|HIGH|CRITICAL)"
115
- }
116
- ]
117
- }
118
- }
119
- ```
120
-
121
- ### Change Object Schema
122
-
123
- Each entry in the `changes` array has this structure:
124
-
125
- ```json
126
- {
127
- "seq": "number (1-based sequential identifier, monotonically increasing)",
128
- "timestamp": "string (ISO-8601 timestamp of when the change was made)",
129
- "category": "string (CODE|ENVIRONMENT|TEST|CONFIG)",
130
- "action": "string (depends on category, see table below)",
131
- "target": {
132
- "type": "string (depends on category and action, see table below)",
133
- "...additional fields depending on type"
134
- },
135
- "details": "string (human-readable description of the change)",
136
- "reversible": "boolean (true if the change can be undone)",
137
- "rollbackCommand": "string|undefined (concrete command to reverse the change, only when reversible=true and a command is known)",
138
- "outcome": "string|undefined (SUCCESS|FAILED|NO_MATCH|PENDING -- for events and mutations)",
139
- "previousValue": "any|undefined (previous state, for mutations and setting updates)",
140
- "newValue": "any|undefined (new state, for mutations and setting updates)",
141
- "diff": {
142
- "linesAdded": "number",
143
- "linesRemoved": "number"
144
- },
145
- "result": "string|undefined (PASS|FAIL -- for TEST category)",
146
- "tool": "string|undefined (MCP tool name, e.g. event.send, entity.update, graphql.query)",
147
- "skill": "string|undefined (skill that triggered this change, e.g. fluent-e2e-test)",
148
- "storyRef": "string|undefined (user story identifier, e.g. US-301)"
149
- }
150
- ```
151
-
152
- Note: Fields marked `|undefined` are only present when applicable to the specific change type. The `diff` object is only present for CODE MODIFY actions.
153
-
154
- ### Target Object Shapes by Category
155
-
156
- **CODE targets:**
157
-
158
- | Action | target.type | Additional target fields |
159
- |--------|-------------|------------------------|
160
- | `CREATE` | `file` | `path` (string -- absolute file path) |
161
- | `MODIFY` | `file` | `path` (string -- absolute file path) |
162
- | `DELETE` | `file` | `path` (string -- absolute file path) |
163
- | `COMMIT` | `git` | `repo` (string), `branch` (string), `hash` (string -- short commit hash) |
164
- | `PUSH` | `git` | `repo` (string), `branch` (string), `remote` (string -- e.g. origin) |
165
-
166
- **ENVIRONMENT targets:**
167
-
168
- | Action | target.type | Additional target fields |
169
- |--------|-------------|------------------------|
170
- | `MUTATION` | `entity` | `entityType` (string -- ORDER, FULFILMENT, LOCATION, etc.), `entityRef` (string), `entityId` (string\|number), `fields` (string[] -- which fields were changed) |
171
- | `DEPLOY` | `module` | `name` (string), `version` (string), `retailer` (string) |
172
- | `DEPLOY` | `workflow` | `name` (string -- e.g. ORDER::HD), `version` (number), `retailer` (string) |
173
- | `EVENT` | `event` | `eventName` (string), `entityType` (string), `entityRef` (string), `mode` (string -- async\|sync) |
174
- | `BATCH` | `batch` | `jobName` (string), `jobId` (string), `entityType` (string), `recordCount` (number) |
175
-
176
- **TEST targets:**
177
-
178
- | Action | target.type | Additional target fields |
179
- |--------|-------------|------------------------|
180
- | `ASSERT` | `assertion` | `entityType` (string), `entityRef` (string), `expectedStatus` (string), `actualStatus` (string) |
181
- | `BUILD` | `build` | `command` (string -- e.g. mvn clean install), `exitCode` (number), `testCount` (number), `failureCount` (number) |
182
- | `VALIDATE` | `validation` | `validationType` (string -- module\|workflow\|environment), `target` (string -- what was validated) |
183
-
184
- **CONFIG targets:**
185
-
186
- | Action | target.type | Additional target fields |
187
- |--------|-------------|------------------------|
188
- | `SETTING_CREATE` | `setting` | `key` (string), `context` (string -- RETAILER\|ACCOUNT\|LOCATION), `contextId` (number) |
189
- | `SETTING_UPDATE` | `setting` | `key` (string), `context` (string), `contextId` (number) |
190
-
191
- ### Action Enum Values by Category
192
-
193
- | Category | Valid Actions |
194
- |----------|-------------|
195
- | `CODE` | `CREATE`, `MODIFY`, `DELETE`, `COMMIT`, `PUSH` |
196
- | `ENVIRONMENT` | `MUTATION`, `DEPLOY`, `EVENT`, `BATCH` |
197
- | `TEST` | `ASSERT`, `BUILD`, `VALIDATE` |
198
- | `CONFIG` | `SETTING_CREATE`, `SETTING_UPDATE` |
199
-
200
- ## Change Categories
201
-
202
- What falls under each category:
203
-
204
- | Category | Source Operations | Tracked From |
205
- |----------|-----------------|-------------|
206
- | `CODE` | File creates/edits/deletes, git commits, git pushes, workflow JSON edits, rule class scaffolding | File system operations via Write/Edit tools, git commands via Bash |
207
- | `ENVIRONMENT` | GraphQL mutations, entity CRUD, event sends, workflow uploads, module deploys, batch job creates/sends | MCP tool calls: `graphql.query` (mutations), `entity.create`, `entity.update`, `event.send`, `workflow.upload`, `batch.create`, `batch.send`, `graphql.batchMutate` |
208
- | `TEST` | Assertions on entity state, build results, module/workflow validation | MCP tool calls: `test.assert`, Bash `mvn` commands, `environment.validate` |
209
- | `CONFIG` | Setting creates and updates | MCP tool calls: `setting.upsert`, `setting.bulkUpsert` |
210
-
211
- ## Capture Mechanism
212
-
213
- The audit trail is built from the same tracking protocol used by `/fluent-session-summary`. The agent maintains a running log of write operations throughout the session. Both skills read from this same log.
214
-
215
- ```
216
- 1. DURING THE SESSION:
217
- - After each write operation (mutation, event send, deploy, file edit, commit),
218
- the agent appends it to the running change log
219
- - This is the same protocol described in /fluent-session-summary
220
- - Read-only operations (queries, downloads, introspection) are NOT logged
221
- unless --include-readonly is specified
222
-
223
- 2. ON /fluent-session-audit-export INVOCATION:
224
- a. Compile all tracked changes into the JSON schema
225
- b. For each ENVIRONMENT change, capture:
226
- - MCP tool name used (e.g. event.send, entity.update)
227
- - Response status (ok/error mapped to outcome)
228
- - Previous vs new state where available
229
- c. For each CODE change:
230
- - Absolute file path
231
- - Action type (CREATE/MODIFY/DELETE)
232
- - Line count delta (if available)
233
- - Associated skill name
234
- d. For each TEST change:
235
- - Assertion details and PASS/FAIL result
236
- - Build results with test counts
237
- e. For each CONFIG change:
238
- - Setting key, context, contextId
239
- - Previous and new values
240
- f. Add compliance section if scope document is available
241
- g. Assign sequential seq numbers (1-based, monotonically increasing)
242
- h. Compute summary counts
243
-
244
- 3. WRITE to output path:
245
- Default: accounts/<PROFILE>/analysis/session-audit/<sessionId>.audit.json
246
- Or: user-specified --output path
247
-
248
- 4. REPORT: Print the output file path and summary counts to the terminal
249
- ```
250
-
251
- ## Sensitive Value Redaction
252
-
253
- Certain values MUST be redacted before writing the audit document:
254
-
255
- **Always redact (replace with `"[REDACTED]"`):**
256
- - Access tokens and bearer tokens
257
- - Passwords and client secrets
258
- - API keys
259
- - PII: customer email addresses, phone numbers, full names in entity attributes
260
- - Setting values containing `password`, `secret`, `token`, `key` in the setting name
261
-
262
- **Never redact (keep as-is):**
263
- - Entity refs, IDs, and statuses
264
- - Event names and entity types
265
- - File paths
266
- - Version numbers
267
- - Workflow names and ruleset names
268
- - Setting keys (the name itself, not secret values)
269
- - Retailer refs and IDs
270
- - User story references
271
- - Git commit hashes and branch names
272
-
273
- ## Rollback Commands
274
-
275
- For each reversible change, include a concrete `rollbackCommand` string when one can be determined:
276
-
277
- | Action | Rollback Command Pattern |
278
- |--------|------------------------|
279
- | `DEPLOY` (module) | `fluent module install -p <PROFILE> -r <RETAILER> -m <module-name>:<previousVersion>` |
280
- | `DEPLOY` (workflow) | Re-upload the previous version workflow JSON via `workflow.upload` |
281
- | `MUTATION` (entity status) | `entity.update({ entityType, id, fields: { status: "<previousValue>" } })` |
282
- | `SETTING_CREATE` | Delete the setting (note: no MCP tool for this; manual via GraphQL) |
283
- | `SETTING_UPDATE` | `setting.upsert({ name, value: "<previousValue>", context, contextId })` |
284
- | `COMMIT` | `git revert <hash>` |
285
- | `PUSH` | `git push origin <branch> --force` (flag as destructive) |
286
- | `EVENT` | Not reversible -- events cannot be un-sent |
287
- | `BATCH` | Not reversible -- batch records are processed |
288
- | `CODE CREATE` | `rm <path>` or `git checkout -- <path>` |
289
- | `CODE MODIFY` | `git checkout -- <path>` |
290
-
291
- Changes with `reversible: false` do not have a `rollbackCommand` field.
292
-
293
- ## Output Paths
294
-
295
- Default output location follows the accounts directory convention:
296
-
297
- ```
298
- accounts/<PROFILE>/analysis/session-audit/<sessionId>.audit.json
299
- ```
300
-
301
- When `--output` is specified, write to that path instead.
302
-
303
- If the output directory does not exist, create it.
304
-
305
- ## JSONL Format Option
306
-
307
- When `--format jsonl` is specified, output one JSON object per line instead of a single document:
308
-
309
- ```
310
- Line 1: {"$schema":"fluent-session-audit/v1","sessionId":"...","startedAt":"...","endedAt":"...","context":{...},"summary":{...},"compliance":{...}}
311
- Line 2: {"seq":1,"timestamp":"...","category":"CODE","action":"CREATE","target":{...},...}
312
- Line 3: {"seq":2,"timestamp":"...","category":"CODE","action":"MODIFY","target":{...},...}
313
- ...
314
- ```
315
-
316
- The first line is the session metadata (everything except the `changes` array). Each subsequent line is one change record. This format supports streaming consumption and line-by-line processing by CI/CD tools.
317
-
318
- The file extension for JSONL output is `.audit.jsonl`.
319
-
320
- ## External System Mapping
321
-
322
- The audit JSON is designed for consumption by external systems:
323
-
324
- | System | Field Mapping | Consumption Pattern |
325
- |--------|--------------|-------------------|
326
- | **Jira** | `changes[].storyRef` maps to Jira issue keys (e.g. US-301 -> PROJ-301) | Create work log entries from changes; update story status based on `compliance.traceability[].status` |
327
- | **Confluence** | Full audit document | Generate deployment record pages; attach as artifact to release pages |
328
- | **CI/CD** | `compliance.irreversibleActions`, `summary.testsFailed` | Parse audit as deployment gate artifact; fail pipeline if irreversible action count exceeds threshold or tests failed |
329
- | **Git** | `changes[].target` where `target.type == "git"` | Cross-reference COMMIT entries with PR metadata; verify all commits are in a merged PR |
330
- | **ADD Feedback Loop** | `compliance.tasksCompleted` / `compliance.tasksTotal` | Measure scope completion percentage; track velocity across sessions |
331
-
332
- ## Edge Cases
333
-
334
- - **No changes made:** Output a valid audit document with an empty `changes` array and all summary counts at 0. Set `startedAt` and `endedAt` to the current timestamp.
335
- - **Multi-retailer sessions:** If the session spans multiple profiles or retailers, produce one audit document per profile/retailer combination. Each document's `context` reflects its specific target.
336
- - **Failed writes:** Track with `outcome: "FAILED"` in the change record. Failed operations are still part of the audit trail -- they represent attempted changes.
337
- - **Dry-run operations:** `event.send` with `dryRun: true`, `entity.create` with `dryRun: true`, and `workflow.upload` with `dryRun: true` are NOT tracked. Dry runs do not change state.
338
- - **Partial sessions:** If the agent session ends abnormally (timeout, error), the audit captures everything tracked up to that point. The `endedAt` reflects the last tracked change, not the session end.
339
- - **No scope document:** If no scope decomposition was run, set `compliance.scopeDocumentRef` to `null`, `tasksCompleted` and `tasksTotal` to 0, and `traceability` to an empty object.
340
- - **No pre-deploy checklist:** If no pre-deploy check was run, set `compliance.preDeployChecklist` to `null`.
341
- - **Setting bulk upserts:** Each individual setting in a `setting.bulkUpsert` call is tracked as a separate CONFIG change record.
342
-
343
- ## Integration with `/fluent-session-summary`
344
-
345
- Both skills share the same tracking protocol and read the same data:
346
-
347
- | Concern | Implementation |
348
- |---------|---------------|
349
- | Tracking log | Single running log maintained by the agent during the session |
350
- | Data ownership | Neither skill owns the log -- it is a cross-cutting concern |
351
- | Invocation independence | Either skill can be invoked without the other |
352
- | Consistent counts | Both skills must produce the same counts for the same data |
353
- | Ordering | Both skills order changes chronologically by timestamp |
354
-
355
- When both are invoked in the same session, the text summary from `/fluent-session-summary` and the JSON from `/fluent-session-audit-export` represent the same underlying changes. Any discrepancy is a bug.
356
-
357
- ## Full Example Audit Document
358
-
359
- This example shows a realistic session that scaffolds a rule, configures settings, deploys a module and workflow, runs an E2E test, and commits the code.
360
-
361
- ```json
362
- {
363
- "$schema": "fluent-session-audit/v1",
364
- "sessionId": "a3f1c9e2-7b4d-4e8a-9f12-d6c3a8b5e7f1",
365
- "startedAt": "2026-02-23T09:00:12Z",
366
- "endedAt": "2026-02-23T11:42:08Z",
367
- "context": {
368
- "profile": "HMDEV",
369
- "account": "hmdev.sandbox.api.fluentretail.com",
370
- "retailer": {
371
- "ref": "HM_TEST",
372
- "id": 5
373
- },
374
- "user": "admin@hmdev",
375
- "agentModel": "claude-opus-4-6"
376
- },
377
- "summary": {
378
- "codeChanges": 4,
379
- "environmentMutations": 3,
380
- "eventsSent": 2,
381
- "deploymentsCompleted": 2,
382
- "testsRun": 2,
383
- "testsPassed": 2,
384
- "testsFailed": 0,
385
- "irreversibleActions": 2
386
- },
387
- "changes": [
388
- {
389
- "seq": 1,
390
- "timestamp": "2026-02-23T09:00:12Z",
391
- "category": "CODE",
392
- "action": "CREATE",
393
- "target": {
394
- "type": "file",
395
- "path": "accounts/HMDEV/SOURCE/fluentcommerce-fc-module-hm-extensions/plugins/rules/hm-extensions/src/main/java/com/fluentcommerce/hm/CancelOrderRule.java"
396
- },
397
- "details": "New rule class: CancelOrderRule implementing order cancellation logic",
398
- "reversible": true,
399
- "rollbackCommand": "rm accounts/HMDEV/SOURCE/fluentcommerce-fc-module-hm-extensions/plugins/rules/hm-extensions/src/main/java/com/fluentcommerce/hm/CancelOrderRule.java",
400
- "skill": "fluent-rule-scaffold",
401
- "storyRef": "US-301"
402
- },
403
- {
404
- "seq": 2,
405
- "timestamp": "2026-02-23T09:05:33Z",
406
- "category": "CODE",
407
- "action": "MODIFY",
408
- "target": {
409
- "type": "file",
410
- "path": "accounts/HMDEV/SOURCE/fluentcommerce-fc-module-hm-extensions/resources/module.json"
411
- },
412
- "details": "Registered CancelOrderRule in provides[] array",
413
- "diff": {
414
- "linesAdded": 8,
415
- "linesRemoved": 0
416
- },
417
- "reversible": true,
418
- "rollbackCommand": "git checkout -- accounts/HMDEV/SOURCE/fluentcommerce-fc-module-hm-extensions/resources/module.json",
419
- "skill": "fluent-rule-scaffold",
420
- "storyRef": "US-301"
421
- },
422
- {
423
- "seq": 3,
424
- "timestamp": "2026-02-23T09:12:45Z",
425
- "category": "CONFIG",
426
- "action": "SETTING_CREATE",
427
- "target": {
428
- "type": "setting",
429
- "key": "WEBHOOK_CANCEL_ORDER_URL",
430
- "context": "RETAILER",
431
- "contextId": 5
432
- },
433
- "details": "Created webhook setting for order cancellation notifications",
434
- "previousValue": null,
435
- "newValue": "https://webhook.site/abc123-def456",
436
- "reversible": true,
437
- "rollbackCommand": "Delete setting WEBHOOK_CANCEL_ORDER_URL via GraphQL mutation deleteSetting",
438
- "tool": "setting.upsert",
439
- "skill": "fluent-settings"
440
- },
441
- {
442
- "seq": 4,
443
- "timestamp": "2026-02-23T09:45:18Z",
444
- "category": "TEST",
445
- "action": "BUILD",
446
- "target": {
447
- "type": "build",
448
- "command": "mvn clean install -f accounts/HMDEV/SOURCE/fluentcommerce-fc-module-hm-extensions/plugins/pom.xml",
449
- "exitCode": 0,
450
- "testCount": 42,
451
- "failureCount": 0
452
- },
453
- "details": "Maven build: 42 tests passed, 0 failures",
454
- "result": "PASS",
455
- "skill": "fluent-build"
456
- },
457
- {
458
- "seq": 5,
459
- "timestamp": "2026-02-23T10:02:07Z",
460
- "category": "ENVIRONMENT",
461
- "action": "DEPLOY",
462
- "target": {
463
- "type": "module",
464
- "name": "fc-module-hm-extensions",
465
- "version": "1.3.0",
466
- "retailer": "HM_TEST"
467
- },
468
- "details": "Module deployed via fluent module install",
469
- "previousVersion": "1.2.3",
470
- "reversible": true,
471
- "rollbackCommand": "fluent module install -p HMDEV -r HM_TEST -m fc-module-hm-extensions:1.2.3",
472
- "skill": "fluent-module-deploy"
473
- },
474
- {
475
- "seq": 6,
476
- "timestamp": "2026-02-23T10:08:34Z",
477
- "category": "ENVIRONMENT",
478
- "action": "DEPLOY",
479
- "target": {
480
- "type": "workflow",
481
- "name": "ORDER::HD",
482
- "version": 14,
483
- "retailer": "HM_TEST"
484
- },
485
- "details": "Workflow uploaded with new CancelOrder ruleset added",
486
- "previousVersion": 13,
487
- "reversible": true,
488
- "rollbackCommand": "Re-upload ORDER::HD version 13 JSON via workflow.upload",
489
- "tool": "workflow.upload",
490
- "skill": "fluent-workflow-builder"
491
- },
492
- {
493
- "seq": 7,
494
- "timestamp": "2026-02-23T10:15:50Z",
495
- "category": "ENVIRONMENT",
496
- "action": "EVENT",
497
- "target": {
498
- "type": "event",
499
- "eventName": "CreateOrder",
500
- "entityType": "ORDER",
501
- "entityRef": "HD_TEST_20260223_001",
502
- "mode": "async"
503
- },
504
- "details": "E2E test: created test order via CreateOrder event",
505
- "outcome": "SUCCESS",
506
- "reversible": false,
507
- "tool": "event.send",
508
- "skill": "fluent-e2e-test"
509
- },
510
- {
511
- "seq": 8,
512
- "timestamp": "2026-02-23T10:16:22Z",
513
- "category": "TEST",
514
- "action": "ASSERT",
515
- "target": {
516
- "type": "assertion",
517
- "entityType": "ORDER",
518
- "entityRef": "HD_TEST_20260223_001",
519
- "expectedStatus": "BOOKED",
520
- "actualStatus": "BOOKED"
521
- },
522
- "details": "Assert order status=BOOKED after ConfirmValidation cascade",
523
- "result": "PASS",
524
- "tool": "test.assert",
525
- "skill": "fluent-e2e-test"
526
- },
527
- {
528
- "seq": 9,
529
- "timestamp": "2026-02-23T10:22:11Z",
530
- "category": "ENVIRONMENT",
531
- "action": "EVENT",
532
- "target": {
533
- "type": "event",
534
- "eventName": "CancelOrder",
535
- "entityType": "ORDER",
536
- "entityRef": "HD_TEST_20260223_001",
537
- "mode": "async"
538
- },
539
- "details": "E2E test: cancelled test order via CancelOrder event",
540
- "outcome": "SUCCESS",
541
- "reversible": false,
542
- "tool": "event.send",
543
- "skill": "fluent-e2e-test"
544
- },
545
- {
546
- "seq": 10,
547
- "timestamp": "2026-02-23T10:22:45Z",
548
- "category": "ENVIRONMENT",
549
- "action": "MUTATION",
550
- "target": {
551
- "type": "entity",
552
- "entityType": "ORDER",
553
- "entityRef": "HD_TEST_20260223_001",
554
- "entityId": "48291",
555
- "fields": ["status"]
556
- },
557
- "details": "Order status confirmed CANCELLED via workflow processing",
558
- "previousValue": "BOOKED",
559
- "newValue": "CANCELLED",
560
- "outcome": "SUCCESS",
561
- "reversible": false,
562
- "tool": "graphql.query",
563
- "skill": "fluent-e2e-test"
564
- },
565
- {
566
- "seq": 11,
567
- "timestamp": "2026-02-23T11:40:30Z",
568
- "category": "CODE",
569
- "action": "COMMIT",
570
- "target": {
571
- "type": "git",
572
- "repo": "fluentcommerce-fc-module-hm-extensions",
573
- "branch": "feature/cancel-order",
574
- "hash": "a1b2c3d"
575
- },
576
- "details": "feat: add cancel order rule and workflow support",
577
- "reversible": true,
578
- "rollbackCommand": "git revert a1b2c3d"
579
- },
580
- {
581
- "seq": 12,
582
- "timestamp": "2026-02-23T11:42:08Z",
583
- "category": "CODE",
584
- "action": "PUSH",
585
- "target": {
586
- "type": "git",
587
- "repo": "fluentcommerce-fc-module-hm-extensions",
588
- "branch": "feature/cancel-order",
589
- "remote": "origin"
590
- },
591
- "details": "Pushed feature/cancel-order to origin",
592
- "reversible": true,
593
- "rollbackCommand": "git push origin feature/cancel-order --force"
594
- }
595
- ],
596
- "compliance": {
597
- "scopeDocumentRef": "scope/cancel-order.md",
598
- "tasksCompleted": 8,
599
- "tasksTotal": 10,
600
- "traceability": {
601
- "US-301": {
602
- "tasks": ["T-001", "T-002", "T-003", "T-004", "T-005"],
603
- "status": "complete",
604
- "changes": [1, 2, 3, 5, 6]
605
- },
606
- "US-302": {
607
- "tasks": ["T-006", "T-007", "T-008"],
608
- "status": "complete",
609
- "changes": [7, 8, 9, 10]
610
- },
611
- "US-303": {
612
- "tasks": ["T-009", "T-010"],
613
- "status": "not_started",
614
- "changes": []
615
- }
616
- },
617
- "preDeployChecklist": "accounts/HMDEV/analysis/pre-deploy/fc-module-hm-extensions-1.3.0.checklist.json",
618
- "irreversibleActions": [
619
- {
620
- "seq": 7,
621
- "description": "Event CreateOrder sent to ORDER/HD_TEST_20260223_001 -- cannot be un-sent",
622
- "risk": "LOW"
623
- },
624
- {
625
- "seq": 9,
626
- "description": "Event CancelOrder sent to ORDER/HD_TEST_20260223_001 -- cannot be un-sent",
627
- "risk": "LOW"
628
- }
629
- ]
630
- }
631
- }
632
- ```
1
+ ---
2
+ name: fluent-session-audit-export
3
+ description: Export a structured JSON audit trail of all session changes. Covers code modifications, Fluent environment mutations, events sent, deployments, and compliance metadata. Machine-readable companion to /fluent-session-summary. Triggers on "export audit", "session audit", "audit trail", "export changes", "compliance report".
4
+ user-invocable: true
5
+ allowed-tools: Bash, Read, Write, Glob, Grep
6
+ argument-hint: [--format json|jsonl] [--output <path>] [--include-readonly]
7
+ ---
8
+
9
+ # Session Audit Export
10
+
11
+ Export the session's complete change history as a structured JSON document. Captures code changes, Fluent environment mutations, events sent, deployments, test results, and compliance metadata in a machine-readable format.
12
+
13
+ ## Purpose
14
+
15
+ This skill produces the **machine-readable audit trail** for the ADD Feedback Loop (Phase 7) and compliance reporting. Every write operation performed during a session is captured as a typed change record with full provenance: which tool was called, which skill invoked it, what the previous and new state was, and whether the action is reversible.
16
+
17
+ The JSON output is designed for consumption by CI/CD pipelines, audit systems, Jira integrations, Confluence deployment records, and the ADD feedback loop's scope-completion measurement.
18
+
19
+ ## Ownership Boundary
20
+
21
+ This skill owns the **JSON export format** and the serialization of tracked changes into the audit document schema.
22
+
23
+ It does NOT own the tracking itself. The running change log is a cross-cutting concern shared with `/fluent-session-summary`. Both skills read the same underlying tracking data maintained by the agent throughout the session. This skill never maintains a separate tracking log.
24
+
25
+ Related skills:
26
+ - Human-readable session report -> `/fluent-session-summary`
27
+ - Scope document and task tracking -> `/fluent-scope-decompose`
28
+ - Pre-deploy gate results -> `/fluent-pre-deploy-check`
29
+ - Version lifecycle -> `/fluent-version-manage`
30
+
31
+ ## When to Use
32
+
33
+ - **End of session** -- export a complete record of everything that was changed
34
+ - **CI/CD integration** -- produce a gate artifact that downstream pipelines can parse
35
+ - **Compliance reporting** -- generate traceability from user stories to deployed changes
36
+ - **ADD feedback loop** -- measure scope completion (tasks completed vs total)
37
+ - **Post-incident review** -- reconstruct exactly what was deployed and when
38
+ - **Handover documentation** -- provide the next engineer with a precise change manifest
39
+
40
+ ## Relationship to `/fluent-session-summary`
41
+
42
+ | Aspect | `/fluent-session-summary` | `/fluent-session-audit-export` |
43
+ |--------|--------------------------|-------------------------------|
44
+ | Format | Human-readable Markdown tables | Machine-readable JSON / JSONL |
45
+ | Audience | Developer reviewing session in terminal | CI/CD pipelines, audit systems, feedback loops |
46
+ | Detail level | Grouped summary tables with counts | Per-operation records with full metadata |
47
+ | Compliance | Flags irreversible actions in prose | Story-to-change traceability matrix, pre-deploy checklist cross-ref |
48
+ | Rollback info | Lists irreversible actions prominently | Includes concrete rollback command strings per change |
49
+ | Previous/new values | Key fields noted in "Details" column | Structured `previousValue` / `newValue` fields |
50
+ | Tool attribution | Not included | MCP tool name and skill name per change |
51
+ | Invocation | `/fluent-session-summary show` | `/fluent-session-audit-export` |
52
+ | Data source | Shared tracking log | Same shared tracking log |
53
+
54
+ Both skills consume the same underlying change tracking data. They MUST NOT maintain separate tracking logs. The audit export reads the same data that session-summary presents, then serializes it into the structured schema below.
55
+
56
+ ## Inputs
57
+
58
+ | Parameter | Required | Default | Description |
59
+ |-----------|----------|---------|-------------|
60
+ | `--format` | No | `json` | Output format: `json` (single document) or `jsonl` (one change record per line) |
61
+ | `--output` | No | Auto-generated path | Output file path. Default: `accounts/<PROFILE>/sessions/<sessionId>.audit.json` |
62
+ | `--include-readonly` | No | `false` | Include read-only operations (queries, downloads, introspection). By default only write operations are tracked. |
63
+ | `--profile` | No | Active profile | Profile context for the audit. Determines the output directory. |
64
+
65
+ ## Audit Document JSON Schema
66
+
67
+ The complete schema for the exported JSON document. Every field, type, and enum value is specified.
68
+
69
+ ### Top-Level Structure
70
+
71
+ ```json
72
+ {
73
+ "$schema": "fluent-session-audit/v1",
74
+ "sessionId": "string (UUID v4)",
75
+ "startedAt": "string (ISO-8601 timestamp of first tracked change)",
76
+ "endedAt": "string (ISO-8601 timestamp of last tracked change)",
77
+ "context": {
78
+ "profile": "string (Fluent CLI profile name, e.g. <PROFILE>)",
79
+ "account": "string (API base URL, e.g. <account>.<env>.api.fluentretail.com)",
80
+ "retailer": {
81
+ "ref": "string (retailer reference, e.g. <RETAILER_REF>)",
82
+ "id": "number (retailer ID, e.g. <RETAILER_ID>)"
83
+ },
84
+ "user": "string (authenticated username, e.g. <USER_NAME>)",
85
+ "agentModel": "string (AI model identifier, e.g. <MODEL_NAME>)"
86
+ },
87
+ "summary": {
88
+ "codeChanges": "number (total CODE category changes)",
89
+ "environmentMutations": "number (total ENVIRONMENT category changes)",
90
+ "eventsSent": "number (total EVENT actions)",
91
+ "deploymentsCompleted": "number (total DEPLOY actions)",
92
+ "testsRun": "number (total TEST category changes)",
93
+ "testsPassed": "number (tests with result=PASS)",
94
+ "testsFailed": "number (tests with result=FAIL)",
95
+ "irreversibleActions": "number (changes where reversible=false)",
96
+ "skillsInvoked": "number (total unique skills invoked)",
97
+ "toolCallsWrite": "number (total write tool calls)",
98
+ "toolCallsRead": "number (total read tool calls, only when --include-readonly)",
99
+ "decisionTrailEntries": "number (total decision points captured)"
100
+ },
101
+ "changes": ["array of Change objects (see below)"],
102
+ "skillInvocations": ["array of SkillInvocation objects (see below)"],
103
+ "toolCalls": ["array of ToolCall objects (see below)"],
104
+ "decisionTrail": ["array of DecisionEntry objects (see below)"],
105
+ "compliance": {
106
+ "scopeDocumentRef": "string|null (path to scope document if available)",
107
+ "tasksCompleted": "number (completed tasks from scope decomposition)",
108
+ "tasksTotal": "number (total tasks from scope decomposition)",
109
+ "traceability": {
110
+ "<storyRef>": {
111
+ "tasks": ["array of task IDs (e.g. T-001, T-002)"],
112
+ "status": "string (complete|partial|not_started)",
113
+ "changes": ["array of seq numbers from the changes array"]
114
+ }
115
+ },
116
+ "preDeployChecklist": "string|null (path to pre-deploy checklist JSON if available)",
117
+ "irreversibleActions": [
118
+ {
119
+ "seq": "number (references changes[].seq)",
120
+ "description": "string (human-readable explanation)",
121
+ "risk": "string (LOW|MEDIUM|HIGH|CRITICAL)"
122
+ }
123
+ ]
124
+ }
125
+ }
126
+ ```
127
+
128
+ ### Change Object Schema
129
+
130
+ Each entry in the `changes` array has this structure:
131
+
132
+ ```json
133
+ {
134
+ "seq": "number (1-based sequential identifier, monotonically increasing)",
135
+ "timestamp": "string (ISO-8601 timestamp of when the change was made)",
136
+ "category": "string (CODE|ENVIRONMENT|TEST|CONFIG)",
137
+ "action": "string (depends on category, see table below)",
138
+ "target": {
139
+ "type": "string (depends on category and action, see table below)",
140
+ "...additional fields depending on type"
141
+ },
142
+ "details": "string (human-readable description of the change)",
143
+ "reversible": "boolean (true if the change can be undone)",
144
+ "rollbackCommand": "string|undefined (concrete command to reverse the change, only when reversible=true and a command is known)",
145
+ "outcome": "string|undefined (SUCCESS|FAILED|NO_MATCH|PENDING -- for events and mutations)",
146
+ "previousValue": "any|undefined (previous state, for mutations and setting updates)",
147
+ "newValue": "any|undefined (new state, for mutations and setting updates)",
148
+ "diff": {
149
+ "linesAdded": "number",
150
+ "linesRemoved": "number"
151
+ },
152
+ "result": "string|undefined (PASS|FAIL -- for TEST category)",
153
+ "tool": "string|undefined (MCP tool name, e.g. event.send, entity.update, graphql.query)",
154
+ "skill": "string|undefined (skill that triggered this change, e.g. fluent-e2e-test)",
155
+ "storyRef": "string|undefined (user story identifier, e.g. <USER_STORY_ID>)"
156
+ }
157
+ ```
158
+
159
+ Note: Fields marked `|undefined` are only present when applicable to the specific change type. The `diff` object is only present for CODE MODIFY actions.
160
+
161
+ ### SkillInvocation Object Schema
162
+
163
+ Each entry in the `skillInvocations` array tracks one skill invocation during the session:
164
+
165
+ ```json
166
+ {
167
+ "seq": "number (1-based sequential, separate from changes[].seq)",
168
+ "timestamp": "string (ISO-8601 when the skill was invoked)",
169
+ "skill": "string (skill name, e.g. fluent-rule-scaffold)",
170
+ "arguments": "object (key arguments: profile, retailer, entityType, moduleName, etc. NOT full file contents)",
171
+ "gateResult": "string|undefined (PASS|BLOCKED|SKIPPED pre-flight or planning gate result)",
172
+ "gateErrorCode": "string|undefined (PLAN_REQUIRED, PREREQ_MISSING, etc. only when gateResult=BLOCKED)",
173
+ "outcome": "string (completed|failed|skipped|blocked)",
174
+ "failureReason": "string|undefined (only when outcome=failed, skipped, or blocked)",
175
+ "handoffSignal": "string|undefined (exit signal, e.g. '-> READY: ...path', '-> NEXT: /fluent-build')",
176
+ "triggeredBy": "number|undefined (seq of the skillInvocation that recommended this via -> NEXT:)",
177
+ "duration": "string|undefined (approximate duration, e.g. '45s', '2m30s')",
178
+ "changesProduced": "number[] (seq numbers from changes[] array that this skill produced)",
179
+ "toolCallsProduced": "number[] (seq numbers from toolCalls[] array that this skill triggered)",
180
+ "nextRecommended": "string|undefined (downstream skill from Handoff section, e.g. fluent-build)"
181
+ }
182
+ ```
183
+
184
+ ### ToolCall Object Schema
185
+
186
+ Each entry in the `toolCalls` array tracks one MCP tool call during the session:
187
+
188
+ ```json
189
+ {
190
+ "seq": "number (1-based sequential, separate from changes[].seq and skillInvocations[].seq)",
191
+ "timestamp": "string (ISO-8601 when the tool was called)",
192
+ "tool": "string (MCP tool name, e.g. event.send, graphql.query, entity.create)",
193
+ "server": "string (MCP server: fluent-mcp or fluent-mcp-extn)",
194
+ "isWrite": "boolean (true for mutations/sends/deploys, false for queries/lists/gets)",
195
+ "target": {
196
+ "entityType": "string|undefined",
197
+ "entityRef": "string|undefined",
198
+ "description": "string (brief description of what was targeted)"
199
+ },
200
+ "outcome": "string (ok|error)",
201
+ "errorCode": "string|undefined (from error envelope: CONFIG_ERROR, AUTH_ERROR, etc. — only when outcome=error)",
202
+ "dryRun": "boolean (true if called with dryRun=true)",
203
+ "skill": "string|undefined (skill that triggered this call)"
204
+ }
205
+ ```
206
+
207
+ Note: Read-only tool calls (`isWrite: false`) are only included when `--include-readonly` is specified. Write tool calls and failed calls are always included.
208
+
209
+ ### DecisionEntry Object Schema
210
+
211
+ Each entry in the `decisionTrail` array captures one explicit execution decision made by the agent:
212
+
213
+ ```json
214
+ {
215
+ "seq": "number (1-based sequential, separate from changes[].seq, skillInvocations[].seq, and toolCalls[].seq)",
216
+ "timestamp": "string (ISO-8601 when the decision was recorded)",
217
+ "trigger": "string (why a decision was needed: user input, gate, failure, mismatch, or handoff)",
218
+ "options": "string[] (short labels for options considered)",
219
+ "selected": "string (chosen option)",
220
+ "rationale": "string (why the selected option was chosen)",
221
+ "confidence": "string (high|medium|low)",
222
+ "assumptions": "string[] (assumptions made when selecting the option)",
223
+ "skill": "string|undefined (skill context where decision occurred)",
224
+ "triggeredBy": "number|undefined (seq from skillInvocations[] that led to this decision)",
225
+ "resultingChanges": "number[] (seq values from changes[] produced because of this decision)"
226
+ }
227
+ ```
228
+
229
+ ### Target Object Shapes by Category
230
+
231
+ **CODE targets:**
232
+
233
+ | Action | target.type | Additional target fields |
234
+ |--------|-------------|------------------------|
235
+ | `CREATE` | `file` | `path` (string -- absolute file path) |
236
+ | `MODIFY` | `file` | `path` (string -- absolute file path) |
237
+ | `DELETE` | `file` | `path` (string -- absolute file path) |
238
+ | `COMMIT` | `git` | `repo` (string), `branch` (string), `hash` (string -- short commit hash) |
239
+ | `PUSH` | `git` | `repo` (string), `branch` (string), `remote` (string -- e.g. origin) |
240
+
241
+ **ENVIRONMENT targets:**
242
+
243
+ | Action | target.type | Additional target fields |
244
+ |--------|-------------|------------------------|
245
+ | `MUTATION` | `entity` | `entityType` (string -- ORDER, FULFILMENT, LOCATION, etc.), `entityRef` (string), `entityId` (string\|number), `fields` (string[] -- which fields were changed) |
246
+ | `DEPLOY` | `module` | `name` (string), `version` (string), `retailer` (string) |
247
+ | `DEPLOY` | `workflow` | `name` (string -- e.g. `<WORKFLOW_NAME>`), `version` (number), `retailer` (string) |
248
+ | `EVENT` | `event` | `eventName` (string), `entityType` (string), `entityRef` (string), `mode` (string -- async\|sync) |
249
+ | `BATCH` | `batch` | `jobName` (string), `jobId` (string), `entityType` (string), `recordCount` (number) |
250
+
251
+ **TEST targets:**
252
+
253
+ | Action | target.type | Additional target fields |
254
+ |--------|-------------|------------------------|
255
+ | `ASSERT` | `assertion` | `entityType` (string), `entityRef` (string), `expectedStatus` (string), `actualStatus` (string) |
256
+ | `BUILD` | `build` | `command` (string -- e.g. mvn clean install), `exitCode` (number), `testCount` (number), `failureCount` (number) |
257
+ | `VALIDATE` | `validation` | `validationType` (string -- module\|workflow\|environment), `target` (string -- what was validated) |
258
+
259
+ **CONFIG targets:**
260
+
261
+ | Action | target.type | Additional target fields |
262
+ |--------|-------------|------------------------|
263
+ | `SETTING_CREATE` | `setting` | `key` (string), `context` (string -- RETAILER\|ACCOUNT\|LOCATION), `contextId` (number) |
264
+ | `SETTING_UPDATE` | `setting` | `key` (string), `context` (string), `contextId` (number) |
265
+
266
+ ### Action Enum Values by Category
267
+
268
+ | Category | Valid Actions |
269
+ |----------|-------------|
270
+ | `CODE` | `CREATE`, `MODIFY`, `DELETE`, `COMMIT`, `PUSH` |
271
+ | `ENVIRONMENT` | `MUTATION`, `DEPLOY`, `EVENT`, `BATCH` |
272
+ | `TEST` | `ASSERT`, `BUILD`, `VALIDATE` |
273
+ | `CONFIG` | `SETTING_CREATE`, `SETTING_UPDATE` |
274
+
275
+ ## Change Categories
276
+
277
+ What falls under each category:
278
+
279
+ | Category | Source Operations | Tracked From |
280
+ |----------|-----------------|-------------|
281
+ | `CODE` | File creates/edits/deletes, git commits, git pushes, workflow JSON edits, rule class scaffolding | File system operations via Write/Edit tools, git commands via Bash |
282
+ | `ENVIRONMENT` | GraphQL mutations, entity CRUD, event sends, workflow uploads, module deploys, batch job creates/sends | MCP tool calls: `graphql.query` (mutations), `entity.create`, `entity.update`, `event.send`, `workflow.upload`, `batch.create`, `batch.send`, `graphql.batchMutate` |
283
+ | `TEST` | Assertions on entity state, build results, module/workflow validation | MCP tool calls: `test.assert`, Bash `mvn` commands, `environment.validate` |
284
+ | `CONFIG` | Setting creates and updates | MCP tool calls: `setting.upsert`, `setting.bulkUpsert` |
285
+
286
+ ## Capture Mechanism
287
+
288
+ The audit trail is built from the same shared tracking log used by `/fluent-session-summary`. This export serializes that shared log into a machine-readable schema.
289
+
290
+ ### Centralized Instrumentation Contract
291
+
292
+ > **Canonical definition:** The shared instrumentation contract (`track.skillStart`, `track.toolCall`, `track.decision`, `track.change`, `track.skillEnd`) is defined in `/fluent-session-summary`. This skill consumes the same shared tracker — see that skill for the full API and rules.
293
+
294
+ ### Serialization Steps
295
+
296
+ ```
297
+ 1. DURING THE SESSION:
298
+ - Record write changes into `changes[]`
299
+ - Record skill lifecycle into `skillInvocations[]`
300
+ - Record MCP/CLI tool usage into `toolCalls[]`
301
+ - Record branch choices into `decisionTrail[]`
302
+ - Read-only tool calls are included only when --include-readonly is enabled
303
+
304
+ 2. ON /fluent-session-audit-export INVOCATION:
305
+ a. Compile `changes[]`, `skillInvocations[]`, `toolCalls[]`, and `decisionTrail[]`
306
+ b. Populate compliance metadata (scope, traceability, checklist) when available
307
+ c. Assign stable 1-based sequence values per array
308
+ d. Compute summary counts, including decisionTrailEntries
309
+
310
+ 3. WRITE to output path:
311
+ Default: accounts/<PROFILE>/sessions/<sessionId>.audit.json
312
+ Or: user-specified --output path
313
+
314
+ 4. REPORT:
315
+ Print output file path + aggregate counts
316
+ ```
317
+
318
+ ## Sensitive Value Redaction
319
+
320
+ Certain values MUST be redacted before writing the audit document:
321
+
322
+ **Always redact (replace with `"[REDACTED]"`):**
323
+ - Access tokens and bearer tokens
324
+ - Passwords and client secrets
325
+ - API keys
326
+ - PII: customer email addresses, phone numbers, full names in entity attributes
327
+ - Setting values containing `password`, `secret`, `token`, `key` in the setting name
328
+
329
+ **Never redact (keep as-is):**
330
+ - Entity refs, IDs, and statuses
331
+ - Event names and entity types
332
+ - File paths
333
+ - Version numbers
334
+ - Workflow names and ruleset names
335
+ - Setting keys (the name itself, not secret values)
336
+ - Retailer refs and IDs
337
+ - User story references
338
+ - Git commit hashes and branch names
339
+
340
+ ## Rollback Commands
341
+
342
+ For each reversible change, include a concrete `rollbackCommand` string when one can be determined:
343
+
344
+ | Action | Rollback Command Pattern |
345
+ |--------|------------------------|
346
+ | `DEPLOY` (module) | `fluent module install -p <PROFILE> -r <RETAILER> -m <module-name>:<previousVersion>` |
347
+ | `DEPLOY` (workflow) | Re-upload the previous version workflow JSON via `workflow.upload` |
348
+ | `MUTATION` (entity status) | `entity.update({ entityType, id, fields: { status: "<previousValue>" } })` |
349
+ | `SETTING_CREATE` | Delete the setting (note: no MCP tool for this; manual via GraphQL) |
350
+ | `SETTING_UPDATE` | `setting.upsert({ name, value: "<previousValue>", context, contextId })` |
351
+ | `COMMIT` | `git revert <hash>` |
352
+ | `PUSH` | `git push origin <branch> --force` (flag as destructive) |
353
+ | `EVENT` | Not reversible -- events cannot be un-sent |
354
+ | `BATCH` | Not reversible -- batch records are processed |
355
+ | `CODE CREATE` | `rm <path>` or `git checkout -- <path>` |
356
+ | `CODE MODIFY` | `git checkout -- <path>` |
357
+
358
+ Changes with `reversible: false` do not have a `rollbackCommand` field.
359
+
360
+ ## Output Paths
361
+
362
+ Default output location follows the accounts directory convention:
363
+
364
+ ```
365
+ accounts/<PROFILE>/sessions/<sessionId>.audit.json
366
+ ```
367
+
368
+ When `--output` is specified, write to that path instead.
369
+
370
+ If the output directory does not exist, create it.
371
+
372
+ ## JSONL Format Option
373
+
374
+ When `--format jsonl` is specified, output one JSON object per line instead of a single document:
375
+
376
+ ```
377
+ Line 1: {"$schema":"fluent-session-audit/v1","sessionId":"...","startedAt":"...","endedAt":"...","context":{...},"summary":{...},"compliance":{...}}
378
+ Line 2: {"seq":1,"timestamp":"...","category":"CODE","action":"CREATE","target":{...},...}
379
+ Line 3: {"seq":2,"timestamp":"...","category":"CODE","action":"MODIFY","target":{...},...}
380
+ ...
381
+ ```
382
+
383
+ The first line is the session metadata (everything except the `changes` array). Each subsequent line is one change record. This format supports streaming consumption and line-by-line processing by CI/CD tools.
384
+
385
+ The file extension for JSONL output is `.audit.jsonl`.
386
+
387
+ ## External System Mapping
388
+
389
+ The audit JSON is designed for consumption by external systems:
390
+
391
+ | System | Field Mapping | Consumption Pattern |
392
+ |--------|--------------|-------------------|
393
+ | **Jira** | `changes[].storyRef` maps to Jira issue keys (e.g. `<USER_STORY_ID>` -> `<TRACKER_ISSUE_KEY>`) | Create work log entries from changes; update story status based on `compliance.traceability[].status` |
394
+ | **Confluence** | Full audit document | Generate deployment record pages; attach as artifact to release pages |
395
+ | **CI/CD** | `compliance.irreversibleActions`, `summary.testsFailed` | Parse audit as deployment gate artifact; fail pipeline if irreversible action count exceeds threshold or tests failed |
396
+ | **Git** | `changes[].target` where `target.type == "git"` | Cross-reference COMMIT entries with PR metadata; verify all commits are in a merged PR |
397
+ | **ADD Feedback Loop** | `compliance.tasksCompleted` / `compliance.tasksTotal` | Measure scope completion percentage; track velocity across sessions |
398
+
399
+ ## Edge Cases
400
+
401
+ - **No changes made:** Output a valid audit document with an empty `changes` array and all summary counts at 0. Set `startedAt` and `endedAt` to the current timestamp.
402
+ - **Multi-retailer sessions:** If the session spans multiple profiles or retailers, produce one audit document per profile/retailer combination. Each document's `context` reflects its specific target.
403
+ - **Failed writes:** Track with `outcome: "FAILED"` in the change record. Failed operations are still part of the audit trail -- they represent attempted changes.
404
+ - **Dry-run operations:** `event.send` with `dryRun: true`, `entity.create` with `dryRun: true`, and `workflow.upload` with `dryRun: true` are NOT tracked. Dry runs do not change state.
405
+ - **Partial sessions:** If the agent session ends abnormally (timeout, error), the audit captures everything tracked up to that point. The `endedAt` reflects the last tracked change, not the session end.
406
+ - **No scope document:** If no scope decomposition was run, set `compliance.scopeDocumentRef` to `null`, `tasksCompleted` and `tasksTotal` to 0, and `traceability` to an empty object.
407
+ - **No pre-deploy checklist:** If no pre-deploy check was run, set `compliance.preDeployChecklist` to `null`.
408
+ - **Setting bulk upserts:** Each individual setting in a `setting.bulkUpsert` call is tracked as a separate CONFIG change record.
409
+ - **Skill invocations with no tool calls:** A skill like `/fluent-workflow-analyzer` may be invoked but make no MCP tool calls (pure local file analysis). It appears in `skillInvocations` with `toolCallsProduced: []`.
410
+ - **Tool calls outside skill context:** Direct MCP tool calls not triggered by a named skill (e.g., ad-hoc `graphql.query` by the agent) have `skill: undefined` in the toolCalls array.
411
+ - **DryRun tool calls:** Calls with `dryRun: true` have `isWrite: false` and `dryRun: true`. They are only included with `--include-readonly`.
412
+
413
+ ## Integration with `/fluent-session-summary`
414
+
415
+ Both skills share the same tracking protocol and read the same data:
416
+
417
+ | Concern | Implementation |
418
+ |---------|---------------|
419
+ | Tracking log | Single running log maintained by the agent during the session |
420
+ | Data ownership | Neither skill owns the log -- it is a cross-cutting concern |
421
+ | Invocation independence | Either skill can be invoked without the other |
422
+ | Consistent counts | Both skills must produce the same counts for the same data |
423
+ | Ordering | Both skills order changes chronologically by timestamp |
424
+
425
+ When both are invoked in the same session, the text summary from `/fluent-session-summary` and the JSON from `/fluent-session-audit-export` represent the same underlying changes. Any discrepancy is a bug.
426
+
427
+ ## Full Example Audit Document
428
+
429
+ This example shows a realistic session that scaffolds a rule, configures settings, deploys a module and workflow, runs an E2E test, and commits the code.
430
+
431
+ ```json
432
+ {
433
+ "$schema": "fluent-session-audit/v1",
434
+ "sessionId": "a3f1c9e2-7b4d-4e8a-9f12-d6c3a8b5e7f1",
435
+ "startedAt": "2026-02-23T09:00:12Z",
436
+ "endedAt": "2026-02-23T11:42:08Z",
437
+ "context": {
438
+ "profile": "<PROFILE>",
439
+ "account": "<account>.<env>.api.fluentretail.com",
440
+ "retailer": {
441
+ "ref": "<RETAILER_REF>",
442
+ "id": "<RETAILER_ID>"
443
+ },
444
+ "user": "<USER_NAME>",
445
+ "agentModel": "<MODEL_NAME>"
446
+ },
447
+ "summary": {
448
+ "codeChanges": 4,
449
+ "environmentMutations": 3,
450
+ "eventsSent": 2,
451
+ "deploymentsCompleted": 2,
452
+ "testsRun": 2,
453
+ "testsPassed": 2,
454
+ "testsFailed": 0,
455
+ "irreversibleActions": 2,
456
+ "skillsInvoked": 6,
457
+ "toolCallsWrite": 4,
458
+ "toolCallsRead": 1,
459
+ "decisionTrailEntries": 3
460
+ },
461
+ "changes": [
462
+ {
463
+ "seq": 1,
464
+ "timestamp": "2026-02-23T09:00:12Z",
465
+ "category": "CODE",
466
+ "action": "CREATE",
467
+ "target": {
468
+ "type": "file",
469
+ "path": "accounts/<PROFILE>/SOURCE/<MODULE_ROOT>/plugins/rules/<MODULE_ALIAS>/src/main/java/com/fluentcommerce/rule/<DOMAIN>/<RULE_CLASS>.java"
470
+ },
471
+ "details": "New rule class: <RULE_CLASS> implementing <BUSINESS_CAPABILITY>",
472
+ "reversible": true,
473
+ "rollbackCommand": "rm accounts/<PROFILE>/SOURCE/<MODULE_ROOT>/plugins/rules/<MODULE_ALIAS>/src/main/java/com/fluentcommerce/rule/<DOMAIN>/<RULE_CLASS>.java",
474
+ "skill": "fluent-rule-scaffold",
475
+ "storyRef": "<USER_STORY_ID_1>"
476
+ },
477
+ {
478
+ "seq": 2,
479
+ "timestamp": "2026-02-23T09:05:33Z",
480
+ "category": "CODE",
481
+ "action": "MODIFY",
482
+ "target": {
483
+ "type": "file",
484
+ "path": "accounts/<PROFILE>/SOURCE/<MODULE_ROOT>/resources/module.json"
485
+ },
486
+ "details": "Registered <RULE_CLASS> in provides[] array",
487
+ "diff": {
488
+ "linesAdded": 8,
489
+ "linesRemoved": 0
490
+ },
491
+ "reversible": true,
492
+ "rollbackCommand": "git checkout -- accounts/<PROFILE>/SOURCE/<MODULE_ROOT>/resources/module.json",
493
+ "skill": "fluent-rule-scaffold",
494
+ "storyRef": "<USER_STORY_ID_1>"
495
+ },
496
+ {
497
+ "seq": 3,
498
+ "timestamp": "2026-02-23T09:12:45Z",
499
+ "category": "CONFIG",
500
+ "action": "SETTING_CREATE",
501
+ "target": {
502
+ "type": "setting",
503
+ "key": "<SETTING_KEY>",
504
+ "context": "RETAILER",
505
+ "contextId": "<RETAILER_ID>"
506
+ },
507
+ "details": "Created webhook setting for order cancellation notifications",
508
+ "previousValue": null,
509
+ "newValue": "https://<webhook-host>/<path>",
510
+ "reversible": true,
511
+ "rollbackCommand": "Delete setting <SETTING_KEY> via GraphQL mutation deleteSetting",
512
+ "tool": "setting.upsert",
513
+ "skill": "fluent-settings"
514
+ },
515
+ {
516
+ "seq": 4,
517
+ "timestamp": "2026-02-23T09:45:18Z",
518
+ "category": "TEST",
519
+ "action": "BUILD",
520
+ "target": {
521
+ "type": "build",
522
+ "command": "mvn clean install -f accounts/<PROFILE>/SOURCE/<MODULE_ROOT>/plugins/pom.xml",
523
+ "exitCode": 0,
524
+ "testCount": 42,
525
+ "failureCount": 0
526
+ },
527
+ "details": "Maven build: 42 tests passed, 0 failures",
528
+ "result": "PASS",
529
+ "skill": "fluent-build"
530
+ },
531
+ {
532
+ "seq": 5,
533
+ "timestamp": "2026-02-23T10:02:07Z",
534
+ "category": "ENVIRONMENT",
535
+ "action": "DEPLOY",
536
+ "target": {
537
+ "type": "module",
538
+ "name": "<MODULE_NAME>",
539
+ "version": "<VERSION>",
540
+ "retailer": "<RETAILER_REF>"
541
+ },
542
+ "details": "Module deployed via fluent module install",
543
+ "previousVersion": "<PREVIOUS_VERSION>",
544
+ "reversible": true,
545
+ "rollbackCommand": "fluent module install -p <PROFILE> -r <RETAILER_REF> -m <MODULE_NAME>:<PREVIOUS_VERSION>",
546
+ "skill": "fluent-module-deploy"
547
+ },
548
+ {
549
+ "seq": 6,
550
+ "timestamp": "2026-02-23T10:08:34Z",
551
+ "category": "ENVIRONMENT",
552
+ "action": "DEPLOY",
553
+ "target": {
554
+ "type": "workflow",
555
+ "name": "<WORKFLOW_NAME>",
556
+ "version": "<WORKFLOW_VERSION>",
557
+ "retailer": "<RETAILER_REF>"
558
+ },
559
+ "details": "Workflow uploaded with new <RULESET_NAME> ruleset added",
560
+ "previousVersion": "<PREVIOUS_WORKFLOW_VERSION>",
561
+ "reversible": true,
562
+ "rollbackCommand": "Re-upload <WORKFLOW_NAME> version <PREVIOUS_WORKFLOW_VERSION> JSON via workflow.upload",
563
+ "tool": "workflow.upload",
564
+ "skill": "fluent-workflow-builder"
565
+ },
566
+ {
567
+ "seq": 7,
568
+ "timestamp": "2026-02-23T10:15:50Z",
569
+ "category": "ENVIRONMENT",
570
+ "action": "EVENT",
571
+ "target": {
572
+ "type": "event",
573
+ "eventName": "<EVENT_NAME_1>",
574
+ "entityType": "ORDER",
575
+ "entityRef": "<ENTITY_REF_1>",
576
+ "mode": "async"
577
+ },
578
+ "details": "E2E test: created test order via <EVENT_NAME_1> event",
579
+ "outcome": "SUCCESS",
580
+ "reversible": false,
581
+ "tool": "event.send",
582
+ "skill": "fluent-e2e-test"
583
+ },
584
+ {
585
+ "seq": 8,
586
+ "timestamp": "2026-02-23T10:16:22Z",
587
+ "category": "TEST",
588
+ "action": "ASSERT",
589
+ "target": {
590
+ "type": "assertion",
591
+ "entityType": "ORDER",
592
+ "entityRef": "<ENTITY_REF_1>",
593
+ "expectedStatus": "BOOKED",
594
+ "actualStatus": "BOOKED"
595
+ },
596
+ "details": "Assert order status=BOOKED after ConfirmValidation cascade",
597
+ "result": "PASS",
598
+ "tool": "test.assert",
599
+ "skill": "fluent-e2e-test"
600
+ },
601
+ {
602
+ "seq": 9,
603
+ "timestamp": "2026-02-23T10:22:11Z",
604
+ "category": "ENVIRONMENT",
605
+ "action": "EVENT",
606
+ "target": {
607
+ "type": "event",
608
+ "eventName": "<EVENT_NAME_2>",
609
+ "entityType": "ORDER",
610
+ "entityRef": "<ENTITY_REF_1>",
611
+ "mode": "async"
612
+ },
613
+ "details": "E2E test: cancelled test order via <EVENT_NAME_2> event",
614
+ "outcome": "SUCCESS",
615
+ "reversible": false,
616
+ "tool": "event.send",
617
+ "skill": "fluent-e2e-test"
618
+ },
619
+ {
620
+ "seq": 10,
621
+ "timestamp": "2026-02-23T10:22:45Z",
622
+ "category": "ENVIRONMENT",
623
+ "action": "MUTATION",
624
+ "target": {
625
+ "type": "entity",
626
+ "entityType": "ORDER",
627
+ "entityRef": "<ENTITY_REF_1>",
628
+ "entityId": "48291",
629
+ "fields": ["status"]
630
+ },
631
+ "details": "Order status confirmed <STATUS_TO> via workflow processing",
632
+ "previousValue": "<STATUS_FROM>",
633
+ "newValue": "<STATUS_TO>",
634
+ "outcome": "SUCCESS",
635
+ "reversible": false,
636
+ "tool": "graphql.query",
637
+ "skill": "fluent-e2e-test"
638
+ },
639
+ {
640
+ "seq": 11,
641
+ "timestamp": "2026-02-23T11:40:30Z",
642
+ "category": "CODE",
643
+ "action": "COMMIT",
644
+ "target": {
645
+ "type": "git",
646
+ "repo": "<REPO_NAME>",
647
+ "branch": "<BRANCH_NAME>",
648
+ "hash": "<COMMIT_HASH>"
649
+ },
650
+ "details": "feat: <FEATURE_DESCRIPTION>",
651
+ "reversible": true,
652
+ "rollbackCommand": "git revert <COMMIT_HASH>"
653
+ },
654
+ {
655
+ "seq": 12,
656
+ "timestamp": "2026-02-23T11:42:08Z",
657
+ "category": "CODE",
658
+ "action": "PUSH",
659
+ "target": {
660
+ "type": "git",
661
+ "repo": "<REPO_NAME>",
662
+ "branch": "<BRANCH_NAME>",
663
+ "remote": "<REMOTE_NAME>"
664
+ },
665
+ "details": "Pushed <BRANCH_NAME> to <REMOTE_NAME>",
666
+ "reversible": true,
667
+ "rollbackCommand": "git push <REMOTE_NAME> <BRANCH_NAME> --force"
668
+ }
669
+ ],
670
+ "skillInvocations": [
671
+ {
672
+ "seq": 1,
673
+ "timestamp": "2026-02-23T09:00:00Z",
674
+ "skill": "fluent-rule-scaffold",
675
+ "arguments": { "ruleName": "<RULE_CLASS>", "entityType": "<ENTITY_TYPE>", "module": "<MODULE_NAME>" },
676
+ "gateResult": "PASS",
677
+ "outcome": "completed",
678
+ "handoffSignal": "-> READY: accounts/<PROFILE>/SOURCE/.../<RULE_CLASS>.java",
679
+ "triggeredBy": null,
680
+ "duration": "5m33s",
681
+ "changesProduced": [1, 2],
682
+ "toolCallsProduced": [],
683
+ "nextRecommended": "fluent-build"
684
+ },
685
+ {
686
+ "seq": 2,
687
+ "timestamp": "2026-02-23T09:10:00Z",
688
+ "skill": "fluent-settings",
689
+ "arguments": { "settingKey": "<SETTING_KEY>", "context": "RETAILER" },
690
+ "outcome": "completed",
691
+ "duration": "2m45s",
692
+ "changesProduced": [3],
693
+ "toolCallsProduced": [1],
694
+ "nextRecommended": "fluent-pre-deploy-check"
695
+ },
696
+ {
697
+ "seq": 3,
698
+ "timestamp": "2026-02-23T09:40:00Z",
699
+ "skill": "fluent-build",
700
+ "arguments": { "module": "<MODULE_ALIAS>" },
701
+ "gateResult": "PASS",
702
+ "outcome": "completed",
703
+ "handoffSignal": "-> READY: accounts/<PROFILE>/SOURCE/.../dist/<MODULE_ARTIFACT>-<VERSION>.jar",
704
+ "triggeredBy": 1,
705
+ "duration": "5m18s",
706
+ "changesProduced": [4],
707
+ "toolCallsProduced": [],
708
+ "nextRecommended": "fluent-pre-deploy-check"
709
+ },
710
+ {
711
+ "seq": 4,
712
+ "timestamp": "2026-02-23T10:00:00Z",
713
+ "skill": "fluent-module-deploy",
714
+ "arguments": { "module": "<MODULE_NAME>", "version": "<VERSION>", "retailer": "<RETAILER_REF>" },
715
+ "gateResult": "PASS",
716
+ "outcome": "completed",
717
+ "handoffSignal": "-> READY: <MODULE_NAME> <VERSION> installed to <RETAILER_REF>",
718
+ "triggeredBy": 3,
719
+ "duration": "2m07s",
720
+ "changesProduced": [5],
721
+ "toolCallsProduced": [],
722
+ "nextRecommended": "fluent-e2e-test"
723
+ },
724
+ {
725
+ "seq": 5,
726
+ "timestamp": "2026-02-23T10:05:00Z",
727
+ "skill": "fluent-workflow-deploy",
728
+ "arguments": { "workflow": "<WORKFLOW_NAME>", "retailer": "<RETAILER_REF>" },
729
+ "outcome": "completed",
730
+ "duration": "3m34s",
731
+ "changesProduced": [6],
732
+ "toolCallsProduced": [2],
733
+ "nextRecommended": "fluent-e2e-test"
734
+ },
735
+ {
736
+ "seq": 6,
737
+ "timestamp": "2026-02-23T10:12:00Z",
738
+ "skill": "fluent-e2e-test",
739
+ "arguments": { "entityType": "<ENTITY_TYPE>", "testPlan": "<TEST_PLAN_NAME>" },
740
+ "outcome": "completed",
741
+ "duration": "10m45s",
742
+ "changesProduced": [7, 8, 9, 10],
743
+ "toolCallsProduced": [3, 4, 5]
744
+ }
745
+ ],
746
+ "toolCalls": [
747
+ {
748
+ "seq": 1,
749
+ "timestamp": "2026-02-23T09:12:45Z",
750
+ "tool": "setting.upsert",
751
+ "server": "fluent-mcp-extn",
752
+ "isWrite": true,
753
+ "target": { "description": "Create <SETTING_KEY> at RETAILER:<RETAILER_ID>" },
754
+ "outcome": "ok",
755
+ "dryRun": false,
756
+ "skill": "fluent-settings"
757
+ },
758
+ {
759
+ "seq": 2,
760
+ "timestamp": "2026-02-23T10:08:34Z",
761
+ "tool": "workflow.upload",
762
+ "server": "fluent-mcp-extn",
763
+ "isWrite": true,
764
+ "target": { "entityType": "WORKFLOW", "entityRef": "<WORKFLOW_NAME>", "description": "Upload <WORKFLOW_NAME> v<WORKFLOW_VERSION>" },
765
+ "outcome": "ok",
766
+ "dryRun": false,
767
+ "skill": "fluent-workflow-deploy"
768
+ },
769
+ {
770
+ "seq": 3,
771
+ "timestamp": "2026-02-23T10:15:50Z",
772
+ "tool": "event.send",
773
+ "server": "fluent-mcp-extn",
774
+ "isWrite": true,
775
+ "target": { "entityType": "ORDER", "entityRef": "<ENTITY_REF_1>", "description": "<EVENT_NAME_1> async" },
776
+ "outcome": "ok",
777
+ "dryRun": false,
778
+ "skill": "fluent-e2e-test"
779
+ },
780
+ {
781
+ "seq": 4,
782
+ "timestamp": "2026-02-23T10:16:22Z",
783
+ "tool": "test.assert",
784
+ "server": "fluent-mcp-extn",
785
+ "isWrite": false,
786
+ "target": { "entityType": "ORDER", "entityRef": "<ENTITY_REF_1>", "description": "Assert status=<EXPECTED_STATUS>" },
787
+ "outcome": "ok",
788
+ "dryRun": false,
789
+ "skill": "fluent-e2e-test"
790
+ },
791
+ {
792
+ "seq": 5,
793
+ "timestamp": "2026-02-23T10:22:11Z",
794
+ "tool": "event.send",
795
+ "server": "fluent-mcp-extn",
796
+ "isWrite": true,
797
+ "target": { "entityType": "ORDER", "entityRef": "<ENTITY_REF_1>", "description": "<EVENT_NAME_2> async" },
798
+ "outcome": "ok",
799
+ "dryRun": false,
800
+ "skill": "fluent-e2e-test"
801
+ }
802
+ ],
803
+ "decisionTrail": [
804
+ {
805
+ "seq": 1,
806
+ "timestamp": "2026-02-23T09:39:00Z",
807
+ "trigger": "Build failed",
808
+ "options": ["retry", "fix-setting", "rollback"],
809
+ "selected": "fix-setting",
810
+ "rationale": "Missing setting was deterministic root cause",
811
+ "confidence": "high",
812
+ "assumptions": [],
813
+ "skill": "fluent-build",
814
+ "triggeredBy": 3,
815
+ "resultingChanges": [3, 4]
816
+ },
817
+ {
818
+ "seq": 2,
819
+ "timestamp": "2026-02-23T10:00:00Z",
820
+ "trigger": "Deployment gate check",
821
+ "options": ["deploy-now", "run-pre-deploy-check"],
822
+ "selected": "run-pre-deploy-check",
823
+ "rationale": "Standard gated release path",
824
+ "confidence": "high",
825
+ "assumptions": [],
826
+ "skill": "fluent-module-deploy",
827
+ "triggeredBy": 4,
828
+ "resultingChanges": [5, 6]
829
+ },
830
+ {
831
+ "seq": 3,
832
+ "timestamp": "2026-02-23T10:12:00Z",
833
+ "trigger": "Post-deploy verification choice",
834
+ "options": ["skip-tests", "run-e2e"],
835
+ "selected": "run-e2e",
836
+ "rationale": "Deployment verification is mandatory",
837
+ "confidence": "high",
838
+ "assumptions": [],
839
+ "skill": "fluent-e2e-test",
840
+ "triggeredBy": 6,
841
+ "resultingChanges": [7, 8, 9, 10]
842
+ }
843
+ ],
844
+ "compliance": {
845
+ "scopeDocumentRef": "scope/<feature-scope>.md",
846
+ "tasksCompleted": 8,
847
+ "tasksTotal": 10,
848
+ "traceability": {
849
+ "<USER_STORY_ID_1>": {
850
+ "tasks": ["T-001", "T-002", "T-003", "T-004", "T-005"],
851
+ "status": "complete",
852
+ "changes": [1, 2, 3, 5, 6]
853
+ },
854
+ "<USER_STORY_ID_2>": {
855
+ "tasks": ["T-006", "T-007", "T-008"],
856
+ "status": "complete",
857
+ "changes": [7, 8, 9, 10]
858
+ },
859
+ "<USER_STORY_ID_3>": {
860
+ "tasks": ["T-009", "T-010"],
861
+ "status": "not_started",
862
+ "changes": []
863
+ }
864
+ },
865
+ "preDeployChecklist": "accounts/<PROFILE>/reports/pre-deploy/<MODULE_NAME>-<VERSION>.checklist.json",
866
+ "irreversibleActions": [
867
+ {
868
+ "seq": 7,
869
+ "description": "Event <EVENT_NAME_1> sent to <ENTITY_TYPE>/<ENTITY_REF_1> -- cannot be un-sent",
870
+ "risk": "LOW"
871
+ },
872
+ {
873
+ "seq": 9,
874
+ "description": "Event <EVENT_NAME_2> sent to <ENTITY_TYPE>/<ENTITY_REF_1> -- cannot be un-sent",
875
+ "risk": "LOW"
876
+ }
877
+ ]
878
+ }
879
+ }
880
+ ```