@fluentcommerce/ai-skills 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +17 -12
  2. package/bin/cli.mjs +219 -43
  3. package/content/cli/skills/fluent-bootstrap/SKILL.md +1 -1
  4. package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +1 -1
  5. package/content/cli/skills/fluent-cli-reference/SKILL.md +1 -1
  6. package/content/cli/skills/fluent-cli-retailer/SKILL.md +1 -1
  7. package/content/cli/skills/fluent-connect/SKILL.md +58 -3
  8. package/content/cli/skills/fluent-profile/SKILL.md +35 -5
  9. package/content/cli/skills/fluent-workflow/SKILL.md +2 -1
  10. package/content/dev/agents/fluent-backend-dev.md +2 -2
  11. package/content/dev/agents/fluent-dev.md +1 -1
  12. package/content/dev/agents/fluent-frontend-dev.md +1 -1
  13. package/content/dev/skills/fluent-account-snapshot/SKILL.md +1 -1
  14. package/content/dev/skills/fluent-archive/SKILL.md +2 -1
  15. package/content/dev/skills/fluent-build/SKILL.md +2 -2
  16. package/content/dev/skills/fluent-connection-analysis/SKILL.md +2 -1
  17. package/content/dev/skills/fluent-custom-code/SKILL.md +3 -2
  18. package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +7 -6
  19. package/content/dev/skills/fluent-e2e-test/SKILL.md +1 -1
  20. package/content/dev/skills/fluent-entity-flow-diagnose/SKILL.md +2 -1
  21. package/content/dev/skills/fluent-event-api/SKILL.md +3 -2
  22. package/content/dev/skills/fluent-feature-explain/SKILL.md +2 -1
  23. package/content/dev/skills/fluent-feature-plan/SKILL.md +2 -1
  24. package/content/dev/skills/fluent-feature-status/SKILL.md +1 -1
  25. package/content/dev/skills/fluent-frontend-build/SKILL.md +1 -1
  26. package/content/dev/skills/fluent-frontend-readme/SKILL.md +2 -1
  27. package/content/dev/skills/fluent-frontend-review/SKILL.md +2 -1
  28. package/content/dev/skills/fluent-goal/SKILL.md +1 -1
  29. package/content/dev/skills/fluent-implementation-map/SKILL.md +1 -1
  30. package/content/dev/skills/fluent-inventory-catalog/SKILL.md +2 -2
  31. package/content/dev/skills/fluent-job-batch/SKILL.md +6 -3
  32. package/content/dev/skills/fluent-knowledge-init/SKILL.md +1 -1
  33. package/content/dev/skills/{fluent-source-onboard → fluent-module-convert}/SKILL.md +223 -24
  34. package/content/dev/skills/fluent-module-scaffold/SKILL.md +2 -1
  35. package/content/dev/skills/fluent-module-validate/SKILL.md +8 -7
  36. package/content/dev/skills/fluent-mystique-assess/SKILL.md +22 -6
  37. package/content/dev/skills/fluent-mystique-builder/SKILL.md +33 -2
  38. package/content/dev/skills/fluent-mystique-component/SKILL.md +1 -1
  39. package/content/dev/skills/fluent-mystique-diff/SKILL.md +1 -1
  40. package/content/dev/skills/fluent-mystique-preview/SKILL.md +19 -2
  41. package/content/dev/skills/fluent-mystique-scaffold/SDK_REFERENCE.md +2 -2
  42. package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +13 -2
  43. package/content/dev/skills/fluent-mystique-scaffold/TEMPLATES.md +1 -1
  44. package/content/dev/skills/fluent-mystique-sdk-reference/SKILL.md +2 -1
  45. package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +3 -3
  46. package/content/dev/skills/fluent-retailer-config/SKILL.md +3 -3
  47. package/content/dev/skills/fluent-rollback/SKILL.md +1 -1
  48. package/content/dev/skills/fluent-rule-lookup/SKILL.md +2 -1
  49. package/content/dev/skills/fluent-rule-scaffold/SKILL.md +7 -6
  50. package/content/dev/skills/fluent-rule-test/SKILL.md +2 -1
  51. package/content/dev/skills/fluent-scope-plan/SKILL.md +2 -2
  52. package/content/dev/skills/fluent-session/SKILL.md +1 -1
  53. package/content/dev/skills/fluent-settings/SKILL.md +2 -2
  54. package/content/dev/skills/fluent-skill-observability/SKILL.md +1 -1
  55. package/content/dev/skills/fluent-sourcing/SKILL.md +38 -13
  56. package/content/dev/skills/fluent-system-monitoring/SKILL.md +1 -1
  57. package/content/dev/skills/fluent-test-data/SKILL.md +1 -1
  58. package/content/dev/skills/fluent-trace/SKILL.md +3 -2
  59. package/content/dev/skills/fluent-transition-api/SKILL.md +3 -2
  60. package/content/dev/skills/fluent-ui-record/SKILL.md +1 -1
  61. package/content/dev/skills/fluent-ui-test/SKILL.md +9 -8
  62. package/content/dev/skills/fluent-use-case-discover/SKILL.md +2 -2
  63. package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +3 -2
  64. package/content/dev/skills/fluent-workspace-tree/SKILL.md +4 -3
  65. package/content/knowledge/index.md +3 -3
  66. package/content/knowledge/platform/domain-model.md +1 -0
  67. package/content/knowledge/platform/module-structure.md +5 -5
  68. package/content/knowledge/platform/mystique-routing.md +6 -3
  69. package/content/knowledge/platform/permissions-and-contexts.md +2 -2
  70. package/content/knowledge/platform/rule-test-patterns.md +1 -1
  71. package/content/knowledge/platform/workflow-json-structure.md +1 -1
  72. package/content/mcp-extn/skills/fluent-mcp-core/SKILL.md +2 -1
  73. package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +3 -2
  74. package/content/rfl/skills/fluent-rfl-assess/SKILL.md +1 -1
  75. package/docs/01-first-session.md +175 -0
  76. package/docs/02-prompt-guide.md +246 -0
  77. package/docs/03-use-cases.md +1181 -0
  78. package/docs/04-onboarding-plan.md +355 -0
  79. package/docs/05-getting-started.md +262 -0
  80. package/docs/06-dev-workflow.md +1040 -0
  81. package/docs/INDEX.md +40 -0
  82. package/docs/agents-and-skills-guide.md +199 -0
  83. package/docs/capability-map.md +165 -0
  84. package/docs/chrome-devtools-mcp-reference.md +401 -0
  85. package/docs/fluent-ai-skills-reference.md +1351 -0
  86. package/docs/manifest-safety.md +79 -0
  87. package/docs/mcp-servers.md +209 -0
  88. package/docs/workflow-reference.md +167 -0
  89. package/lib/fluent-brand.css +55 -0
  90. package/metadata.json +7 -6
  91. package/package.json +17 -3
  92. package/scripts/postinstall.mjs +38 -0
  93. package/{content/dev/skills/fluent-trace/scripts/analyze-event-capture.mjs → tools/event-capture-analyzer.mjs} +3 -3
  94. package/tools/{generate-feature-dashboard.mjs → feature-dashboard.mjs} +2 -2
  95. package/tools/manifest-diff.mjs +1 -1
  96. package/{content/dev/skills/fluent-mystique-assess/validator.mjs → tools/manifest-validator.mjs} +2 -2
  97. package/tools/workflow-explainer.mjs +1021 -0
@@ -0,0 +1,355 @@
1
+ # Fluent AI Skills — Developer Onboarding Plan
2
+
3
+ > [!CAUTION]
4
+ > **EXPERIMENTAL - LABS PROJECT**
5
+ >
6
+ > This package is not production-ready. No stability guarantees, no support, no warranty. See `../README.md` for the full disclaimer.
7
+
8
+ A structured two-week onboarding plan for senior developers adopting AI-assisted development for Fluent OMS. Covers installation through to shipping a complete end-to-end feature using agents and skills as daily tools.
9
+
10
+ **Prerequisites:** Complete [Your First Session](01-first-session.md) before starting this plan (20 minutes). For skill reference, see [Prompt Guide](02-prompt-guide.md). For prerequisites and troubleshooting, see [Setup Reference & Troubleshooting](05-getting-started.md).
11
+
12
+ > **Solo developer?** Follow Day 1-2 tasks from Week 1, then jump straight to Week 2 Day 1. Skip team review steps ("review as a team", "share with the team") — the AI-generated plans and architecture docs serve the same validation purpose for individual work.
13
+
14
+ > **Examples below use Claude Code slash commands.** In Codex or Gemini CLI, use natural-language prompts such as `Use the fluent-connect skill to connect this workspace with profile YOUR_PROFILE.` instead of `/fluent-*`.
15
+
16
+ ---
17
+
18
+ ## Table of Contents
19
+
20
+ - [Week 1 — Orientation and Read-Only Exploration](#week-1--orientation-and-read-only-exploration)
21
+ - [Day 1 — Install, Connect, Orient](#day-1--install-connect-orient)
22
+ - [Day 2 — Understand the Existing Implementation](#day-2--understand-the-existing-implementation)
23
+ - [End of Week 1 — First Design Work](#end-of-week-1--first-design-work-requirements--planning)
24
+ - [Week 2 — Build, Deploy, and Verify](#week-2--build-deploy-and-verify)
25
+ - [Day 1 — Backend: Rules, Workflow, Module](#day-1-week-2--backend-rules-workflow-module)
26
+ - [Day 2 — Frontend: UI Component or Manifest Change](#day-2-week-2--frontend-ui-component-or-manifest-change)
27
+ - [End of Week 2 — Deploy, Test, and Verify](#end-of-week-2--deploy-test-and-verify)
28
+ - [Summary](#summary)
29
+ - [Calibration Tips for Senior Developers](#calibration-tips-for-senior-developers)
30
+
31
+ ---
32
+
33
+ ## Week 1 — Orientation and Read-Only Exploration
34
+
35
+ The entire first week is read-only. No code, no workflows, no deployments. The goal is to build a mental model of the implementation *and* of how the AI tools reason about it — so that when you start building in Week 2, you trust the AI's analysis.
36
+
37
+ ---
38
+
39
+ ### Day 1 — Install, Connect, Orient
40
+
41
+ **Theme:** Get the environment working and understand what the workspace is
42
+
43
+ **Tasks:**
44
+
45
+ 1. **Complete [Your First Session](01-first-session.md)** (20 minutes) — install, connect, and explore. Once done, you'll have MCP servers running, workspace initialized, and all workflows downloaded.
46
+
47
+ 2. **Go deeper** — Check MCP connectivity and the live environment:
48
+ ```
49
+ List all deployed modules and their versions
50
+ ```
51
+ Then:
52
+ ```
53
+ What settings exist for ORDER workflows?
54
+ ```
55
+
56
+ 3. **Map what has been built:**
57
+ ```
58
+ What has been built on this account? Give me a feature inventory.
59
+ ```
60
+ This runs `/fluent-implementation-map` and produces `analysis/implementation-map/` — a feature inventory that reverse-engineers the implementation from workflows, rules, and settings.
61
+
62
+ **Expected outcomes by end of Day 1:**
63
+ - MCP servers running and all three connected (`fluent-mcp`, `fluent-mcp-extn`, `chrome-devtools`)
64
+ - Workspace fully initialized under `accounts/<PROFILE>/`
65
+ - All workflow JSONs downloaded and accessible
66
+ - Confident the AI has real connectivity to your environment
67
+ - Team can navigate the workspace directory structure without help
68
+
69
+ ---
70
+
71
+ ### Day 2 — Understand the Existing Implementation
72
+
73
+ **Theme:** Map the full implementation by letting the AI reverse-engineer it for you
74
+
75
+ **Tasks:**
76
+
77
+ 1. **Explain a key feature end-to-end** — Pick the most important order flow (e.g. Home Delivery):
78
+ ```
79
+ Explain how Home Delivery works end-to-end
80
+ ```
81
+ This runs `/fluent-feature-explain` and produces `features/home-delivery/architecture.md` — a persisted Feature Architecture Document with Mermaid state machine diagrams, cross-entity sequence diagrams, rules tables with logic descriptions, settings dependencies, and integration points. Share this with the team.
82
+
83
+ 3. **Analyze a workflow structurally:**
84
+ ```
85
+ Analyze ORDER::HD for orphaned rulesets and trigger coverage gaps
86
+ ```
87
+ This runs `/fluent-workflow-analyzer` — you get a status graph, event chains, orphan detection, and structural issues. This is what the AI uses internally when planning changes.
88
+
89
+ 4. **Understand custom code:**
90
+ ```
91
+ Analyze the custom code for this account
92
+ ```
93
+ The AI scans `SOURCE/backend/`, maps each rule to the workflow ruleset it serves, generates behavior descriptions, and flags any deployed rules with no local source. This is your introduction to `/fluent-custom-code`.
94
+
95
+ 5. **(Optional) Explain a second feature** — Repeat the `feature-explain` step on another core flow (e.g. Click & Collect, Returns if present) to build broader context.
96
+
97
+ **Expected outcomes by end of Day 2:**
98
+ - `analysis/implementation-map/` generated and reviewed by the team
99
+ - At least 2 Feature Architecture Documents in `features/*/architecture.md`, with Mermaid diagrams shared in Confluence or equivalent
100
+ - Each developer can explain the main order flow in their own words, validated against the generated documentation
101
+ - Team understands the workflow → ruleset → rule → setting dependency chain
102
+
103
+ ---
104
+
105
+ ### End of Week 1 — First Design Work (Requirements + Planning)
106
+
107
+ **Theme:** Move from read-only into the planning layer. No environment changes yet — plans only.
108
+
109
+ **Tasks:**
110
+
111
+ 1. **Debug a real issue or simulate one** — Trace a stuck or interesting entity:
112
+ ```
113
+ Why is order HD-12345 stuck in BOOKED?
114
+ ```
115
+ Or if no stuck order exists:
116
+ ```
117
+ Trace the last failed event in the ORDER workflow
118
+ ```
119
+ This runs `/fluent-trace` and introduces the event investigation pattern — `event_list`, `event_flowInspect`, root cause analysis, and remediation suggestions. Practice reading the output before needing it under pressure.
120
+
121
+ 2. **Check the event model:**
122
+ ```
123
+ How does event routing work in Fluent? What event types exist for ORDER?
124
+ ```
125
+ This runs `/fluent-event-api` and gives you the event data model, causality tracing patterns, and integration event contracts. Essential background before writing rules.
126
+
127
+ 3. **Gather requirements for a new feature** — Choose a small, realistic feature your team actually wants to build (e.g. an appeasement flow, a return order, a click-and-collect extension). Run the requirements wizard:
128
+ ```
129
+ Help me define use cases for [your chosen feature]
130
+ ```
131
+ This runs `/fluent-use-case-discover` interactively — the AI walks through triggers, actors, business rules, and edge cases. Review the resulting `spec.md` together as a team. Say `"approved"` when the spec is right.
132
+
133
+ 4. **Plan the feature:**
134
+ ```
135
+ Plan the [feature name] feature
136
+ ```
137
+ This runs `/fluent-feature-plan` and produces the 18-section technical plan in `features/<slug>/plan.md` — rules inventory with NEW/EXISTING/OOTB classification, workflow state machine changes, settings, risk assessment, and test plan. **Do not approve it yet** — the goal this week is to read and critique the plan, not execute it.
138
+
139
+ 5. **Review the plan as a team** — Go through `plan.md` together. Check: Are the rules the AI identified correct? Does the state machine match your understanding? Are there settings or edge cases it missed? This is how you calibrate trust in the AI's planning.
140
+
141
+ **Expected outcomes by end of Week 1:**
142
+ - At least one complete `spec.md` (approved) and one `plan.md` (reviewed but not yet approved) in `features/<slug>/`
143
+ - Team has practiced the full read-only skill suite: `feature-explain`, `implementation-map`, `workflow-analyzer`, `custom-code`, `trace`, `event-api`
144
+ - Everyone understands the difference between IDE/tool permission prompts and the skill approval gate
145
+ - Confidence level established: the team knows where the AI is reliable and where to verify its output
146
+
147
+ ---
148
+
149
+ ## Week 2 — Build, Deploy, and Verify
150
+
151
+ Now you build the feature planned in Week 1. The AI does the heavy lifting — your job is to review, approve, and test.
152
+
153
+ ---
154
+
155
+ ### Day 1 (Week 2) — Backend: Rules, Workflow, Module
156
+
157
+ **Theme:** Approve the plan and build the backend artifacts
158
+
159
+ **Tasks:**
160
+
161
+ 1. **Approve the plan:**
162
+ ```
163
+ Approved
164
+ ```
165
+ `status.json` moves to `APPROVED`, and `next` points to `/fluent-module-scaffold`.
166
+
167
+ 2. **Scaffold the module** (if this is a new module — skip if adding to an existing one):
168
+ ```
169
+ Scaffold the module
170
+ ```
171
+ Creates a Maven project skeleton under `SOURCE/backend/fc-module-<name>/` with `pom.xml`, `module.json`, and source directories.
172
+
173
+ 3. **Create the rules:**
174
+ ```
175
+ Create the rules from the plan
176
+ ```
177
+ The AI scaffolds each Java rule class with pseudo logic from the plan, generates matching test classes, and registers rules in `module.json`. Review each generated class — the logic is pseudo-code, not production code. This is where your domain expertise shapes the implementation.
178
+
179
+ 4. **Build the workflow:**
180
+ ```
181
+ Build the workflow from the plan
182
+ ```
183
+ Constructs the workflow JSON, validates with `/fluent-workflow-analyzer` for orphaned rulesets and trigger conflicts, and writes it under `workflows/<RETAILER>/`. Review the output against the plan's state machine diagram.
184
+
185
+ 5. **Audit settings:**
186
+ ```
187
+ What settings does this feature need? Are they configured?
188
+ ```
189
+ Runs `/fluent-settings` to discover required settings, check live values, and flag anything missing before deployment.
190
+
191
+ 6. **Validate and build:**
192
+ ```
193
+ Run pre-deploy checks for [module name]
194
+ ```
195
+ 37 quality gates across 9 phases. Review the GO/NO-GO report. Fix any blocking issues before continuing.
196
+
197
+ Then:
198
+ ```
199
+ Build the [module name] module
200
+ ```
201
+
202
+ **Expected outcomes by end of Day 1 (Week 2):**
203
+ - Module ZIP built and in `dist/`
204
+ - Workflow JSON created and validated
205
+ - Pre-deploy check report green (or known issues flagged with a plan to fix)
206
+ - Each developer has read and understands at least one generated rule class
207
+
208
+ ---
209
+
210
+ ### Day 2 (Week 2) — Frontend: UI Component or Manifest Change
211
+
212
+ **Theme:** Extend the OMS UI to surface the new feature
213
+
214
+ > If the feature has no UI component, substitute this day with a second backend feature or a settings/retailer-config task.
215
+
216
+ **Tasks:**
217
+
218
+ 1. **Understand the existing UI:**
219
+ ```
220
+ Analyze the admin manifest — what pages and components exist?
221
+ ```
222
+ Runs `/fluent-mystique-assess` and gives you a complexity-scored breakdown of the manifest with Mermaid route and component tree diagrams.
223
+
224
+ 2. **Preview before building:**
225
+ ```
226
+ Preview what the [new feature] card would look like on the order detail page
227
+ ```
228
+ Runs `/fluent-mystique-preview` to show the likely UI change before touching any manifest. Fast iteration without risk.
229
+
230
+ 3. **Build the manifest change or SDK component:**
231
+
232
+ If the requirement can be met with manifest config:
233
+ ```
234
+ Add a [description] component to the order detail page
235
+ ```
236
+ Runs `/fluent-mystique-builder`. The AI applies the change and explains each decision.
237
+
238
+ If a custom component is needed:
239
+ ```
240
+ Scaffold a custom [name] component for the Mystique SDK
241
+ ```
242
+ Runs `/fluent-mystique-scaffold` to create a full buildable SDK project with TypeScript, webpack, Storybook, and Jest.
243
+
244
+ 4. **Validate the manifest:**
245
+ ```
246
+ Validate the admin manifest
247
+ ```
248
+ Runs `/fluent-mystique-assess` — ~50 validation rules across 6 phases: schema compliance, component resolution, query validation, i18n, prop verification, cross-manifest consistency.
249
+
250
+ 5. **Build the frontend (if an SDK project was created):**
251
+ ```
252
+ Build the [component project name] project
253
+ ```
254
+ Runs `/fluent-frontend-build` through 7 gates: TypeScript compilation, lint, tests with coverage, production webpack build, bundle verification, externals check, GraphQL schema validation.
255
+
256
+ **Expected outcomes by end of Day 2 (Week 2):**
257
+ - Manifest updated or SDK bundle built
258
+ - Validation passing
259
+ - Developers understand the OOTB-vs-custom decision framework (config first, SDK only when needed)
260
+
261
+ ---
262
+
263
+ ### End of Week 2 — Deploy, Test, and Verify
264
+
265
+ **Theme:** Ship the feature, run E2E tests, verify in the browser
266
+
267
+ **Tasks:**
268
+
269
+ 1. **Deploy:**
270
+ ```
271
+ Deploy [module name] to [RETAILER]
272
+ ```
273
+ Then:
274
+ ```
275
+ Deploy [WORKFLOW_NAME] to [RETAILER]
276
+ ```
277
+ The AI confirms each step before executing. Review the confirmation summary before approving each deployment.
278
+
279
+ 2. **Create test data:**
280
+ ```
281
+ Create a test HD order for the [feature] flow
282
+ ```
283
+ Runs `/fluent-test-data` — discovers real locations, products, catalogues, and inventory from your retailer environment and generates valid entity creation payloads. No manual JSON crafting.
284
+
285
+ 3. **Run E2E tests:**
286
+ ```
287
+ Run E2E test for the [feature name] flow
288
+ ```
289
+ Runs `/fluent-e2e-test` — creates entities, sends events, polls for expected status transitions, and reports pass/fail per scenario from the plan's test plan.
290
+
291
+ 4. **Verify the UI in the browser:**
292
+ ```
293
+ Test the OMS orders page in the browser — check the [feature] renders correctly
294
+ ```
295
+ Runs `/fluent-ui-test` via Chrome DevTools MCP — automated browser login, navigation, component rendering verification, screenshot capture, and console error detection.
296
+
297
+ 5. **Record evidence:**
298
+ ```
299
+ Record before/after screenshots of the [feature] UI
300
+ ```
301
+ Runs `/fluent-ui-record` — annotated walkthrough screenshots saved as evidence in `features/<slug>/assets/`.
302
+
303
+ 6. **Run the go-live readiness assessment:**
304
+ ```
305
+ Run an RFL assessment for this feature
306
+ ```
307
+ Runs `/fluent-rfl-assess` — production readiness audit across workflows, rules, settings, and architecture. Identifies any gaps before promoting to higher environments.
308
+
309
+ 7. **Wrap up the session:**
310
+ ```
311
+ What skills ran this session? Show the decision chain.
312
+ ```
313
+ Runs `/fluent-session` — the audit trail of every skill invocation, tool call, gate result, and environment change. Export as JSON for the team's records.
314
+
315
+ **Expected outcomes by end of Week 2:**
316
+ - Feature deployed to the target retailer environment
317
+ - E2E test scenarios passing
318
+ - UI verified in the browser with screenshots as evidence
319
+ - `status.json` at `DEPLOYED` or `VERIFIED`
320
+ - RFL assessment completed with a clear list of any remaining gaps for promotion
321
+ - Session audit exported
322
+
323
+ ---
324
+
325
+ ## Summary
326
+
327
+ | Milestone | Skills in play | Gate |
328
+ |---|---|---|
329
+ | **Day 1** | `fluent-connect`, `fluent-workspace-tree`, `fluent-settings` | Read-only — no gate |
330
+ | **Day 2** | `fluent-implementation-map`, `fluent-feature-explain`, `fluent-workflow-analyzer`, `fluent-custom-code` | Read-only — no gate |
331
+ | **End of Week 1** | `fluent-trace`, `fluent-event-api`, `fluent-use-case-discover`, `fluent-feature-plan` | Spec approval + plan review (not yet approved) |
332
+ | **Day 1, Week 2** | `fluent-module-scaffold`, `fluent-rule-scaffold`, `fluent-workflow-builder`, `fluent-settings`, `fluent-pre-deploy-check`, `fluent-build` | Plan approval gate before scaffold begins |
333
+ | **Day 2, Week 2** | `fluent-mystique-assess`, `fluent-mystique-preview`, `fluent-mystique-builder` or `fluent-mystique-scaffold`, `fluent-frontend-build` | Per-manifest confirmation |
334
+ | **End of Week 2** | `fluent-module-deploy`, `fluent-workflow-deploy`, `fluent-test-data`, `fluent-e2e-test`, `fluent-ui-test`, `fluent-ui-record`, `fluent-rfl-assess`, `fluent-session` | Deployment confirmation gate |
335
+
336
+ ---
337
+
338
+ ## Calibration Tips for Senior Developers
339
+
340
+ - **Read-only skills are always safe.** `explain`, `analyze`, `trace`, `validate`, `audit` — run these without ceremony at any time. They produce no environment changes.
341
+ - **There are two kinds of prompts.** Tool permission prompts come from the IDE sandbox and are about shell/filesystem access. Approval-gate prompts come from the skills and are about whether the AI should proceed with a planned change.
342
+ - **The approval gate is your ally.** The AI always presents a plan and waits. Use this to review intent before execution, not just to rubber-stamp it.
343
+ - **Trust is earned by reading the output.** The Feature Architecture Documents and pre-deploy reports are the AI's reasoning made visible. Read them critically — this is where your domain knowledge adds the most value.
344
+ - **Persist knowledge early.** After Day 2, run `/fluent-knowledge-init` to capture your account's conventions, integration contracts, and test data patterns. This makes every subsequent session more accurate.
345
+ - **Natural language first, slash commands for precision.** Use plain English for intent-driven tasks. Use `/fluent-<skill>` when you know exactly what you want and want to skip routing.
346
+
347
+ ---
348
+
349
+ ## Further Reading
350
+
351
+ | Document | What it covers |
352
+ |---|---|
353
+ | [Prompt Guide](02-prompt-guide.md) | Which skills exist, what to type, routing, and lifecycle |
354
+ | [Use Cases](03-use-cases.md) | 21 scenario-based prompts with expected outcomes |
355
+ | [Dev Workflow](06-dev-workflow.md) | Full autonomous development protocol and approval gate rules |
@@ -0,0 +1,262 @@
1
+ # Setup Reference & Troubleshooting
2
+
3
+ > [!CAUTION]
4
+ > **EXPERIMENTAL - LABS PROJECT**
5
+ > This package is not production-ready. No stability guarantees, no support, no warranty. See [README](../README.md) for full disclaimer.
6
+
7
+ Prerequisites, workspace layout, and troubleshooting for `@fluentcommerce/ai-skills`.
8
+
9
+ **First time?** Start with [Your First Session](01-first-session.md) — a 20-minute guided walkthrough.
10
+ **Which skill for what?** See [Prompt Guide](02-prompt-guide.md) — progressive skill navigator.
11
+ **Reading order:** See [INDEX.md](INDEX.md) for the numbered documentation path.
12
+
13
+ > **Examples below use Claude Code slash commands.** In Codex or Gemini CLI, use natural-language prompts instead of `/fluent-*` commands.
14
+
15
+ ---
16
+
17
+ ## Table of Contents
18
+
19
+ - [1. Prerequisites](#1-prerequisites)
20
+ - [2. Install and Connect](#2-install-and-connect)
21
+ - [3. Workspace Layout](#3-workspace-layout)
22
+ - [4. The Approval Gate](#4-the-approval-gate)
23
+ - [5. Resuming Work Across Sessions](#5-resuming-work-across-sessions)
24
+ - [6. Troubleshooting](#6-troubleshooting)
25
+
26
+ ---
27
+
28
+ ## 1. Prerequisites
29
+
30
+ | Requirement | How to check |
31
+ |-------------|-------------|
32
+ | Node.js 18+ (20+ recommended) | `node --version` |
33
+ | Fluent CLI installed | `fluent --version` (install from [docs.fluentcommerce.com](https://docs.fluentcommerce.com/building-blocks/fluent-cli-package)) |
34
+ | A Fluent Commerce account | Base URL, credentials, and a retailer to work with |
35
+ | A Fluent CLI profile configured | `fluent profile create YOUR_PROFILE --id <id> --username <user> --password <pass> --client-secret <secret> --base-url <url>` |
36
+ | Anthropic account | [console.anthropic.com](https://console.anthropic.com) — Claude Code prompts on first launch |
37
+ | Claude Code, Codex, or Gemini CLI | Claude Code is the primary target; Codex and Gemini CLI support is experimental |
38
+
39
+ See the [README](../README.md) for full installation details.
40
+
41
+ ---
42
+
43
+ ## 2. Install and Connect
44
+
45
+ ```bash
46
+ npx @fluentcommerce/ai-skills install --profile YOUR_PROFILE
47
+ ```
48
+
49
+ This single command:
50
+ - Installs all Fluent skill groups into your IDE (Claude Code marketplace plugin, or file-copy fallback)
51
+ - Auto-generates `.mcp.json` with three MCP servers: `fluent-mcp` (official CLI), `fluent-mcp-extn` (extension tools), and `chrome-devtools` (browser UI testing)
52
+ - Copies packaged `knowledge/` and `docs/` into the workspace
53
+ - Generates starter `CLAUDE.md` and `AGENTS.md` workspace instruction files when they do not already exist
54
+ - Checks prerequisites and reports any issues
55
+
56
+ > **First-run permission prompts:** Claude Code runs in a sandboxed mode. During `/fluent-connect`, it will ask permission to run shell commands, read `~/.fluentcommerce/`, and write workspace files under `accounts/`. This is normal — approve each prompt.
57
+
58
+ **Variations:**
59
+
60
+ ```bash
61
+ # Skills only (no MCP):
62
+ npx @fluentcommerce/ai-skills install
63
+
64
+ # Add MCP later:
65
+ npx @fluentcommerce/ai-skills mcp-setup --profile YOUR_PROFILE
66
+
67
+ # Faster MCP startup (pre-install extension locally):
68
+ npx @fluentcommerce/ai-skills install --profile YOUR_PROFILE --install-mcp-extn
69
+ ```
70
+
71
+ If you already know the **retailer ref**, add `--profile-retailer YOUR_RETAILER_REF`.
72
+
73
+ For the guided first-time walkthrough after install, see [first-session.md](01-first-session.md).
74
+
75
+ ---
76
+
77
+ ## 3. Workspace Layout
78
+
79
+ After install + `/fluent-connect`:
80
+
81
+ ```
82
+ <project-root>/
83
+ .mcp.json ← workspace MCP wiring
84
+ CLAUDE.md ← starter workspace instructions for Claude Code
85
+ AGENTS.md ← starter workspace instructions for Codex/agentic tooling
86
+ knowledge/ ← packaged platform knowledge copied locally
87
+ docs/ ← packaged reference docs copied locally
88
+ accounts/<PROFILE>/
89
+ SOURCE/ ← All implementation source code
90
+ backend/ ← Java Maven plugin repos
91
+ frontend/ ← Mystique SDK component projects
92
+ workflows/<RETAILER>/ ← downloaded workflow JSONs
93
+ ORDER__HD.json
94
+ workflow-context.json ← download metadata
95
+ features/ ← Feature lifecycle dirs
96
+ <slug>/spec.md ← requirements (from use-case-discover)
97
+ <slug>/plan.md ← approved plan (from feature-plan)
98
+ <slug>/architecture.md ← feature explain output
99
+ <slug>/status.json ← lifecycle state tracker
100
+ tasks/ ← Operational plans (non-feature work)
101
+ reports/ ← Ephemeral: build, pre-deploy, e2e-test outputs
102
+ analysis/ ← Persistent: code, modules, topology, settings
103
+ feedback/ ← Skill execution feedback
104
+ sessions/ ← Audit trail exports
105
+ settings/backups/ ← Setting backups
106
+ manifests/backups/ ← Manifest backups
107
+ knowledge/ ← Account-specific knowledge overrides
108
+ ```
109
+
110
+ Each directory includes a `README.md` explaining its purpose and which skills populate it.
111
+
112
+ ---
113
+
114
+ ## 4. The Approval Gate
115
+
116
+ The AI never makes changes without asking first:
117
+
118
+ 1. **Presents a plan** — structured markdown with diagrams, rules, risks, and test plan
119
+ 2. **Waits for review** — you can ask questions, request changes, or reject
120
+ 3. **You approve** — say `"approved"`, `"yes"`, `"go ahead"`, or `"do it"`
121
+ 4. **Implementation begins** — the AI follows the plan step by step
122
+
123
+ **Triggers the gate:** Any change to code, workflows, settings, or the live environment.
124
+
125
+ **Skips the gate:** Read-only operations (explain, trace, analyze, audit, diagnose).
126
+
127
+ **Override:** Say `"just do it"` or `"skip planning"` to bypass the gate entirely (logged as user override).
128
+
129
+ ---
130
+
131
+ ## 5. Resuming Work Across Sessions
132
+
133
+ The AI persists progress in `status.json` files and reads them to resume where you left off.
134
+
135
+ **Check what is in progress:**
136
+
137
+ ```
138
+ What features are in progress?
139
+ ```
140
+
141
+ **Resume a feature:**
142
+
143
+ ```
144
+ Continue working on return orders
145
+ ```
146
+
147
+ The AI reads `status.json`, finds the `next` field (e.g., `"/fluent-build"`), and picks up from that step.
148
+
149
+ ---
150
+
151
+ ## 6. Troubleshooting
152
+
153
+ ### MCP tools not working
154
+
155
+ **Symptom:** The AI cannot reach the Fluent environment, or tool calls return connection errors.
156
+
157
+ **Diagnostic checklist:**
158
+
159
+ ```bash
160
+ # 1. Verify Fluent CLI
161
+ fluent --version # should print version
162
+
163
+ # 2. Verify profile
164
+ ls ~/.fluentcommerce/YOUR_PROFILE/ # should exist
165
+ fluent profile retailers YOUR_PROFILE # should list retailers
166
+
167
+ # 3. Verify .mcp.json
168
+ cat .mcp.json # should have fluent-mcp, fluent-mcp-extn, and chrome-devtools entries
169
+
170
+ # 4. Test MCP extension server (Ctrl+C to exit)
171
+ npx @fluentcommerce/fluent-mcp-extn
172
+
173
+ # 5. Test official MCP server
174
+ fluent mcp server --stdio # should start (Ctrl+C to exit)
175
+
176
+ # 6. Regenerate MCP config
177
+ npx @fluentcommerce/ai-skills mcp-setup --profile YOUR_PROFILE
178
+
179
+ # 7. Restart your IDE — MCP servers initialize at startup
180
+ ```
181
+
182
+ **Quick fix:** Re-run the install with `--profile` to regenerate everything:
183
+ ```bash
184
+ npx @fluentcommerce/ai-skills install --profile YOUR_PROFILE
185
+ ```
186
+
187
+ ### No workflows found
188
+
189
+ **Symptom:** The AI reports no workflows available for analysis.
190
+
191
+ **Fix:**
192
+ 1. Run `/fluent-connect` to download workflows from the live environment
193
+ 2. Or manually: `fluent workflow download -p YOUR_PROFILE -r YOUR_RETAILER -w all -o accounts/YOUR_PROFILE/workflows/YOUR_RETAILER/`
194
+ 3. Check `accounts/<PROFILE>/workflows/<RETAILER>/` for `*.json` files
195
+
196
+ ### Workflow changes not taking effect after deploy
197
+
198
+ **Symptom:** You deployed a workflow but the AI (or the live environment) still shows the old version.
199
+
200
+ **Fix:** Three caching layers can cause this — check each in order:
201
+
202
+ 1. **MCP cache** — The extension server caches workflow reads. Clear it:
203
+ ```
204
+ Clear the MCP workflow cache
205
+ ```
206
+
207
+ 2. **Local files** — Files in `accounts/<PROFILE>/workflows/` are static snapshots. Re-download:
208
+ ```
209
+ /fluent-connect --profile MY_PROFILE --force
210
+ ```
211
+
212
+ 3. **Workflowlog** — If you deployed via MCP `workflow_upload` or REST API (not CLI), the CLI workflowlog is stale. Fix:
213
+ ```bash
214
+ fluent workflowlog delete -p MY_PROFILE
215
+ ```
216
+
217
+ **Full reference:** See [Workflow Caching & Staleness](workflow-reference.md#workflow-caching--staleness) for details.
218
+
219
+ ### "Plan required" error
220
+
221
+ **Symptom:** The AI refuses to scaffold, build, or deploy and says a plan is required.
222
+
223
+ **Fix:** The approval gate is working as intended. Either:
224
+ - Say `"Plan the <feature-name> feature"` to generate a plan, then `"approved"`
225
+ - Say `"just do it"` to bypass the gate (logged as override)
226
+
227
+ ### Rule not found in workflow
228
+
229
+ **Symptom:** A workflow references a custom rule the environment does not recognize.
230
+
231
+ **Fix:** Deploy the module before the workflow:
232
+ 1. `"Build the my-returns module"` — compile and package
233
+ 2. `"Deploy my-returns to MY_RETAILER"` — install on the account
234
+ 3. `"Deploy RETURN_ORDER__DEFAULT to MY_RETAILER"` — now the rules are available
235
+
236
+ ### Skills not loading after install
237
+
238
+ **Symptom:** The AI does not recognize Fluent commands or slash commands.
239
+
240
+ **Fix:**
241
+ 1. Run diagnostics: `npx @fluentcommerce/ai-skills doctor`
242
+ 2. Verify: `npx @fluentcommerce/ai-skills status`
243
+ 3. Restart your IDE — skills load at startup
244
+ 4. For Claude Code with marketplace: check `~/.claude/plugins/installed_plugins.json`
245
+ 5. For Claude Code with file-copy: check that `~/.claude/agents/` and `~/.claude/skills/` have fluent content
246
+ 6. Re-install: `npx @fluentcommerce/ai-skills install`
247
+
248
+ ### I keep getting permission prompts
249
+
250
+ **Symptom:** The IDE keeps asking for access to the CLI, `~/.fluentcommerce/`, `.mcp.json`, `accounts/`, or other workspace files.
251
+
252
+ **Fix:** This is expected on the first run. `fluent-connect` and `fluent-bootstrap` do real shell and filesystem work. Approve prompts that match the task you asked for, then restart the IDE if the skill updated `.mcp.json`.
253
+
254
+ ### Chrome DevTools MCP not working
255
+
256
+ **Symptom:** The AI reports "Chrome DevTools MCP not connected" when you try to test a page in the browser.
257
+
258
+ **Fix:**
259
+ 1. Verify `.mcp.json` has a `chrome-devtools` server entry
260
+ 2. Restart your IDE — MCP servers initialize at startup
261
+ 3. Verify `npx chrome-devtools-mcp@latest` runs without errors
262
+ 4. Check that the `FLUENT_UI_BASE_URL` points to the correct account and environment