@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.
- package/README.md +866 -622
- package/bin/cli.mjs +2112 -1973
- package/content/cli/agents/fluent-cli/agent.json +149 -149
- package/content/cli/agents/fluent-cli.md +132 -132
- package/content/cli/skills/fluent-bootstrap/SKILL.md +214 -181
- package/content/cli/skills/fluent-cli-index/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +117 -1
- package/content/cli/skills/fluent-cli-reference/SKILL.md +1040 -1031
- package/content/cli/skills/fluent-cli-retailer/SKILL.md +27 -2
- package/content/cli/skills/fluent-cli-settings/SKILL.md +21 -1
- package/content/cli/skills/fluent-connect/SKILL.md +937 -886
- package/content/cli/skills/fluent-module-deploy/SKILL.md +63 -5
- package/content/cli/skills/fluent-profile/SKILL.md +73 -0
- package/content/cli/skills/fluent-workflow/SKILL.md +360 -310
- package/content/dev/agents/fluent-backend-dev/AGENT.md +58 -0
- package/content/dev/agents/fluent-backend-dev/agent.json +69 -0
- package/content/dev/agents/fluent-backend-dev.md +287 -0
- package/content/dev/agents/fluent-dev/AGENT.md +98 -0
- package/content/dev/agents/fluent-dev/agent.json +14 -2
- package/content/dev/agents/fluent-dev.md +194 -525
- package/content/dev/agents/fluent-frontend-dev/AGENT.md +63 -0
- package/content/dev/agents/fluent-frontend-dev/agent.json +52 -0
- package/content/dev/agents/fluent-frontend-dev.md +323 -0
- package/content/dev/skills/fluent-archive/SKILL.md +234 -0
- package/content/dev/skills/fluent-build/SKILL.md +312 -192
- package/content/dev/skills/fluent-connection-analysis/SKILL.md +422 -386
- package/content/dev/skills/fluent-custom-code/SKILL.md +15 -9
- package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +19 -2
- package/content/dev/skills/fluent-e2e-test/SKILL.md +501 -394
- package/content/dev/skills/fluent-event-api/SKILL.md +962 -945
- package/content/dev/skills/fluent-feature-explain/SKILL.md +680 -603
- package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +27 -2
- package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -227
- package/content/dev/skills/fluent-feature-status/SKILL.md +335 -0
- package/content/dev/skills/fluent-feedback/SKILL.md +221 -0
- package/content/dev/skills/fluent-implementation-map/SKILL.md +644 -0
- package/content/dev/skills/fluent-job-batch/SKILL.md +10 -0
- package/content/dev/skills/fluent-module-scaffold/SKILL.md +64 -2
- package/content/dev/skills/fluent-module-validate/SKILL.md +778 -775
- package/content/dev/skills/fluent-mystique-analyze/SKILL.md +817 -0
- package/content/dev/skills/fluent-mystique-builder/COMPONENT_TEMPLATE.md +81 -0
- package/content/dev/skills/fluent-mystique-builder/README.md +63 -0
- package/content/dev/skills/fluent-mystique-builder/SKILL.md +1294 -0
- package/content/dev/skills/fluent-mystique-builder/components/INDEX.md +92 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.accordion.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.fulfilmentpack.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.multiparcel.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.returnitems.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.wavepick.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.inline.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.activity.entity.md +25 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.analytics.viz.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.column.md +111 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.json.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.jsoneditor.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.locationId.md +51 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.retailerId.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.bar.md +57 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.download.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.compatibility.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.pick.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.buttons.add.reject.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attribute.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attributes.grid.md +40 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.image.md +37 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.map.point.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.multi.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.product.md +27 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.md +34 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.wrapper.feed.md +98 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.wrapper.source.md +104 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.md +28 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.wrapper.threshold.md +118 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.line.md +32 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.conditional.md +62 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.dashboard.threshold.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.daterange.wrapper.forwarder.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.drawer.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.event.detail.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.events.search.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.daterange.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.filterComplex.md +106 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.intrange.md +82 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.multistring.md +50 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.filterPanel.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.editor.md +22 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.viewer.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.customAction.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.md +116 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.bppmetrics.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.feed.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.source.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.addItem.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mutation.inline.md +88 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.attributes.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.text.md +33 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.link.md +30 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.itemDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.shipmentDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.filter.select.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.refresh.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.column.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.header.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.md +59 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.md +45 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.summary.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.progress.circular.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.provider.graphql.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.quantity.list.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.repeater.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.reports.ipuipc.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.return.rowExpansion.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcode.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcodeFilter.md +72 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.camera.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.settingForm.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.drawer.button.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.modal.button.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.strategy.modal.button.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.stepper.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tab.content.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.card.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tile.metric.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.workflow.provider.md +77 -0
- package/content/dev/skills/fluent-mystique-builder/validate-docs.ps1 +260 -0
- package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +1830 -0
- package/content/dev/skills/fluent-mystique-validate/SKILL.md +646 -0
- package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1144 -1108
- package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1111
- package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -385
- package/content/dev/skills/fluent-scope-decompose/SKILL.md +1123 -1021
- package/content/dev/skills/fluent-session-audit-export/SKILL.md +880 -632
- package/content/dev/skills/fluent-session-summary/SKILL.md +320 -195
- package/content/dev/skills/fluent-settings/SKILL.md +160 -1
- package/content/dev/skills/fluent-source-onboard/SKILL.md +31 -3
- package/content/dev/skills/fluent-sourcing/SKILL.md +1185 -0
- package/content/dev/skills/fluent-system-monitoring/SKILL.md +771 -767
- package/content/dev/skills/fluent-test-data/SKILL.md +514 -513
- package/content/dev/skills/fluent-trace/SKILL.md +1169 -1143
- package/content/dev/skills/fluent-transition-api/SKILL.md +364 -346
- package/content/dev/skills/fluent-use-case-discover/SKILL.md +593 -0
- package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +281 -0
- package/content/dev/skills/fluent-version-manage/SKILL.md +53 -2
- package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
- package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -319
- package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -267
- package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
- package/content/mcp-extn/agents/fluent-mcp.md +133 -69
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -461
- package/content/mcp-official/agents/fluent-mcp-core.md +91 -91
- package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -94
- package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -172
- package/docs/CAPABILITY_MAP.md +106 -77
- package/docs/DEPLOYMENT_PROMOTION_RUNBOOK.md +218 -0
- package/docs/DESIGN-implementation-map.md +698 -0
- package/docs/DEV_WORKFLOW.md +814 -802
- package/docs/FLOW_RUN.md +142 -142
- package/docs/GETTING_STARTED.md +427 -0
- package/docs/USE_CASES.md +909 -52
- package/metadata.json +184 -156
- package/package.json +3 -2
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fluent-implementation-map
|
|
3
|
+
description: Reverse-engineer an entire Fluent Commerce implementation into a feature inventory with end-to-end flow diagrams, cross-feature dependency maps, customisation scoring, and gap analysis. Triggers on "implementation map", "what's been built", "analyze implementation", "reverse engineer account", "feature inventory", "end to end flows", "map this account", "what exists", "onboard to account".
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
+
argument-hint: --profile PROFILE --retailer RETAILER [--depth summary|detailed] [--focus ENTITY_TYPE] [--include-ootb] [--create-stubs] [--include-runtime]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Implementation Map
|
|
10
|
+
|
|
11
|
+
Reverse-engineer an entire Fluent Commerce implementation into a feature inventory with end-to-end flow diagrams, cross-feature dependencies, and gap analysis. This is the **top of the analysis pyramid** — run it first when onboarding to an account you know nothing about.
|
|
12
|
+
|
|
13
|
+
## Ownership Boundary
|
|
14
|
+
|
|
15
|
+
This skill owns the **discovery and decomposition** of an entire implementation into logical features with cross-feature dependency mapping.
|
|
16
|
+
|
|
17
|
+
Source analysis skills (called as needed, not duplicated):
|
|
18
|
+
- Per-feature deep dive -> `/fluent-feature-explain`
|
|
19
|
+
- Per-workflow structure -> `/fluent-workflow-analyzer`
|
|
20
|
+
- Cross-workflow topology -> `/fluent-connection-analysis`
|
|
21
|
+
- Source code analysis -> `/fluent-custom-code`
|
|
22
|
+
- Convert inventory to lifecycle features -> `/fluent-scope-decompose`
|
|
23
|
+
- Start lifecycle for discovered feature -> `/fluent-use-case-discover`
|
|
24
|
+
- Production readiness -> `/fluent-rfl-assess`
|
|
25
|
+
|
|
26
|
+
MCP tools used directly:
|
|
27
|
+
- `plugin.list` — Deployed rule inventory (module, version, rule key)
|
|
28
|
+
- `graphql.query` — Settings inventory, entity type catalogue
|
|
29
|
+
- `workflow.transitions` — Live workflow version confirmation (and user-action visibility checks using the strict contract from `/fluent-workflow-builder` and `/fluent-transition-api`)
|
|
30
|
+
|
|
31
|
+
## No Planning Gate
|
|
32
|
+
|
|
33
|
+
This is a **read-only analysis skill**. It writes analysis artifacts to `accounts/<PROFILE>/analysis/implementation-map/` but does not modify workflows, settings, or entities. Same category as `/fluent-feature-explain` and `/fluent-workflow-analyzer`.
|
|
34
|
+
|
|
35
|
+
## When to Use
|
|
36
|
+
|
|
37
|
+
- "What has been built on this account?"
|
|
38
|
+
- "Map the entire implementation end to end"
|
|
39
|
+
- "I'm onboarding — show me everything"
|
|
40
|
+
- "Give me a feature inventory with flow diagrams"
|
|
41
|
+
- "Analyze this implementation for gaps and risks"
|
|
42
|
+
- Pre-engagement discovery, audits, or handover documentation
|
|
43
|
+
|
|
44
|
+
## Invocation Examples
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
/fluent-implementation-map --profile SAGIRISH --retailer "Module Test"
|
|
48
|
+
/fluent-implementation-map --profile HMDEV --retailer HM_TEST --depth detailed
|
|
49
|
+
/fluent-implementation-map --profile HMDEV --retailer HM_TEST --focus ORDER
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Inputs
|
|
53
|
+
|
|
54
|
+
| Parameter | Required | Default | Description |
|
|
55
|
+
|-----------|----------|---------|-------------|
|
|
56
|
+
| `--profile` | Yes | Active CLI profile | Fluent CLI profile name |
|
|
57
|
+
| `--retailer` | Yes | Profile default | Target retailer ref |
|
|
58
|
+
| `--depth` | No | `summary` | `summary` = feature list + high-level flows; `detailed` = full per-feature architecture |
|
|
59
|
+
| `--focus` | No | All | Filter to specific entity type (ORDER, FULFILMENT, ARTICLE, WAVE, etc.) |
|
|
60
|
+
| `--include-ootb` | No | `false` | Include OOTB-only flows (no customisations) in the map |
|
|
61
|
+
| `--create-stubs` | No | `false` | Create `features/<slug>/status.json` for each discovered feature, bridging discovery into the feature lifecycle |
|
|
62
|
+
| `--include-runtime` | No | `false` | Collect runtime evidence per feature via `event.flowInspect` and `entity.get` (significantly slower) |
|
|
63
|
+
|
|
64
|
+
## Progress
|
|
65
|
+
|
|
66
|
+
Emit this block at each phase transition to show progress:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
▸ /fluent-implementation-map [1/5]
|
|
70
|
+
✓ Inventory collection → Feature identification
|
|
71
|
+
○ Flow mapping ○ Gap analysis
|
|
72
|
+
○ Report generation
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Update the block as each phase completes — mark completed phases with `✓`, the active phase with `→`, and remaining phases with `○`. Replace `[1/5]` with the current phase number.
|
|
76
|
+
|
|
77
|
+
## Output Location
|
|
78
|
+
|
|
79
|
+
All generated artifacts are written to:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
accounts/<PROFILE>/analysis/implementation-map/
|
|
83
|
+
├── implementation-map.md # Master document: inventory + cross-feature map
|
|
84
|
+
├── features/ # Per-feature summaries
|
|
85
|
+
│ ├── home-delivery.md
|
|
86
|
+
│ ├── click-collect.md
|
|
87
|
+
│ └── ...
|
|
88
|
+
├── diagrams/ # Mermaid source files
|
|
89
|
+
│ ├── feature-dependency.mmd # Cross-feature dependency graph
|
|
90
|
+
│ ├── entity-flow.mmd # Entity lifecycle overview
|
|
91
|
+
│ └── <feature>-flow.mmd # Per-feature flow diagram
|
|
92
|
+
├── gaps.md # Gap analysis: orphans, dead ends, missing handlers
|
|
93
|
+
└── inventory.json # Machine-readable: all workflows, rules, settings, feature clusters
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Important:** These are analysis artifacts, NOT feature lifecycle artifacts. They live under `analysis/`, not `features/`. To promote a discovered feature into the lifecycle, run `/fluent-use-case-discover` or `/fluent-feature-explain` to create `features/<slug>/`.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Phase 1: Inventory Collection
|
|
101
|
+
|
|
102
|
+
Collect all raw data from the environment. Sub-steps are parallelisable where noted.
|
|
103
|
+
|
|
104
|
+
### 1a. Workflows
|
|
105
|
+
|
|
106
|
+
1. Check if workflows exist at `accounts/<PROFILE>/workflows/<RETAILER>/`.
|
|
107
|
+
2. If missing or empty, download them:
|
|
108
|
+
```bash
|
|
109
|
+
mkdir -p accounts/<PROFILE>/workflows/<RETAILER>/
|
|
110
|
+
fluent workflow download -p <PROFILE> -r <RETAILER> -w all -o accounts/<PROFILE>/workflows/<RETAILER>/
|
|
111
|
+
```
|
|
112
|
+
3. Read all workflow JSON files. For each workflow, extract:
|
|
113
|
+
- Workflow name (e.g., `ORDER::HD`)
|
|
114
|
+
- Entity type and subtype (parse `<ENTITY_TYPE>::<SUBTYPE>` from name; if no `::`, treat as DEFAULT subtype)
|
|
115
|
+
- All statuses, rulesets, triggers, and rules
|
|
116
|
+
- Version number
|
|
117
|
+
|
|
118
|
+
**Produce:** Complete list of workflows with entity types, subtypes, and ruleset counts.
|
|
119
|
+
|
|
120
|
+
### 1b. Custom Rules (deployed)
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
MCP: plugin.list (no filter)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Produces: All deployed rules with module name, version, fully qualified rule key, description, parameters, and accepted entity types.
|
|
127
|
+
|
|
128
|
+
### 1c. Custom Rules (source code)
|
|
129
|
+
|
|
130
|
+
If `accounts/<PROFILE>/SOURCE/` exists:
|
|
131
|
+
|
|
132
|
+
1. Scan for `resources/module.json` files — extract rule registrations.
|
|
133
|
+
2. Scan for `src/main/java/**/*.java` files — extract rule classes, annotations, entity context.
|
|
134
|
+
3. Check for existing analysis artifacts at `accounts/<PROFILE>/analysis/code/source-map.json` — reuse if fresh.
|
|
135
|
+
|
|
136
|
+
**Produce:** Per-rule metadata (class name, entity context, referenced settings, test coverage).
|
|
137
|
+
|
|
138
|
+
### 1d. Settings
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
MCP: graphql.query — query settings by context (RETAILER, ACCOUNT)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Use cascading scope resolution: RETAILER scope first, then ACCOUNT scope.
|
|
145
|
+
|
|
146
|
+
**Produce:** All settings with keys, values, and contexts.
|
|
147
|
+
|
|
148
|
+
### 1e. Entity Type Catalogue
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
MCP: graphql.query — list entity types and subtypes in use
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Query `orderTypes`, `fulfilmentTypes`, `articleTypes`, etc. to determine which entity types and subtypes are configured.
|
|
155
|
+
|
|
156
|
+
### 1f. Webhook / Integration Inventory
|
|
157
|
+
|
|
158
|
+
Grep workflow JSONs for integration patterns:
|
|
159
|
+
- `SendWebhook` rule invocations (outbound webhooks)
|
|
160
|
+
- Setting keys matching `*.url`, `*.endpoint`, `webhook.*` patterns
|
|
161
|
+
- `ScheduleEvent` invocations (scheduled automations)
|
|
162
|
+
- External event receivers (rulesets with no inbound SendEvent from within the workflow)
|
|
163
|
+
|
|
164
|
+
**Produce:** Outbound and inbound integration point inventory.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Phase 2: Feature Identification
|
|
169
|
+
|
|
170
|
+
This phase is analytical — no external calls. Group raw inventory into logical features.
|
|
171
|
+
|
|
172
|
+
### 2a. Primary Grouping: Entity Type + Subtype
|
|
173
|
+
|
|
174
|
+
Group workflows by entity type:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
ORDER workflows: ORDER::HD, ORDER::CC, ORDER::MULTI
|
|
178
|
+
FULFILMENT workflows: FULFILMENT::HD, FULFILMENT::CC
|
|
179
|
+
ARTICLE workflows: ARTICLE::DEFAULT
|
|
180
|
+
WAVE workflows: WAVE::DEFAULT
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 2b. Feature Boundary Heuristics
|
|
184
|
+
|
|
185
|
+
A "feature" is a user-facing business capability that typically spans one or more entity types. Apply these heuristics in order:
|
|
186
|
+
|
|
187
|
+
1. **Subtype alignment** — An ORDER subtype (e.g., `HD`) usually pairs with a FULFILMENT subtype (e.g., `HD`). Group as one feature "Home Delivery".
|
|
188
|
+
2. **Cross-entity events** — If ORDER::HD sends events that FULFILMENT::HD workflows consume, they belong to the same feature.
|
|
189
|
+
3. **Shared custom rules** — If a custom rule is referenced by both ORDER::HD and FULFILMENT::HD workflows, they belong to the same feature.
|
|
190
|
+
4. **Naming convention** — Subtypes with the same suffix (HD, CC, MULTI) suggest feature families.
|
|
191
|
+
5. **Standalone entity types** — WAVE, ARTICLE often serve as shared infrastructure rather than a single feature. Mark as "shared infrastructure".
|
|
192
|
+
|
|
193
|
+
Each feature cluster carries a **confidence level**:
|
|
194
|
+
|
|
195
|
+
| Level | Meaning | Trigger |
|
|
196
|
+
|-------|---------|---------|
|
|
197
|
+
| `HIGH` | Subtype family match + event chain confirmed | Heuristics 1+2 agree |
|
|
198
|
+
| `MEDIUM` | Subtype family match only (no event chain confirmation) | Heuristic 1 only |
|
|
199
|
+
| `INFERRED` | Naming/rule pattern analysis | Heuristic 3-4 fallback |
|
|
200
|
+
| `UNCLUSTERED` | Could not assign to any feature | No heuristic matched |
|
|
201
|
+
|
|
202
|
+
Report UNCLUSTERED workflows separately — they need manual classification.
|
|
203
|
+
|
|
204
|
+
### 2c. Feature Classification
|
|
205
|
+
|
|
206
|
+
Classify each identified feature:
|
|
207
|
+
|
|
208
|
+
| Category | Definition | Example |
|
|
209
|
+
|----------|-----------|---------|
|
|
210
|
+
| **Business Feature** | End-to-end customer-facing flow spanning ORDER to FULFILMENT | Home Delivery, Click & Collect |
|
|
211
|
+
| **Processing Feature** | Backend automation within a single entity type | Wave management, Article pick/pack |
|
|
212
|
+
| **Infrastructure** | Shared services consumed by multiple features | Sourcing, Inventory allocation |
|
|
213
|
+
| **Integration** | Outbound/inbound data flows to external systems | Webhook delivery, Batch ingestion |
|
|
214
|
+
|
|
215
|
+
### 2d. Customisation Depth Scoring
|
|
216
|
+
|
|
217
|
+
Score each feature on a 0-4 scale:
|
|
218
|
+
|
|
219
|
+
| Score | Label | Criteria |
|
|
220
|
+
|-------|-------|----------|
|
|
221
|
+
| 0 | OOTB | All rules are OOTB, no custom settings |
|
|
222
|
+
| 1 | Configured | OOTB rules with custom prop values or settings |
|
|
223
|
+
| 2 | Extended | Mix of OOTB and custom rules |
|
|
224
|
+
| 3 | Custom | >50% of rules in the workflow are custom |
|
|
225
|
+
| 4 | Bespoke | All rules are custom, non-standard entity usage |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Phase 3: Flow Mapping
|
|
230
|
+
|
|
231
|
+
For each identified feature, trace the complete end-to-end flow.
|
|
232
|
+
|
|
233
|
+
### 3a. Entry Point Identification
|
|
234
|
+
|
|
235
|
+
Determine for each feature:
|
|
236
|
+
- What triggers it? (API call, scheduled event, inbound webhook, batch ingestion)
|
|
237
|
+
- What entity is created or modified first?
|
|
238
|
+
- What status does the entity start in?
|
|
239
|
+
|
|
240
|
+
### 3b. Workflow Path Tracing
|
|
241
|
+
|
|
242
|
+
For each workflow in the feature:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
For each ruleset:
|
|
246
|
+
- Trigger: status + event name
|
|
247
|
+
- Rules: ordered list (mark OOTB vs CUSTOM)
|
|
248
|
+
- Outcomes: status transitions (success path, error path)
|
|
249
|
+
- Cross-entity handoffs: events sent to other entity types
|
|
250
|
+
- Settings consumed: rule prop references to setting keys
|
|
251
|
+
- Webhooks fired: SendWebhook invocations with target URLs
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### 3c. Cross-Entity Flow Stitching
|
|
255
|
+
|
|
256
|
+
Follow the chain across entity types by matching:
|
|
257
|
+
- `SendEvent` rule outputs in workflow A to `eventName` triggers in workflow B
|
|
258
|
+
- `CreateEntity` rule invocations to entity type + subtype + initial status of the target workflow
|
|
259
|
+
|
|
260
|
+
Build the full chain: e.g., ORDER::HD (BOOKED) -> CreateFulfilment -> FULFILMENT::HD (CREATED) -> AllocateArticles -> ARTICLE (CREATED).
|
|
261
|
+
|
|
262
|
+
### 3d. Mermaid Diagram Generation
|
|
263
|
+
|
|
264
|
+
> **Mandatory:** Validate all Mermaid diagrams against `/fluent-mermaid-validate` rules before writing.
|
|
265
|
+
|
|
266
|
+
For each feature, generate:
|
|
267
|
+
|
|
268
|
+
**Sequence diagram** (cross-entity lifecycle):
|
|
269
|
+
````markdown
|
|
270
|
+
```mermaid
|
|
271
|
+
sequenceDiagram
|
|
272
|
+
participant ORD as ORDER::HD
|
|
273
|
+
participant FUL as FULFILMENT::HD
|
|
274
|
+
participant ART as ARTICLE
|
|
275
|
+
|
|
276
|
+
ORD->>ORD: CREATED to BOOKED (SourceOrder)
|
|
277
|
+
ORD->>FUL: CreateFulfilment
|
|
278
|
+
FUL->>ART: AllocateArticles
|
|
279
|
+
ART->>ART: CREATED to ACTIVE (AssignLocation)
|
|
280
|
+
ART-->>FUL: ArticleComplete event
|
|
281
|
+
FUL->>ORD: FulfilmentComplete event
|
|
282
|
+
```
|
|
283
|
+
````
|
|
284
|
+
|
|
285
|
+
**State diagram** (per entity, when `--depth detailed`):
|
|
286
|
+
````markdown
|
|
287
|
+
```mermaid
|
|
288
|
+
stateDiagram-v2
|
|
289
|
+
[*] --> CREATED
|
|
290
|
+
CREATED --> BOOKED : SourceOrder
|
|
291
|
+
BOOKED --> FULFILLED : AllItemsComplete
|
|
292
|
+
FULFILLED --> COMPLETE : CompleteOrder
|
|
293
|
+
```
|
|
294
|
+
````
|
|
295
|
+
|
|
296
|
+
**Cross-feature dependency graph** (always generated):
|
|
297
|
+
````markdown
|
|
298
|
+
```mermaid
|
|
299
|
+
flowchart TD
|
|
300
|
+
HD[Home Delivery] --> SRC[Sourcing]
|
|
301
|
+
CC[Click and Collect] --> SRC
|
|
302
|
+
HD --> INV[Inventory]
|
|
303
|
+
CC --> INV
|
|
304
|
+
HD --> SHIP[Shipping Integration]
|
|
305
|
+
SRC --> INV
|
|
306
|
+
```
|
|
307
|
+
````
|
|
308
|
+
|
|
309
|
+
Save Mermaid source files to `diagrams/` directory as `.mmd` files.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Phase 4: Gap Analysis
|
|
314
|
+
|
|
315
|
+
### 4a. Orphaned Rules
|
|
316
|
+
|
|
317
|
+
Cross-reference `plugin.list` output against all workflow rule references. Rules deployed but not referenced in any workflow ruleset are orphaned.
|
|
318
|
+
|
|
319
|
+
### 4b. Unused Settings
|
|
320
|
+
|
|
321
|
+
Cross-reference settings list against rule prop definitions in workflow JSONs. Settings that exist but are not referenced by any rule prop are potentially unused.
|
|
322
|
+
|
|
323
|
+
### 4c. Dead-End States
|
|
324
|
+
|
|
325
|
+
Identify workflow statuses with no outbound transitions that are not marked as terminal/final states. These are potential stuck points.
|
|
326
|
+
|
|
327
|
+
### 4d. Missing Cross-Entity Handlers
|
|
328
|
+
|
|
329
|
+
Identify events sent by one workflow that no other workflow has a trigger for. These are broken cross-entity handoffs.
|
|
330
|
+
|
|
331
|
+
### 4e. Undocumented Customisations
|
|
332
|
+
|
|
333
|
+
If source code exists under `accounts/<PROFILE>/SOURCE/`:
|
|
334
|
+
- Custom rules with no Javadoc or description
|
|
335
|
+
- Custom rules with no test class
|
|
336
|
+
- Custom rules not documented in any `features/` directory
|
|
337
|
+
|
|
338
|
+
### Gap Severity
|
|
339
|
+
|
|
340
|
+
| Severity | Criteria |
|
|
341
|
+
|----------|----------|
|
|
342
|
+
| HIGH | Missing cross-entity handler, dead-end state on happy path |
|
|
343
|
+
| MEDIUM | Orphaned deployed rule, dead-end state on error path |
|
|
344
|
+
| LOW | Unused setting, undocumented customisation |
|
|
345
|
+
| INFO | OOTB-only flow with no customisation (potential opportunity) |
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Phase 5: Report Generation
|
|
350
|
+
|
|
351
|
+
### Master Document (`implementation-map.md`)
|
|
352
|
+
|
|
353
|
+
Use this template:
|
|
354
|
+
|
|
355
|
+
```markdown
|
|
356
|
+
# Implementation Map: <RETAILER> on <PROFILE>
|
|
357
|
+
|
|
358
|
+
Generated: <timestamp>
|
|
359
|
+
Environment: <base-url>
|
|
360
|
+
Depth: <summary|detailed>
|
|
361
|
+
Focus: <entity-type or "all">
|
|
362
|
+
|
|
363
|
+
## Executive Summary
|
|
364
|
+
|
|
365
|
+
| Metric | Count |
|
|
366
|
+
|--------|-------|
|
|
367
|
+
| Workflows | <N> |
|
|
368
|
+
| Custom rules (deployed) | <N> |
|
|
369
|
+
| Custom rules (source) | <N> |
|
|
370
|
+
| Settings | <N> |
|
|
371
|
+
| Identified features | <N> |
|
|
372
|
+
| Shared infrastructure | <N> |
|
|
373
|
+
| Integrations | <N> |
|
|
374
|
+
| Customisation depth (avg) | <X.X> / 4 |
|
|
375
|
+
|
|
376
|
+
## Feature Inventory
|
|
377
|
+
|
|
378
|
+
| # | Feature | Category | Entity Types | Customisation | Workflows | Custom Rules | Key Integration |
|
|
379
|
+
|---|---------|----------|-------------|---------------|-----------|-------------|-----------------|
|
|
380
|
+
| 1 | <name> | <category> | <types> | <score> - <label> | <count> | <count> | <integration> |
|
|
381
|
+
|
|
382
|
+
## Cross-Feature Dependency Map
|
|
383
|
+
|
|
384
|
+
[Mermaid diagram from diagrams/feature-dependency.mmd]
|
|
385
|
+
|
|
386
|
+
## Per-Feature Summaries
|
|
387
|
+
|
|
388
|
+
### 1. <Feature Name>
|
|
389
|
+
|
|
390
|
+
**Category:** <Business Feature | Processing Feature | Infrastructure | Integration>
|
|
391
|
+
**Entry point:** <trigger description>
|
|
392
|
+
**End state:** <terminal state(s)>
|
|
393
|
+
**Flow:** <entity chain summary>
|
|
394
|
+
**Custom rules:** <list of custom rule names>
|
|
395
|
+
**Settings:** <count> (<key examples>)
|
|
396
|
+
**Integrations:** <outbound/inbound descriptions>
|
|
397
|
+
|
|
398
|
+
[Link to detailed flow: features/<slug>.md]
|
|
399
|
+
|
|
400
|
+
## Gaps & Risks
|
|
401
|
+
|
|
402
|
+
| # | Type | Description | Severity | Recommendation |
|
|
403
|
+
|---|------|-------------|----------|----------------|
|
|
404
|
+
| 1 | <type> | <description> | <severity> | <recommendation> |
|
|
405
|
+
|
|
406
|
+
[Full gap analysis: gaps.md]
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Per-Feature Summaries (`features/<slug>.md`)
|
|
410
|
+
|
|
411
|
+
For each feature, write a summary containing: overview (category, entity types, customisation score), entry point and terminal states, workflow path trace (rulesets marked OOTB/CUSTOM), cross-entity flow, Mermaid sequence diagram, settings consumed, integration points, and feature-specific gaps. When `--depth detailed`, include full state diagrams per entity and rule-level detail.
|
|
412
|
+
|
|
413
|
+
### Gap Analysis (`gaps.md`)
|
|
414
|
+
|
|
415
|
+
Consolidate all gaps from Phase 4 with severity, affected feature, and recommended action.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Quality Checklist
|
|
420
|
+
|
|
421
|
+
Before writing the master document, verify:
|
|
422
|
+
|
|
423
|
+
- [ ] All workflows from the workflow list are accounted for (either in a feature or marked as infrastructure)
|
|
424
|
+
- [ ] Each identified feature has at least one workflow or an explicit "no dedicated workflow" note (e.g., sourcing runs within ORDER flows)
|
|
425
|
+
- [ ] Cross-feature dependencies are bidirectional — if feature A depends on B, B's summary notes A as a dependent
|
|
426
|
+
- [ ] Customisation depth scores match the 0-4 criteria (count custom vs OOTB rules per feature)
|
|
427
|
+
- [ ] Orphaned rules list excludes OOTB rules (only custom orphans are flagged)
|
|
428
|
+
- [ ] Gap findings have severity assigned (HIGH / MEDIUM / LOW / INFO)
|
|
429
|
+
- [ ] Mermaid diagrams validated against `/fluent-mermaid-validate` rules (no colons in free text, no unicode arrows, quoted special-char labels)
|
|
430
|
+
- [ ] Feature count in Executive Summary matches Feature Inventory table row count
|
|
431
|
+
- [ ] Entity type catalogue accounts for all entity types found in workflow names
|
|
432
|
+
- [ ] Output directory created with `mkdir -p accounts/<PROFILE>/analysis/implementation-map/`
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Worked Example
|
|
437
|
+
|
|
438
|
+
Given an account with these workflows:
|
|
439
|
+
- `ORDER::HD`, `ORDER::CC`, `ORDER::MULTI`
|
|
440
|
+
- `FULFILMENT::HD`, `FULFILMENT::CC`
|
|
441
|
+
- `ARTICLE::DEFAULT`
|
|
442
|
+
- `WAVE::DEFAULT`
|
|
443
|
+
|
|
444
|
+
And these custom rules (from `plugin.list`):
|
|
445
|
+
- `CreateFulfilmentFromSourcingLocation` (ORDER context)
|
|
446
|
+
- `CalculateShippingCost` (FULFILMENT context)
|
|
447
|
+
- `AutoCompleteOrder` (ORDER context)
|
|
448
|
+
- `NotifyCustomerViaWebhook` (FULFILMENT context)
|
|
449
|
+
- `BulkArticleStatusUpdate` (ARTICLE context)
|
|
450
|
+
- `CustomSourceOrder` (ORDER context)
|
|
451
|
+
|
|
452
|
+
**Phase 2 identifies these features:**
|
|
453
|
+
|
|
454
|
+
| Feature | Category | Why |
|
|
455
|
+
|---------|----------|-----|
|
|
456
|
+
| Home Delivery (HD) | Business Feature | ORDER::HD + FULFILMENT::HD share `HD` subtype; `CreateFulfilmentFromSourcingLocation` bridges them |
|
|
457
|
+
| Click & Collect (CC) | Business Feature | ORDER::CC + FULFILMENT::CC share `CC` subtype |
|
|
458
|
+
| Multi-Location (MULTI) | Business Feature | ORDER::MULTI — may share fulfilment with HD or have its own |
|
|
459
|
+
| Article Management | Processing Feature | ARTICLE::DEFAULT — shared infrastructure, used by HD and CC |
|
|
460
|
+
| Wave Management | Processing Feature | WAVE::DEFAULT — shared infrastructure for warehouse operations |
|
|
461
|
+
| Sourcing | Infrastructure | No dedicated workflow — `CustomSourceOrder` runs within ORDER flows |
|
|
462
|
+
| Shipping Integration | Integration | `CalculateShippingCost` + `NotifyCustomerViaWebhook` + webhook settings |
|
|
463
|
+
|
|
464
|
+
**Phase 3 for "Home Delivery" produces this flow:**
|
|
465
|
+
|
|
466
|
+
```
|
|
467
|
+
ORDER::HD FULFILMENT::HD ARTICLE
|
|
468
|
+
-------- -------------- -------
|
|
469
|
+
CREATED
|
|
470
|
+
| CustomSourceOrder
|
|
471
|
+
BOOKED
|
|
472
|
+
| CreateFulfilmentFromSL
|
|
473
|
+
|------------------------> CREATED
|
|
474
|
+
| AllocateArticles
|
|
475
|
+
|------------------------> CREATED
|
|
476
|
+
| AssignLocation
|
|
477
|
+
ACTIVE
|
|
478
|
+
| PickArticle
|
|
479
|
+
PICKED
|
|
480
|
+
|---------------> ArticleComplete
|
|
481
|
+
FULFILLED <--------------
|
|
482
|
+
| CalculateShippingCost
|
|
483
|
+
| NotifyCustomerViaWebhook
|
|
484
|
+
COMPLETE
|
|
485
|
+
| AutoCompleteOrder <------
|
|
486
|
+
COMPLETE
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Graceful Degradation
|
|
492
|
+
|
|
493
|
+
When MCP tools are unavailable, the skill degrades gracefully:
|
|
494
|
+
|
|
495
|
+
| MCP Tool | Used For | Fallback |
|
|
496
|
+
|----------|----------|----------|
|
|
497
|
+
| `plugin.list` | Deployed rule inventory | Scan `accounts/<PROFILE>/SOURCE/` for `module.json` rule registrations. Report coverage as "source-only, deployed state unknown". |
|
|
498
|
+
| `graphql.query` | Settings, entity types | Use CLI: `fluent setting list -p <PROFILE> -r <RETAILER> -q '*'`. If CLI also unavailable, skip settings inventory and note in report. |
|
|
499
|
+
| `workflow.transitions` | Live workflow versions and user-action visibility checks | Use local workflow JSON only. Note versions may be stale; user-action runtime visibility cannot be confirmed without live transitions. |
|
|
500
|
+
|
|
501
|
+
When operating in degraded mode, complete all phases that can run from local files, add a **"Data Sources"** section to the master document listing which sources were available vs skipped, and flag reduced confidence for features relying on missing data.
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Machine-Readable Output (`inventory.json`)
|
|
506
|
+
|
|
507
|
+
Write `inventory.json` alongside the markdown report. This enables downstream tooling, diffing, and lifecycle bridging:
|
|
508
|
+
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"generated": "2026-02-25T14:30:00Z",
|
|
512
|
+
"profile": "HMDEV",
|
|
513
|
+
"retailer": "HM_TEST",
|
|
514
|
+
"features": [
|
|
515
|
+
{
|
|
516
|
+
"slug": "home-delivery",
|
|
517
|
+
"confidence": "HIGH",
|
|
518
|
+
"clusterMethod": "subtype-family + event-chain",
|
|
519
|
+
"category": "Business Feature",
|
|
520
|
+
"customisationScore": 3,
|
|
521
|
+
"workflows": ["ORDER::HD", "FULFILMENT::HD"],
|
|
522
|
+
"primaryEntity": "ORDER::HD",
|
|
523
|
+
"entryEvents": ["CreateOrder"],
|
|
524
|
+
"terminalStatuses": ["COMPLETE", "CANCELLED"],
|
|
525
|
+
"crossEntityEvents": ["CreateFulfilment", "FulfilmentComplete"],
|
|
526
|
+
"ruleCount": { "custom": 12, "ootb": 34 },
|
|
527
|
+
"settingsReferenced": ["WEBHOOK_ENDPOINT_ORDER_BOOK"],
|
|
528
|
+
"webhooks": ["NotifyWarehouse"],
|
|
529
|
+
"scheduledEvents": ["RetryAllocation"]
|
|
530
|
+
}
|
|
531
|
+
],
|
|
532
|
+
"unclustered": [
|
|
533
|
+
{ "workflow": "VIRTUAL_CATALOGUE::DEFAULT", "reason": "Standalone entity, no event connections" }
|
|
534
|
+
],
|
|
535
|
+
"crossFeatureConnections": [
|
|
536
|
+
{ "from": "home-delivery", "to": "inventory-management", "via": "UpdateInventory", "direction": "outbound" }
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Feature Stub Creation (`--create-stubs`)
|
|
544
|
+
|
|
545
|
+
When `--create-stubs` is passed, create `features/<slug>/status.json` for each discovered feature:
|
|
546
|
+
|
|
547
|
+
```json
|
|
548
|
+
{
|
|
549
|
+
"$schema": "feature-status-v1",
|
|
550
|
+
"feature": "home-delivery",
|
|
551
|
+
"retailers": ["HM_TEST"],
|
|
552
|
+
"status": "DISCOVERY",
|
|
553
|
+
"created": "2026-02-25",
|
|
554
|
+
"updated": "2026-02-25",
|
|
555
|
+
"spec": null,
|
|
556
|
+
"plan": null,
|
|
557
|
+
"planRevision": null,
|
|
558
|
+
"architecture": false,
|
|
559
|
+
"basedOn": null,
|
|
560
|
+
"next": "/fluent-feature-explain",
|
|
561
|
+
"sessions": [],
|
|
562
|
+
"_discoveredBy": "/fluent-implementation-map",
|
|
563
|
+
"_workflows": ["ORDER::HD", "FULFILMENT::HD"],
|
|
564
|
+
"_confidence": "HIGH"
|
|
565
|
+
}
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Fields prefixed with `_` are discovery metadata (not part of the standard schema). Downstream skills like `/fluent-feature-explain` can read `_workflows` to know which workflows to analyze.
|
|
569
|
+
|
|
570
|
+
**Lifecycle bridge:** After `--create-stubs`, the user can:
|
|
571
|
+
- Run `/fluent-feature-status` to see all discovered features
|
|
572
|
+
- Run `/fluent-feature-explain <slug>` on any feature (reads `_workflows`)
|
|
573
|
+
- Start the planning chain on any feature via `/fluent-use-case-discover`
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## Edge Cases
|
|
578
|
+
|
|
579
|
+
| Case | Handling |
|
|
580
|
+
|------|----------|
|
|
581
|
+
| Account with 0 workflows | Report "No workflows found" with guidance to deploy |
|
|
582
|
+
| Account with 1 workflow | Single-feature output (no clustering needed) |
|
|
583
|
+
| All workflows same entity type | Cluster by subtype only; if same subtype, single feature |
|
|
584
|
+
| Workflow with no subtype (e.g., `ORDER::ORDER`) | Use heuristic 3-4 or mark as UNCLUSTERED |
|
|
585
|
+
| 50+ workflows | Recommend `--depth summary` + `--focus` filter; paginate output |
|
|
586
|
+
| No custom rules (pure OOTB) | Still valid; customisation score = 0 for all features |
|
|
587
|
+
| No SOURCE/ directory | Skip code analysis; note in gap analysis |
|
|
588
|
+
| Circular event chains | Detect and flag as cross-feature loops (not errors) |
|
|
589
|
+
| Multiple retailers sharing workflows | Analyze per-retailer; note shared patterns |
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## Handoff Protocol
|
|
594
|
+
|
|
595
|
+
On completion:
|
|
596
|
+
|
|
597
|
+
```
|
|
598
|
+
-> READY: accounts/<PROFILE>/analysis/implementation-map/implementation-map.md
|
|
599
|
+
-> NEXT: /fluent-feature-explain --feature "<slug>" (for any feature needing deeper analysis)
|
|
600
|
+
-> NEXT: /fluent-scope-decompose (to convert inventory into lifecycle features)
|
|
601
|
+
-> NEXT: /fluent-rfl-assess (for production readiness check)
|
|
602
|
+
-> NEXT: /fluent-connection-analysis --validate (for runtime validation of flows)
|
|
603
|
+
-> BLOCKED: No workflows found. Download first: fluent workflow download -p <PROFILE> -r <RETAILER> -w all
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
## Error Reporting
|
|
607
|
+
|
|
608
|
+
| Error Type | Phase | Severity | Recovery |
|
|
609
|
+
|------------|-------|----------|----------|
|
|
610
|
+
| `PREREQ_MISSING` | 1a | CRITICAL | No workflows found — download workflows first |
|
|
611
|
+
| `ENV_UNREACHABLE` | 1b, 1d, 1e | HIGH | MCP unavailable — fall back to local files |
|
|
612
|
+
| `VALIDATION_FAILED` | 1a | MEDIUM | Workflow JSON parse error — skip workflow, continue |
|
|
613
|
+
| `PREREQ_MISSING` | 1c | LOW | No source code under SOURCE/ — proceed without source analysis |
|
|
614
|
+
|
|
615
|
+
## Learning Capture
|
|
616
|
+
|
|
617
|
+
This is an analysis skill — follow the **Learning Capture Protocol** (see CLAUDE.md Cross-Skill Conventions). After mapping the implementation, when the user confirms or corrects findings about feature inventory, cross-feature dependencies, or account-specific conventions, write the confirmed learning to the `implementation-learnings.md` auto-memory file under the relevant account heading.
|
|
618
|
+
|
|
619
|
+
## Session Tracking
|
|
620
|
+
|
|
621
|
+
Track: files written (`implementation-map.md`, `features/*.md`, `diagrams/*.mmd`, `gaps.md`), MCP tools called (`plugin.list`, `graphql.query`, `workflow.transitions` — all read-only). No environment mutations.
|
|
622
|
+
|
|
623
|
+
## Integration with Other Skills
|
|
624
|
+
|
|
625
|
+
| User Request After Map | Skill to Invoke |
|
|
626
|
+
|------------------------|-----------------|
|
|
627
|
+
| "Explain feature X in detail" | `/fluent-feature-explain --feature <slug>` |
|
|
628
|
+
| "I want to extend feature X" | `/fluent-use-case-discover` (with context from the map) |
|
|
629
|
+
| "Turn this into lifecycle features" | `/fluent-scope-decompose` (from the feature inventory) |
|
|
630
|
+
| "Show the full connection topology" | `/fluent-connection-analysis --deep --mermaid` |
|
|
631
|
+
| "Analyze the custom code" | `/fluent-custom-code` |
|
|
632
|
+
| "Is this production-ready?" | `/fluent-rfl-assess` |
|
|
633
|
+
| "Show me the workspace structure" | `/fluent-workspace-tree` |
|
|
634
|
+
|
|
635
|
+
## Cross-References
|
|
636
|
+
|
|
637
|
+
- Per-feature deep dive: `/fluent-feature-explain`
|
|
638
|
+
- Workflow structure: `/fluent-workflow-analyzer`
|
|
639
|
+
- Connection topology: `/fluent-connection-analysis`
|
|
640
|
+
- Custom code behavior: `/fluent-custom-code`
|
|
641
|
+
- Settings audit: `/fluent-settings`
|
|
642
|
+
- Scope decomposition: `/fluent-scope-decompose`
|
|
643
|
+
- Production readiness: `/fluent-rfl-assess`
|
|
644
|
+
- MCP tool reference: `/fluent-mcp-tools` -> `plugin.list`, `graphql.query`, `workflow.transitions`
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: fluent-job-batch
|
|
3
3
|
description: Diagnose and monitor JOB/BATCH orchestration entity lifecycles in Fluent Commerce. Covers JOB and BATCH entity workflows, status tracking, failure investigation, and performance monitoring. Distinct from batch data ingestion API. Triggers on "job batch", "batch management", "job lifecycle", "job status", "batch monitoring", "batch operations", "job entity".
|
|
4
4
|
user-invocable: true
|
|
5
|
+
read-only: true
|
|
5
6
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
7
|
argument-hint: [--job-id <id>] [--batch-id <id>] [--status ACTIVE|COMPLETED|FAILED]
|
|
7
8
|
---
|
|
@@ -19,6 +20,10 @@ This skill owns JOB/BATCH entity lifecycle diagnostics and monitoring.
|
|
|
19
20
|
- **Root cause diagnosis** → `/fluent-trace`
|
|
20
21
|
- **Workflow structure** → `/fluent-workflow-analyzer`
|
|
21
22
|
|
|
23
|
+
## Skill Type: Reference
|
|
24
|
+
|
|
25
|
+
This is a **reference skill** — it provides diagnostic patterns and monitoring guidance for JOB/BATCH entity lifecycles but does not modify code or environments. Implementation changes (workflow edits, batch API calls) should be delegated to the appropriate skills listed in the Ownership Boundary above.
|
|
26
|
+
|
|
22
27
|
## Disambiguation: JOB/BATCH Orchestration vs Batch Ingestion API
|
|
23
28
|
|
|
24
29
|
| Concept | What It Is | Skill |
|
|
@@ -89,6 +94,8 @@ event.list({
|
|
|
89
94
|
})
|
|
90
95
|
```
|
|
91
96
|
|
|
97
|
+
> **Canonical reference:** See `/fluent-event-api` for complete event status values, filter syntax, and query patterns.
|
|
98
|
+
|
|
92
99
|
### Query JOB Entity State
|
|
93
100
|
```graphql
|
|
94
101
|
{
|
|
@@ -113,6 +120,9 @@ Note: The `jobs` GraphQL query root may not exist in all Fluent versions. If una
|
|
|
113
120
|
## Troubleshooting
|
|
114
121
|
|
|
115
122
|
### JOB Stuck in ACTIVE
|
|
123
|
+
|
|
124
|
+
> **Event filter reference:** For complete filter syntax, see `/fluent-event-api`. The examples below show batch-specific patterns.
|
|
125
|
+
|
|
116
126
|
1. Check if batches are still processing: query BATCH events for the JOB
|
|
117
127
|
2. Check if auto-close time has passed (midnight UTC)
|
|
118
128
|
3. Check for exceptions: `event.list({ category: "exception", "context.rootEntityType": "JOB", "context.rootEntityId": "<ID>" })`
|