@cometchat/skills 4.3.0 → 4.4.1

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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +3 -2
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +258 -20
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +314 -35
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +140 -79
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
  184. package/skills/cometchat-native-calls/SKILL.md +29 -17
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +102 -33
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
  202. package/skills/cometchat-native-features/SKILL.md +24 -17
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +45 -5
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -2,13 +2,14 @@
2
2
  name: cometchat
3
3
  description: Entry-point for CometChat integration in any React, React Native, Angular, Android, Flutter, or iOS project — web (React/Next.js/React Router/Astro), React Native (Expo/bare), Angular (12-15), native Android (V6 stable, V5 legacy), Flutter (V6 stable, V5 legacy), and native iOS (V5 stable). Detects the framework, gathers requirements through an interactive conversation, and writes production-quality integration code.
4
4
  license: "MIT"
5
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
6
5
  metadata:
7
6
  author: "CometChat"
8
7
  version: "3.0.0"
9
8
  tags: "cometchat dispatcher entry react nextjs react-router astro expo react-native angular android flutter ios chat"
10
9
  ---
11
10
 
11
+ > **Ground truth:** the `cometchat detect --json` output + the per-platform `*-core` skills this dispatcher routes to + the `packages/registry` catalogs. (Official docs linked below.) Verify symbols against the installed package/source before relying on them.
12
+
12
13
  ## Use this skill when
13
14
 
14
15
  The user wants to add CometChat to any kind of project. Trigger phrases:
@@ -16,6 +17,7 @@ The user wants to add CometChat to any kind of project. Trigger phrases:
16
17
  - `/cometchat` (or invoke the cometchat skill via your agent's mechanism — keyword "cometchat" or "integrate chat" works in most agents)
17
18
  - "add cometchat", "integrate cometchat", "add chat to my app"
18
19
  - "add messaging", "add chat ui", "add in-app chat"
20
+ - **Customize an existing CometChat integration** — "make the chat match my brand", "change the chat colors / theme", "style the message bubbles", "translate the chat / add a language", "change the notification (or call) sounds". These route through this dispatcher too: detect the framework, then load the family's `*-theming` + `*-customization` (+ `cometchat-i18n` for localization) skills. If `.cometchat/state.json` already exists, jump to the Step 7 iteration menu's customization options instead of re-running Phase A.
19
21
 
20
22
  This is the **entry point for every framework**. Do NOT invoke
21
23
  framework-specific skills directly — this dispatcher detects the
@@ -27,7 +29,7 @@ framework first and routes to the right ones.
27
29
  |---|---|
28
30
  | **Web** | React (Vite/CRA), Next.js, React Router v6/v7, Astro |
29
31
  | **React Native** | Expo (managed + Expo Router), bare RN CLI |
30
- | **Angular** | Angular 12-15 (Angular CLI / NgModule) |
32
+ | **Angular** | Angular 17-21 (standalone components; `@cometchat/chat-uikit-angular@5`) |
31
33
  | **Android** | V6 stable (Compose + Kotlin Views, `chatuikit-{compose,kotlin}-android:6.x`) / V5 legacy (Java + Kotlin Views, `chat-uikit-android:5.x`) |
32
34
  | **Flutter** | V6 stable (Bloc-based, `cometchat_chat_uikit:^6.0`) / V5 legacy (GetX-based, `cometchat_chat_uikit:^5.2`) |
33
35
  | **iOS** | V5 stable (Swift; SwiftUI + UIKit hosting; `CometChatUIKitSwift:~> 5.1`) |
@@ -53,8 +55,32 @@ don't guess where the trigger button goes, don't guess the auth system.
53
55
 
54
56
  ## Steps
55
57
 
58
+ > **Clarification contract (ALL coding agents) — read `references/asking-questions.md`.** Everywhere the steps below say "ask the user", "render an `AskUserQuestion`", "MUST ask", or "NON-NEGOTIABLE prompt", they mean: **follow that contract.** `AskUserQuestion` is only Claude Code's name for it — on Codex / Cursor / Gemini CLI / Windsurf / any agent without that primitive, render the question as a **numbered text list and WAIT for a real answer** (never default, never infer; auto/approval mode does not authorize skipping). Map the answer by **value/label, not ordinal position**, accept a free-text fallback, and if running headless, STOP and emit the question rather than guessing. This contract governs every prompt in this skill and all skills it routes to.
59
+
56
60
  ### Step 1 — Detect framework + map the project
57
61
 
62
+ > **If the CLI itself can't run — degrade, don't dead-end.** Every step
63
+ > below calls `npx @cometchat/skills-cli …`. That can fail to *launch*
64
+ > (no network to fetch the package, npx/Node absent, a sandbox that
65
+ > blocks process spawn or the npm registry) — distinct from the CLI
66
+ > running and returning a JSON `error` (handled in the error-handling
67
+ > section near the end). When a command can't launch at all:
68
+ > - **`detect`** → detect by hand. Everything the CLI's detector keys on
69
+ > is in the files this step already tells you to read: `package.json`
70
+ > deps (`@cometchat/chat-uikit-react` → web, `…-react-native` → RN,
71
+ > `…-angular` → Angular), `pubspec.yaml` (Flutter), `build.gradle`
72
+ > (Android), `Podfile`/`Package.swift` (iOS), plus the router/version
73
+ > markers. Determine the framework + version from those and continue.
74
+ > - **`config show`** → treat as no saved config; read `.cometchat/config.json`
75
+ > directly if it exists, else proceed greenfield and ask the questions.
76
+ > - **Action commands** (`auth login`, `apply-feature`, `builder export`,
77
+ > `verify`) genuinely need the CLI. If one can't run, don't silently
78
+ > skip it — tell the user it's unavailable, give the manual dashboard
79
+ > equivalent (e.g. fetch creds from app.cometchat.com → *Credentials*;
80
+ > toggle the extension in *Extensions*), and continue best-effort.
81
+ > Never STOP the whole flow just because `npx` is unavailable — manual
82
+ > detection + reading the project is a complete substitute for routing.
83
+
58
84
  First, check if `.cometchat/config.json` exists:
59
85
  ```bash
60
86
  npx @cometchat/skills-cli config show --json
@@ -72,6 +98,23 @@ npx @cometchat/skills-cli detect --json
72
98
 
73
99
  The JSON output includes `framework` (one of `reactjs`, `nextjs`, `react-router`, `astro`, `expo`, `react-native`, `angular`, `android`, `flutter`, `ios`, or `null`), framework-specific fields (`router`, `expo_mode`, `react_native_version`, `android_version`, `flutter_version`, `env_prefix`), and a `compatibility.supported` flag. If `supported` is `false`, stop and surface the warnings.
74
100
 
101
+ #### If `framework === null` — greenfield with no project at all (ENG-35718)
102
+
103
+ A null framework means the working directory has no recognizable scaffold — no `package.json`, no `pubspec.yaml`, no `AndroidManifest.xml`, no Podfile, no Xcode project. The earlier behavior dumped the user into a vague "want me to create one?" with two unlabeled options. Replace it with a **named-scaffold prompt** so the user picks a target deterministically:
104
+
105
+ > "I don't see a project here yet. Want me to create one? Pick the closest match — you can change details after:
106
+ >
107
+ > 1. **React (Vite)** — fastest web demo; `npm create vite@latest cometchat-demo -- --template react-ts`
108
+ > 2. **Next.js (App Router)** — production-grade web with SSR; `npx create-next-app@latest cometchat-demo --typescript --app`
109
+ > 3. **Expo (managed)** — fastest mobile demo; `npx create-expo-app@latest cometchat-demo --template`
110
+ > 4. **Other** — tell me what framework you're using and I'll skip the scaffold step.
111
+ >
112
+ > What sounds right?"
113
+
114
+ Render this as an `AskUserQuestion` with the same 4 options. After the user picks, run the scaffold command, `cd` into the new directory, then re-run `detect` so the rest of the dispatcher behaves as if `framework` had been detected normally. Do NOT proceed to Step 2 without a real framework — every step below assumes one exists.
115
+
116
+ If the user declines all four (chooses "Other" and then says "no, I just wanted to look around"), stop politely and tell them: *"You can run `/cometchat` again from inside a React / Next.js / Expo / Angular / Android / iOS / Flutter project and I'll detect it automatically."* Don't try to integrate into an empty directory — every subsequent step will fail.
117
+
75
118
  **Android — `android_version` is load-bearing.** When `framework === "android"`, the detect output includes `android_version: "v5" | "v6" | null`. The cohort selects which V5 or V6 pattern set to load — V6 (stable + recommended, `chatuikit-{compose,kotlin}-android:6.x`, Compose + Kotlin Views split) and V5 (legacy, `chat-uikit-android:5.x`, Java + Kotlin Views) are different SDKs with different APIs. Treat them as separate routing targets even though both live under `--family android`. **V6 went GA 2026-05-25** ([docs](https://www.cometchat.com/docs/ui-kit/android/v6/overview)) — was beta in earlier `/cometchat` releases; the prompt + recommendation flipped from V5 → V6 in v4.3.0.
76
119
 
77
120
  If `android_version` is `null`, the project is greenfield (no cometchat dep yet). Ask the user:
@@ -108,10 +151,10 @@ Save the choice into `.cometchat/config.json` under `flutter_version`.
108
151
  - Existing nav structure — read the root navigator to see stack vs tab vs drawer layout
109
152
 
110
153
  **For Angular (`angular`):**
111
- - `package.json` — name, `@angular/core` version (12-15 supported), all `@angular/*` deps
112
- - `angular.json` — workspace config; identify the project name + `sourceRoot`
113
- - Root NgModule usually `src/app/app.module.ts`; check imports + declarations + `schemas`
114
- - Routing — `src/app/app-routing.module.ts` or root `RouterModule.forRoot([...])`; list all routes
154
+ - `package.json` — name, `@angular/core` version (**17-21 supported**; the v5 kit's peer range is `>=17 <22`), all `@angular/*` deps
155
+ - `angular.json` — workspace config; identify the project name + `sourceRoot`; the `build.options.styles` array (where the kit's `css-variables.css` is registered) + the `assets` glob
156
+ - Bootstrap**standalone**: `src/main.ts` (`bootstrapApplication`) + `src/app/app.config.ts` (providers). v5 is standalone-first there is no NgModule/`CUSTOM_ELEMENTS_SCHEMA`. (A legacy NgModule app must migrate to standalone, or pin the v4 `legacy` kit — different skill.)
157
+ - Routing — `src/app/app.routes.ts` (`provideRouter` / `loadComponent`); list all routes
115
158
  - Layout — `src/app/app.component.{ts,html}`; identify nav, sidebar, header components
116
159
  - Existing pages/components — list under `src/app/pages/`, `src/app/components/`, or wherever the project organizes them
117
160
  - Environment files — `src/environments/environment.ts` (and `.prod.ts`); credentials live here, NOT in `.env`
@@ -145,6 +188,19 @@ Save the choice into `.cometchat/config.json` under `flutter_version`.
145
188
 
146
189
  Store this mental map — you'll use it throughout the conversation.
147
190
 
191
+ #### Post-detect order of operations — run these gates IN THIS ORDER
192
+
193
+ > The moment `detect --json` returns, run the following **in order** before
194
+ > you write anything or commit to a plan. Each is detailed in its own
195
+ > subsection below; this is the precedence when more than one applies:
196
+ >
197
+ > 1. **Pattern skills installed?** (see "Pattern skills not installed? — CHECK THIS FIRST") — if the framework's pattern skills aren't loaded, install them and have the user re-run **now**, before anything else. A late discovery is the worst-timed interruption.
198
+ > 2. **`version_conflict` gate** (see "Version-conflict pre-flight") — STOP if the installed UI Kit major doesn't match what the skills target, or both V5+V6 are declared.
199
+ > 3. **`coexistence` gate** (see "Coexistence pre-flight") — STOP if a competing chat/calling SDK is present; carry the Firebase/SW advisories into the push journey.
200
+ > 4. **Step 1.5 "I see you" summary** (below) — only once the gates pass, narrate what you found, then continue to Step 2.
201
+ >
202
+ > Gates 1–3 are hard stops that can each send the user away to fix something; run them before the Step 1.5 summary so you don't narrate a plan you then have to retract. (The subsections appear below in roughly this order, but this list is the authoritative precedence.)
203
+
148
204
  #### Then show the user what you found — Step 1.5 (the "I see you" moment)
149
205
 
150
206
  This is the most important moment of the whole flow. After running detection + reading the project, narrate what you found in **3–5 specific, observation-grounded bullets** BEFORE asking any question. The user should feel that you understand their project before deciding whether to trust you with it.
@@ -185,7 +241,7 @@ The shape (use it verbatim — the structure earns trust):
185
241
  >
186
242
  > - **Vite + React 19 + TypeScript** — fresh `cometchat-test-app` scaffold
187
243
  > - **No router yet** — for the demo, chat will mount in `src/App.tsx` directly; we can move it to a route later
188
- > - **No auth system detected** — I'll set you up in dev mode with a pre-seeded test user (`cometchat-uid-1`); production auth is a one-flag upgrade later
244
+ > - **No auth system detected** — I'll set you up in dev mode; we'll pick a test user (default `cometchat-uid-1` through `uid-5`) when I confirm credentials in the next step; production auth is a one-flag upgrade later
189
245
  > - **Fresh start** — no existing CometChat code to patch around
190
246
  >
191
247
  > Ready to set this up? I'll get you a CometChat account first, then ask where chat should live.
@@ -197,14 +253,42 @@ This moment costs ~5 seconds of conversation but anchors the rest. Skip it and t
197
253
  **Compatibility baselines (the CLI enforces these):**
198
254
  - Web: react@<18 → upgrade required; nextjs@<13 → warning; astro@<4 → warning
199
255
  - RN: react-native@<0.70 → upgrade required; expo@<49 → upgrade required
200
- - Angular: @angular/core@<12 → upgrade required; @angular/core@>=16 warning (skill is verified against v15)
256
+ - Angular: @angular/core@<17 → upgrade required (v5 kit peer range is `>=17 <22`); skill verified against v21 standalone
201
257
  - Android V5: minSdk@<21 → upgrade required; minSdk@<24 → warning; AGP@<7.0 → warning
202
258
  - Android V6: minSdk@<28 → upgrade required (V6 raised the floor from API 23 to API 28); Kotlin@<1.9 → warning; for Compose stack, Compose BOM@<2024.x → warning
203
259
  - Flutter V5: Dart SDK <2.17 → upgrade required; Flutter <2.5 → warning; Android `minSdk 24` (Flutter platform default) when V5 is in use
204
260
  - Flutter V6: Dart SDK <2.17 → upgrade required; Flutter <2.5 → warning; Android `minSdk 26` REQUIRED (cometchat_calls_sdk in V6 raised the floor)
205
261
  - iOS V5: iOS deployment target <13 → upgrade required; Swift <5.0 → upgrade required; Xcode 15+ requires `ENABLE_USER_SCRIPT_SANDBOXING = NO` in Build Settings (or the `post_install` Podfile hook)
206
262
 
207
- #### Pattern skills not installed?
263
+ #### Version-conflict pre-flight STOP if `detect` reports `version_conflict` (P0-6)
264
+
265
+ *(Gate 2 in the post-detect order above — runs after the pattern-skills check, before the coexistence gate and the Step 1.5 summary.)*
266
+
267
+ > **The moment `detect --json` returns, check `version_conflict`. If it is non-null, STOP — do NOT write integration code yet.** It fires when the project already has a CometChat UI Kit at a major version these skills don't target (e.g. `chat-uikit-react` v5 in a v6-targeted web project), or when BOTH a V5 and a V6 UI Kit are declared (Android/Flutter half-migrated / duplicate tree). Proceeding emits guidance for the wrong major → `duplicate class` / `unresolved reference` / won't-compile failures the user can't easily trace. Surface `version_conflict.detail` to the user and ask how to reconcile (upgrade the installed kit to the targeted major, or load the matching-version skills, or remove the cohort they're not integrating) **before** Step 2. Re-run `detect` after they fix it. This is a gate, not a warning.
268
+
269
+ #### Coexistence pre-flight — STOP if `detect` reports a competing chat SDK (P0-10)
270
+
271
+ *(Gate 3 in the post-detect order above — runs after the version-conflict gate, before the Step 1.5 summary.)*
272
+
273
+ > **Also check `coexistence` in the same `detect --json` output.** It surfaces three collisions you must resolve before mounting CometChat:
274
+ >
275
+ > - **`coexistence.competing_sdks`** lists other chat / calling / push providers already in the project (Sendbird, Stream, Twilio, PubNub, TalkJS, Agora, OneSignal). If any entry has `kind: "chat"` or `"calling"`, **STOP** — silently adding CometChat means two chat providers mounted in one tree, duplicate WebSocket connections, and a confusing double UI. Ask the user (use the clarification contract — `references/asking-questions.md`):
276
+ > > "I see **{name}** ({coordinate}) already in this project. How do you want to proceed?"
277
+ > > 1. **Replace it** — I'll integrate CometChat and leave the old SDK's code in place for you to remove (I won't delete it without confirmation).
278
+ > > 2. **Run alongside** — keep both, namespaced; chat stays on {name}, CometChat powers a new surface. (Heavier; two realtime stacks.)
279
+ > > 3. **Switch fully** — integrate CometChat now and you'll migrate {name}'s usages over later.
280
+ > >
281
+ > > WAIT for the answer; route accordingly. Never auto-delete the competing SDK's files or deps — that's the user's call.
282
+ > - **`coexistence.existing_firebase: true`** — the project already wires Firebase. CometChat push is FCM-based, so on the `-push` journey you must **reuse the same Firebase app** (don't call `initializeApp` a second time) and **merge** rather than overwrite `firebase-messaging-sw.js`. Carry this fact into the push skill; it's an advisory, not a hard stop for chat-only integration.
283
+ > - **`coexistence.existing_service_workers`** — lists existing SW files at paths CometChat web push would write to. Before generating `firebase-messaging-sw.js`, confirm you won't clobber the app's offline/caching logic; merge the messaging handlers into the existing worker instead.
284
+ >
285
+ > A competing **chat/calling** SDK is a gate (ask before proceeding). Firebase + service-worker entries are advisories you must honour on the push journey.
286
+
287
+ #### Pattern skills not installed? — CHECK THIS FIRST
288
+
289
+ *(Gate 1 in the post-detect order above — the highest-precedence gate; run it before the version-conflict/coexistence gates and before the Step 1.5 summary, even though it appears last in this section for readability.)*
290
+
291
+ > **Run this check the moment `detect` returns a framework — BEFORE the Step 1.5 "I see you" summary, BEFORE credentials (Step 2), BEFORE any `AskUserQuestion`, and BEFORE creating a Visual Builder.** It is a gate, not a contingency. If the framework's pattern skills are missing, install them and tell the user to re-run **right now**. Do NOT lazily discover the gap later (e.g. when you try to read a pattern skill at code-gen) — agents don't hot-reload skills mid-session (see the re-run note below), so discovering it late forces the user to re-run **after** they've logged in, picked an app, and customized their Visual Builder. That's the worst-timed possible interruption. Catch it at second 5, not at the finish line.
208
292
 
209
293
  The dispatcher routes to web pattern skills (`cometchat-{core,components,placement,*-patterns}`), RN pattern skills (`cometchat-native-{core,components,placement,*-patterns}`), or Angular pattern skills (`cometchat-angular-{core,components,placement,patterns}`) based on the detected framework. If the matching set isn't loaded — i.e. the user has only the dispatcher in `.claude/skills/`, OR they installed only `@cometchat/skills` (web) but the project is RN/Angular, OR vice versa — **install the missing package yourself**. Do NOT stop and ask the user to run the npx command manually — that turns a 0-step recovery into a 2-step recovery for no benefit.
210
294
 
@@ -339,6 +423,8 @@ Terminal error handling (surface verbatim, stop, do not retry silently):
339
423
  - `ABORTED` — user Ctrl-C'd the CLI.
340
424
  - `NETWORK` — couldn't reach the auth host.
341
425
  - `ALREADY_AUTHENTICATED` — this session was already consumed. Re-run `auth login` to mint a fresh session.
426
+ - `AUTH_FAILED` — the bearer was rejected (401) — e.g. a stored token expired or was revoked, surfaced by a later `auth me` / `auth status`. Re-run `auth login` to re-authenticate. (Distinct from the device-auth codes above: this is the *post-login* "my session went stale" case, normalized from a 401 in `cometchat-api.ts`.)
427
+ - `API_ERROR:<code>` (and any unlisted code) — an unexpected server-side error; do NOT pattern-match it. Fall through to the generic handler: show the CLI's `human_message` / `suggestion` if present, then the raw `error` in parentheses (see the error-handling rule near the end of this skill).
342
428
 
343
429
  After success, verify via `auth status --json` and proceed to **Step 2b.5**.
344
430
 
@@ -386,7 +472,7 @@ Response shape:
386
472
  }
387
473
  ```
388
474
 
389
- Field meanings (from the dashboard's signup screens — see `/Users/swapnil/Downloads/customer-dashboard-main/src/components/auth/Welcome/`):
475
+ Field meanings (from the dashboard's signup screens):
390
476
 
391
477
  - `role`: `"frontend"` / `"backend"` / `"fullstack_engineer"` / `"startup_founder"` / `"product_leader/manager"` / `"engineering_leader/manager"` / `"others"` (when `others`, `other_role` carries the freeform value)
392
478
  - `intent`: `"building"` / `"evaluating"` / `"exploring"` (this is the **dashboard's** intent — distinct from Step 3a's `placement_intent` which asks about app archetype)
@@ -529,20 +615,20 @@ This creates/updates the env file with the correct prefix AND writes `.cometchat
529
615
  - **header:** "Industry"
530
616
  - **options** — full 11-option set (see table below); do NOT pick a default like `saas_businesses` without asking
531
617
 
532
- **Industry key mapping:**
618
+ **Industry key mapping** — present these **labels** (verbatim from the dashboard's `/create-app` set, canonical in `packages/cli/src/utils/onboarding-options.ts` `INDUSTRIES`) and pass the mapped `--industry` value:
533
619
 
534
620
  | Label | `--industry` value |
535
621
  |---|---|
536
- | SaaS / Business | `saas_businesses` |
537
- | Marketplace | `online_marketplaces` |
538
- | Social / Community | `community_and_social` |
622
+ | Online Marketplaces | `online_marketplaces` |
539
623
  | Healthcare | `healthcare` |
540
624
  | Dating | `dating` |
541
- | Education | `online_education` |
542
- | Events / Streaming | `events_and_streaming` |
543
- | Sports / Gaming | `sports_and_gaming` |
544
- | Team Communication | `team_comms_and_workflows` |
545
- | On-demand Services | `on_demand_services` |
625
+ | Events & Streaming | `events_and_streaming` |
626
+ | Online Education | `online_education` |
627
+ | Community & Social | `community_and_social` |
628
+ | SaaS & Multi-Tenant | `saas_businesses` |
629
+ | Sports & Gaming | `sports_and_gaming` |
630
+ | Team Comms & Workflows | `team_comms_and_workflows` |
631
+ | On-Demand Services | `on_demand_services` |
546
632
  | Other | `other` |
547
633
 
548
634
  **Confirm before creating, then:**
@@ -756,7 +842,7 @@ Once `product` is resolved, route — the rest of Step 3 is chat-shaped, and a c
756
842
  | `chat-messaging` | Continue to 3a | Existing chat flow — placement intent, recommendation, framework skills, scaffold chat surfaces. |
757
843
  | `voice-video` | **Hand off to `cometchat-calls`** | Stop here. Invoke the `cometchat-calls` dispatcher with the framework + family + credentials already established. Calls dispatcher routes to the per-family `cometchat-{family}-calls` skill in **standalone** mode — no chat UI Kit, full calls surface, VoIP push wired by default, `IncomingCall` mounted at app root. |
758
844
  | `chat-messaging+voice-video` | Run 3a–6 (chat), THEN hand off to `cometchat-calls` in additive mode | Full chat flow first. After Step 6 verifies the chat integration, invoke `cometchat-calls` in **additive** mode — patches the existing provider to mount `IncomingCall` at root, adds call buttons inline on chat surfaces, opt-in VoIP push. Skip `apply-feature calls` — `cometchat-calls` covers it end-to-end. |
759
- | `ai-agent` / `byo-agent` | Exit with docs pointer | Tell the user: *"`/cometchat` integrates chat and calling surfaces. AI Agents have their own integration path see https://www.cometchat.com/docs/ai-agents."* Exit cleanly; do not attempt to scaffold. |
845
+ | `ai-agent` / `byo-agent` | Offer chat-first scaffold + docs pointer (ENG-35724) | Don't dead-end. Tell the user: *"AI Agents have their own integration path at https://www.cometchat.com/docs/ai-agents — but the agent UI lives inside a chat surface. Want me to set up the chat integration first? Once chat is wired, you can plug the AI Agent (or your BYO model) into the same `cometchat-features` flow without re-doing the integration."* If yes, treat `product = "chat-messaging"` and continue to 3a. If no, exit politely (don't push). Two segments hit this dead-end and bounced out — give them a path forward without rebuilding the AI integration in this dispatcher today. |
760
846
 
761
847
  **If config has `placement_intent` set from a previous run**, confirm it and skip to Step 3b. The product branch above still runs first — a chat-mode integration that's now adding calls re-enters via the `chat-messaging+voice-video` row, not the chat-only row.
762
848
 
@@ -771,12 +857,14 @@ Once `product` is resolved, route — the rest of Step 3 is chat-shaped, and a c
771
857
  | Skills cohort/framework | Builder `platform` value | If Visually picked |
772
858
  |---|---|---|
773
859
  | `reactjs`, `nextjs`, `react-router`, `astro` | `react` | Build with React UI Kit, mount via `<CometChatApp />` |
774
- | `expo`, `react-native` | `react-native` | Build with RN UI Kit, mount in app root |
860
+ | `expo`, `react-native` | `react-native` | Build with RN UI Kit, mount in app root. `cometchat builder export --platform react-native` IS supported — it copies the builder's `src/config/` (`store.ts` + `config.json`) and patches `config.json` with the JSON-envelope settings. |
775
861
  | `android-v5`, `android-v6` | `android` | Build with Android UI Kit (V5 schema; V6 customers get a one-line migration shim) |
776
862
  | `ios` | `ios` | Build with iOS UI Kit |
777
863
  | `flutter-v5`, `flutter-v6` | `flutter` | Build with Flutter UI Kit (V5 schema; V6 same shim story as Android) |
778
864
  | `angular` | **not supported** | See "Angular" note below — auto-route to In code with an explicit one-time message. |
779
865
 
866
+ > **Native Visually exports are V5-shaped today (F22 — transitional).** The Android, Flutter (and iOS) Builder canonicals emit **V5-flavored** UI Kit screens; a **V6 native project's own code is untouched**, but the Builder-exported screens come in at the V5 schema (the "migration shim" noted above bridges them). If a V6 native customer wants a single-version (pure-V6) dependency tree, the **In-code** path is the cleaner choice. React/Next/Astro and React Native are unaffected (web is V6-native; RN uses the `src/config/` store envelope, not a V5 canonical). The per-family `cometchat-{android-v6,flutter-v6}` skills carry the full warning — surface this at the choice so the decision is informed.
867
+
780
868
  ##### Angular — explicit fallback
781
869
 
782
870
  The dashboard's Visual Builder export pipeline doesn't have an Angular emitter — `https://preview.cometchat.com/downloads/cometchat-builder-{platform}.zip` ships only `react`, `react-native`, `ios`, `android`, `flutter`. Skills can't bridge that gap by emitting Angular code from React/JSON output because the kit's Angular package (`@cometchat/chat-uikit-angular`) uses different selectors, modules, and content-projection slots than React.
@@ -785,7 +873,7 @@ The dashboard's Visual Builder export pipeline doesn't have an Angular emitter
785
873
  1. **Do NOT show the Visually-vs-In-code prompt.** It's a dead choice — there's no Visually path to take.
786
874
  2. **Surface this once, then move on.** Print a brief, friendly note in the chat — single message, no follow-up question:
787
875
 
788
- > *"The Visual Builder doesn't ship Angular code yet (the dashboard's export covers React / React Native / iOS / Android / Flutter today). I'll set up the code-driven Angular integration instead — you can theme via `CometChatThemeService` later. Want to be notified when an Angular Visual Builder lands? Drop a 👍 on https://github.com/cometchat/cometchat-skills/discussions/categories/feature-requests."*
876
+ > *"The Visual Builder doesn't ship Angular code yet (the dashboard's export covers React / React Native / iOS / Android / Flutter today). I'll set up the code-driven Angular integration instead — you can theme via CSS variables (`--cometchat-*`, scoped to `.cometchat`) later. Want to be notified when an Angular Visual Builder lands? Drop a 👍 on https://github.com/cometchat/cometchat-skills/discussions/categories/feature-requests."*
789
877
 
790
878
  Tweak wording to fit the conversation tone (greeting the user by name if `meta.name` is set, etc.) but keep it factual: WHY it's missing + WHAT we're doing instead + WHERE to register interest.
791
879
 
@@ -829,8 +917,10 @@ Otherwise, ask:
829
917
  `AskUserQuestion`:
830
918
  - **Question:** "How do you want to customize your chat experience?"
831
919
  - **Header:** "Customize"
832
- - **Options:**
833
- - *Visually drag-and-drop in browser*"Open CometChat's Visual Builder in your browser, customize colors / layout / features without code, then come back here. I'll wire the result into your app."
920
+ - **Options** — which one is listed first and labeled **"(Recommended)"** depends on the framework:
921
+ - **Default (web React / Next.js App Router / React Router v7 / Astro, React Native, Android, Flutter, iOS):** present **Visually first, labeled "(Recommended)"**. This is deliberate the Visual Builder is the headline path. Do NOT reorder In-code ahead of it or mark In-code recommended, even though In-code is the historical default. (Frameworks that don't support the builder Angular, Next.js Pages Router — skip this prompt entirely per the notes above, so they never reach here.)
922
+ - **iOS:** now a full default (no carve-out). **ENG-35337 is RESOLVED end-to-end: the iOS Visual Builder export BUILDS and LAUNCHES** — `pod 'CometChatBuilder'` (1.1.2) + UIKitSwift 5.1.13 + CallsSDK 5.0.0 → `xcodebuild` BUILD SUCCEEDED, installed + launched clean on a physical iPhone (verified 2026-06-17; the earlier sim-only `EXCLUDED_ARCHS` quirk was an environment issue, not a project defect). Do NOT pin `> 1.1.2` — a `1.1.3` may not exist (see `cometchat-ios-core` §Visual Builder). iOS gets the same **Visually-recommended** default as every other builder-supported platform.
923
+ - *Visually — configure in the browser (no code)* — "Open CometChat's UI Kit Builder in your browser to **enable/disable features and configure** colors, layout, and styling through settings — no code (it's a configuration tool, **not** a drag-and-drop canvas). Then come back here and I'll wire the result into your app."
834
924
  - *In code — code-driven defaults* — "I'll scaffold a clean integration with sensible defaults. You customize later by editing files / CSS variables."
835
925
 
836
926
  Persist the answer to `.cometchat/config.json` as `customize: "visual" | "code"` so reruns don't re-ask.
@@ -910,7 +1000,13 @@ Persist the answer to `.cometchat/config.json` as `customize: "visual" | "code"`
910
1000
 
911
1001
  The command runs an F25 case-collision pre-check (warns if a lowercase `src/cometchat/` with In-code-shape files exists alongside the intended `src/CometChat/` output, on macOS APFS / HFS+ default).
912
1002
 
913
- Parse the returned JSON: `{ status: "exported", builderId, appId, platform, output, settings_file, builder_name }`. Skills' Step 5 file-emission section then patches the customer's existing project to wire in the exported integration (entry file, package.json, tsconfig — see `cometchat-core` §11.2).
1003
+ Parse the returned JSON: `{ status: "exported", builderId, appId, platform, output, settings_file, builder_name, dashboardSetupNeeded }`. Skills' Step 5 file-emission section then patches the customer's existing project to wire in the exported integration (entry file, package.json, tsconfig — see `cometchat-core` §11.2).
1004
+
1005
+ **4a. Enable the dashboard side of the toggled-on features — DO NOT SKIP.** The Visual Builder's feature toggles control **UI visibility only** — they show/hide a feature's buttons in the exported app. Extension- and AI-backed features (polls, message translation, collaborative document/whiteboard, stickers, smart replies, conversation starter/summary) **also need their server-side capability enabled** ("Requires Dashboard setup" in the builder docs), which is a *separate* backend store the builder export never touches. If you skip this, the customer sees the poll button in their builder app, clicks it, and it fails at runtime. The export tells you exactly which ones: iterate `dashboardSetupNeeded` from the export JSON and run the matching enable for each —
1006
+ - `type: "extension"` → `cometchat apply-feature <id> --app-id <appId>` (no code change, idempotent, survives resync).
1007
+ - `type: "ai-feature"` → `cometchat apply-feature <id> --app-id <appId> --openai-key sk-...` (ask the customer for their OpenAI key once; if they don't have one, tell them the AI feature's UI will show but won't return results until a key is set in the dashboard).
1008
+
1009
+ Run these now, before continuing. This is the step that makes the **Visual Builder flow and enable-features compose** — the builder draws the UI, `apply-feature` turns on the capability behind it. (`dashboardSetupNeeded` is `[]` on older CLI builds that predate this field — if it's absent, fall back to scanning the exported `settings.chatFeatures.deeperUserEngagement` / `aiUserCopilot` for `true` values and map them: `messageTranslation→message-translation`, `polls→polls`, `collaborativeWhiteboard→collaborative-whiteboard`, `collaborativeDocument→collaborative-document`, `stickers→stickers`, `conversationStarter→conversation-starter`, `conversationSummary→conversation-summary`, `smartReply→smart-replies`.)
914
1010
 
915
1011
  **Error handling:**
916
1012
  - `NOT_FOUND` (builder was deleted out-of-band, or token's appId mismatch) → offer to create a fresh one (`builder create` again) OR fall back to code-driven.
@@ -1004,11 +1100,11 @@ If `auth me` returned `last_app.industry`, layer the industry-specific upsell on
1004
1100
 
1005
1101
  | Industry value | What to add to the recommendation |
1006
1102
  |---|---|
1007
- | `healthcare` | Mention HIPAA-aware patterns: server-minted auth tokens (NEVER Auth Key), data-masking extension, audit-log retention, recording consent. Point at `cometchat-{family}-production` and `cometchat-features` for the moderation suite. |
1103
+ | `healthcare` | Mention HIPAA-aware patterns: server-minted auth tokens (NEVER Auth Key), Moderation Rules API (Profanity / AI Image Moderation / Malware & Virus Scanner — configured via `apply-feature` → `/moderation/rules`, NOT legacy extensions), audit-log retention, recording consent. Point at `cometchat-{family}-production` and `cometchat-features` for the moderation suite. |
1008
1104
  | `dating` | Suggest enabling Profanity Filter + Image Moderation + Sentiment Analysis upfront — dating apps almost always want them. Suggest a "Report user" button next to the message header. |
1009
1105
  | `online_marketplaces` | Confirm the drawer-on-product-page placement (default for marketplace archetype). Suggest enabling Link Preview (buyers share product URLs) and Quick Replies for sellers. |
1010
1106
  | `community_and_social` | Suggest enabling Reactions + Mentions + Threaded Conversations (these are default-on but worth surfacing as design-system colors). Recommend the tab-based "full messenger" placement. |
1011
- | `online_education` | Suggest a `/messages` route + a "Help" button in the navbar (instructor support). Mention Recording for class sessions if calls product is also enabled. |
1107
+ | `online_education` | Suggest a `/messages` route + a "Help" button in the navbar (instructor support). Mention Recording for class sessions if calls product is also enabled — but flag that **recording is a paid plan add-on (contact CometChat support to enable; not self-service / no CLI toggle)**. |
1012
1108
  | `events_and_streaming` | Suggest the floating widget for live audience chat. If calls product is enabled, recommend group calls + screen-share for hosts. |
1013
1109
  | `sports_and_gaming` | Suggest tab-based messenger + Reactions + GIPHY/Stipop sticker integration (gamer apps lean heavily on stickers). |
1014
1110
  | `team_comms_and_workflows` | Match Slack-like patterns: dedicated `/messages` route, threaded conversations on, mentions on. Skip the floating widget. |
@@ -1130,6 +1226,29 @@ If no auth detected:
1130
1226
  > When you add auth later, run `/cometchat` again and choose
1131
1227
  > 'Set up production auth' to connect them."
1132
1228
 
1229
+ ##### 3d.1. Confirm the dev-mode UID (ALWAYS ASK — ENG-35717)
1230
+
1231
+ After committing to dev mode (whether or not auth was detected), **always ask the user which UID to log in with** before scaffolding. Do not silently pick `cometchat-uid-1` (or `superhero1`, or any other guess) and hard-code it. Two testers reported the agent committing to a default UID without confirming — and one of those defaults was flagged as a **Bot** in their dashboard, which makes auth-key login fail with an opaque error.
1232
+
1233
+ The shape:
1234
+
1235
+ > "Which UID should I log in as for dev mode? The default is `cometchat-uid-1` — your CometChat app ships with `cometchat-uid-1` through `cometchat-uid-5` pre-seeded so you can chat between browser windows. Use the default, or paste your own UID?"
1236
+
1237
+ **Hard caveat — call this out alongside the question whenever you're emitting an auth-key dev login:**
1238
+
1239
+ > ⚠️ **If the UID is marked as a "Bot" in the dashboard, auth-key login will fail** with `Auth token creation not allowed for this bot <uid>` and the chat surface will render but not connect. Bot users only accept auth-token login (server-side mint) — the dev auth-key flow refuses them by design. If you hit that error, go to Dashboard → Users → click the UID → toggle the "Bot" switch off, OR pick a non-bot UID. The default `cometchat-uid-1` is NOT a bot in a fresh CometChat app, but if you've reused an app where someone flagged it as a bot earlier, this trap fires.
1240
+
1241
+ Use whatever UID the user chooses (or `cometchat-uid-1` if they confirm the default) in the generated `init.ts` / `CometChatProvider`. Do not invent a UID like `superhero1` from older docs — the canonical pre-seeded test users are `cometchat-uid-1` through `cometchat-uid-5`.
1242
+
1243
+ > ⚠️ **Only `cometchat-uid-1` … `cometchat-uid-5` are pre-seeded — a custom UID MUST be created before login.** A CometChat app ships exactly these five test users. If the user pastes any other UID (e.g. `alice`, `test-user-7`), it does **not** exist yet, and dev `CometChatUIKit.login(uid)` will fail with **user-not-found** (`ERR_UID_NOT_FOUND` / "user not found"). So: if the chosen UID is **not** one of `cometchat-uid-1..5`, **create it first** before wiring login. The Auth Key can create users (it has create + login scope — see `cometchat-production`'s key table), so create it via the create-user REST call, then log in:
1244
+ > ```bash
1245
+ > # Create the custom user first (Auth Key works for create — server-side / one-time)
1246
+ > curl -X POST "https://<APP_ID>.api-<REGION>.cometchat.io/v3/users" \
1247
+ > -H "apikey: <AUTH_KEY>" -H "Content-Type: application/json" \
1248
+ > -d '{"uid":"<custom-uid>","name":"<Display Name>"}'
1249
+ > ```
1250
+ > Then `CometChatUIKit.login("<custom-uid>")` succeeds. (The five seeded UIDs skip this — they already exist.) Prefer steering the user to a seeded `cometchat-uid-N` for a quick demo; only create a custom user when they specifically want their own UID.
1251
+
1133
1252
  #### 3e. Ask about user mapping (if auth detected)
1134
1253
 
1135
1254
  If the user has auth AND wants to set up production mode now:
@@ -1292,9 +1411,9 @@ The structured beats make the writing feel like a contract being executed, not a
1292
1411
  4. `cometchat-native-placement` — placement pattern (stack/tab/modal/bottom-sheet/embed)
1293
1412
 
1294
1413
  **For Angular:**
1295
- 1. `cometchat-angular-core` — init via `UIKitSettingsBuilder`, `APP_INITIALIZER` pattern, `CUSTOM_ELEMENTS_SCHEMA`, env config in `environment.ts`, login order, anti-patterns
1296
- 2. `cometchat-angular-components` — component catalog (kebab-case selectors, `[input]` callbacks vs `(output)` events, content-projection slots, NgModule imports)
1297
- 3. `angular` → `cometchat-angular-patterns` — module organization, lazy-loading the chat module, environment file editing, providers
1414
+ 1. `cometchat-angular-core` — init via `CometChatUIKit.initFromSettings(cometchat-settings.json)` in `main.ts` (recommended; GA in `@cometchat/chat-uikit-angular >= 5.0.3`), or the `UIKitSettingsBuilder` fallback — standalone bootstrap, env config in `environment.ts`, login order, anti-patterns. **v5 is standalone — NO `CUSTOM_ELEMENTS_SCHEMA`, no NgModule** (those are v4 mental models).
1415
+ 2. `cometchat-angular-components` — component catalog (kebab-case `<cometchat-*>` selectors, `[input]`/`(output)` bindings, view slots, **standalone `imports: []`** — not NgModule)
1416
+ 3. `angular` → `cometchat-angular-patterns` — standalone providers, `loadComponent` lazy routes, functional route guards, NgZone, environment file editing
1298
1417
  4. `cometchat-angular-placement` — placement pattern (route, modal, drawer, embedded panel)
1299
1418
 
1300
1419
  **For Android — branches by `android_version`:**
@@ -1468,9 +1587,9 @@ Execute the confirmed plan. The order of operations is the same for every framew
1468
1587
  **Angular — common steps:**
1469
1588
 
1470
1589
  1. **Migrate credentials into `environment.ts`** — if `provision setup` wrote a `.env` (Angular fallback), extend `src/environments/environment.ts` with a `cometchat: { appId, region, authKey }` block. Mirror in `environment.prod.ts` WITHOUT the `authKey` (production uses server-minted auth tokens — see `cometchat-angular-production`).
1471
- 2. **Add `CUSTOM_ELEMENTS_SCHEMA`** to the NgModule that hosts CometChat templates kit atom components (`<cometchat-avatar>`, `<cometchat-status-indicator>`, etc.) are LitElement web components, not Angular standalone modules. Without the schema, Angular throws `Can't bind to '...' since it isn't a known property of 'cometchat-...'`.
1472
- 3. **Init service + APP_INITIALIZER** — follow `cometchat-angular-core` § 1-3. `UIKitSettingsBuilder().setAppId().setRegion().setAuthKey().build()`, then `CometChatUIKit.init(settings)` returns a Promise — chain login. Wire as `APP_INITIALIZER` so init completes before any component renders.
1473
- 4. **Import the right NgModule(s)** — for the chat-hosting module, add the kit modules from `@cometchat/chat-uikit-angular` (e.g. `CometChatConversations`, `CometChatMessages`) to `imports: []`. `cometchat-angular-components` documents the module name vs. component name pairing.
1590
+ 2. **No `CUSTOM_ELEMENTS_SCHEMA`** UI Kit **v5** ships real Angular **standalone components** (not web components). Importing the component class is all that's needed; the schema is a v4 mental model and should NOT be added.
1591
+ 3. **Init service + APP_INITIALIZER** — follow `cometchat-angular-core` § 1-3. `new UIKitSettingsBuilder().setAppId().setRegion().setAuthKey().build()`, then `CometChatUIKit.init(settings)` returns a Promise — chain login (`login(uid)` takes a bare string in v5). Wire as `APP_INITIALIZER` so init completes before any component renders.
1592
+ 4. **Import the component classes** — into the host **standalone component's** `imports: []`, e.g. `CometChatConversationsComponent`, `CometChatMessageListComponent` from `@cometchat/chat-uikit-angular`. There is no NgModule and no `*-with-messages` composite in v5 — compose the message components yourself. `cometchat-angular-components` lists the selector class pairing.
1474
1593
  5. **Wire chat into existing project** — READ each file before modifying. Add the route, nav link, modal trigger.
1475
1594
  6. **Theming** — inject `CometChatThemeService` to control palette/typography. See `cometchat-angular-theming`.
1476
1595
  7. **Install dependencies:**
@@ -1614,41 +1733,40 @@ Then:
1614
1733
 
1615
1734
  ### Step 7 — Iteration menu
1616
1735
 
1617
- Ask the user (preserve this exact shape `question`, `header`, `multiSelect`, `options[].label`, `options[].description` agents have varying primitive names but all support this structured form). The option set differs by familyRN has two extra options (push notifications + testing) that don't apply to web.
1736
+ **Render this as the interactive picker (the `AskUserQuestion` structured form), NOT a flat "reply with a number" text dump.** The catch: the picker primitive caps at **4 options**, and this menu has 9 (web) / 11 (RN) leavesso present it as a **two-level picker**: first a **category** picker (≤4 options), then, after the user picks a category, a **sub-picker** (≤4 options) listing that category's actions. Every sub-picker ends with a **"← Back"** option that returns to the category picker; selecting a leaf runs that action and, when it completes, returns to the category picker (until the user picks "I'm done"). Preserve the `question` / `header` / `multiSelect:false` / `options[].label` / `options[].description` shape at both levels. Map answers by **label, not ordinal**.
1618
1737
 
1619
- **Web 8 canonical options (or 9 if `.cometchat/builder.json` exists, see Visual Builder option below):**
1620
- - **question:** "What would you like to do next?"
1621
- - **header:** "Next step"
1622
- - **multiSelect:** false
1738
+ > **Non-picker agents (Codex / Cursor / Gemini CLI / any without the picker primitive):** per the Clarification contract (§top), render the **flat numbered leaf list** instead (all 9/11 leaves, grouped under their category headings) and accept a number or free text. The two-level nesting is a picker-UX nicety, not a semantic requirement — the leaves are identical either way.
1739
+
1740
+ **Web category picker (level 1):**
1741
+ - **question:** "What would you like to do next?" · **header:** "Next step" · **multiSelect:** false
1623
1742
  - **options:**
1624
- 1. label: "Customize look and feel (themes)", description: "Pick a preset (slack, whatsapp, imessage, discord, notion) or set brand colors."
1625
- 2. label: "Add a feature", description: "Browse ~35 features — calls, reactions, polls, AI, and more."
1626
- 3. label: "Customize a component", description: "Custom bubbles, headers, composer actions, details views — I'll read the docs and write it."
1627
- 4. label: "Add a floating chat widget", description: "An overlay button + drawer on top of your existing app."
1628
- 5. label: "Set up production auth", description: "Replace the dev Auth Key with a server-side token endpoint. Read `cometchat-production` skill."
1629
- 6. label: "Set up user management", description: "Server endpoints for creating, updating, deleting CometChat users."
1630
- 7. label: "Run diagnostics", description: "Check for drift, missing env vars, broken imports."
1631
- 8. label: "I'm done", description: "Exit."
1632
-
1633
- **RN — 10 canonical options (or 11 if `.cometchat/builder.json` exists, see Visual Builder option below):**
1634
- - **question:** "What would you like to do next?"
1635
- - **header:** "Next step"
1636
- - **multiSelect:** false
1743
+ 1. label: "Customize", description: "Themes & brand colors, a component's look, or language & sounds."
1744
+ 2. label: "Add to your app", description: "A feature (calls, reactions, polls, AI, …) or a floating chat widget."
1745
+ 3. label: "Production & operations", description: "Server-side auth, user management, diagnostics."
1746
+ 4. label: "I'm done", description: "Exit."
1747
+
1748
+ **Web sub-pickers (level 2):**
1749
+ - **Customize →** (a) "Customize look and feel (themes)" — "Pick a preset (slack, whatsapp, imessage, discord, notion) or set brand colors." · (b) "Customize a component" — "Custom bubbles, headers, composer actions, details views — I'll read the docs and write it." · (c) "Localize & configure sounds" — "Translate the UI / change language and tune notification + call sounds. Read `cometchat-i18n` + `cometchat-theming`/`cometchat-customization`." · (d) "← Back"
1750
+ - **Add to your app →** (a) "Add a feature" — "Browse ~35 features — calls, reactions, polls, AI, and more." · (b) "Add a floating chat widget" — "An overlay button + drawer on top of your existing app." · (c) "← Back"
1751
+ - **Production & operations →** (a) "Set up production auth" — "Replace the dev Auth Key with a server-side token endpoint. Read `cometchat-production`." · (b) "Set up user management" — "Server endpoints for creating, updating, deleting CometChat users." · (c) "Run diagnostics" — "Check for drift, missing env vars, broken imports." · (d) "← Back"
1752
+
1753
+ **RN category picker (level 1):**
1754
+ - **question:** "What would you like to do next?" · **header:** "Next step" · **multiSelect:** false
1637
1755
  - **options:**
1638
- 1. label: "Customize look and feel (themes)", description: "Colors, typography, dark mode edit CometChatThemeProvider."
1639
- 2. label: "Add a feature", description: "Calls, reactions, polls, extensions, AI agent — browse the catalog."
1640
- 3. label: "Customize a component", description: "Custom bubbles, headers, message composer actions, empty states."
1641
- 4. label: "Add another placement", description: "Add a modal chat, a bottom sheet, or another tab — without touching the existing integration."
1642
- 5. label: "Set up push notifications", description: "APNs + FCM setup, CometChat dashboard config, client registration, tap-to-deep-link. Required for production."
1643
- 6. label: "Set up production auth", description: "Replace the dev Auth Key with a server-minted auth token. Read `cometchat-native-production` skill."
1644
- 7. label: "Set up user management", description: "Server endpoints for creating, updating, deleting CometChat users."
1645
- 8. label: "Set up testing", description: "Jest + React Native Testing Library setup, mocks for the UI Kit / SDK, E2E with Detox or Maestro."
1646
- 9. label: "Troubleshoot an issue", description: "Metro cache, pod install, iOS privacy manifest, push notifications, native module linking."
1647
- 10. label: "I'm done", description: "Exit."
1756
+ 1. label: "Customize", description: "Themes, a component, or language & sounds."
1757
+ 2. label: "Add to your app", description: "A feature or another chat placement."
1758
+ 3. label: "Production & operations", description: "Push notifications, auth, user management, testing."
1759
+ 4. label: "Troubleshoot or finish", description: "Fix an issue, or exit."
1760
+
1761
+ **RN sub-pickers (level 2):**
1762
+ - **Customize →** (a) "Customize look and feel (themes)" — "Colors, typography, dark mode — edit CometChatThemeProvider." · (b) "Customize a component" — "Custom bubbles, headers, message composer actions, empty states." · (c) "Localize & configure sounds" — "Translate the UI / change language and tune notification + call sounds. Read `cometchat-i18n` + `cometchat-native-theming`." · (d) "← Back"
1763
+ - **Add to your app →** (a) "Add a feature" "Calls, reactions, polls, extensions, AI agent browse the catalog." · (b) "Add another placement" — "Add a modal chat, a bottom sheet, or another tab — without touching the existing integration." · (c) "← Back"
1764
+ - **Production & operations →** (a) "Set up push notifications" "APNs + FCM setup, CometChat dashboard config, client registration, tap-to-deep-link. Required for production." · (b) "Set up production auth" — "Replace the dev Auth Key with a server-minted auth token. Read `cometchat-native-production`." · (c) "Set up user management" — "Server endpoints for creating, updating, deleting CometChat users." · (d) "Set up testing" — "Jest + React Native Testing Library setup, mocks for the UI Kit / SDK, E2E with Detox or Maestro." · (e) "← Back" *(this category has 4 actions + Back = 5; if your picker is hard-capped at 4, drop "Set up testing" to a follow-up "More…" entry or surface it via free-text — never silently omit it)*
1765
+ - **Troubleshoot or finish →** (a) "Troubleshoot an issue" — "Metro cache, pod install, iOS privacy manifest, push notifications, native module linking." · (b) "I'm done" "Exit." · (c) "← Back"
1648
1766
 
1649
1767
  **Visual Builder option (conditional — only if `.cometchat/builder.json` exists):**
1650
1768
 
1651
- If `.cometchat/builder.json` is present in the project (the customer picked Visually in Step 3.1), inject an additional option **before** "I'm done":
1769
+ If `.cometchat/builder.json` is present in the project (the customer picked Visually in Step 3.1), add an extra leaf **under the "Customize" category sub-picker** (it's a customization action):
1652
1770
 
1653
1771
  - label: "Re-sync visual builder", description: "Re-fetch your latest builder customizations from the dashboard and update the emitted code. Use this after you've gone back to the browser and tweaked colors / features / layout."
1654
1772
 
@@ -1662,7 +1780,7 @@ When selected:
1662
1780
 
1663
1781
  For **theme customization**: read the framework-appropriate theming skill and write the customization code.
1664
1782
 
1665
- For **adding features**: read the framework-appropriate features skill. Features fall into six buckets:
1783
+ For **adding features**: read the framework-appropriate features skill. The canonical public decision-reference for *which integration method (UI Kit / UI Kit Builder / Widget Builder / SDK) supports a feature, what dashboard setup it needs, and whether code is required* is the **[Features & Extensions Guide](https://www.cometchat.com/docs/fundamentals/features-and-extensions-guide)** — consult it (WebFetch or docs MCP) for any "can the builder do X? / is feature Y code-or-dashboard?" question; it outranks the local `catalog.json` snapshot when they disagree. Features fall into eight buckets (matching the catalog `type` field and `apply-feature`'s dispatch):
1666
1784
 
1667
1785
  - **default** — already enabled by the UI Kit, no action needed.
1668
1786
  - **extension** — pure boolean toggle. Run `cometchat apply-feature <id>` (web/RN with `state.json`) or `cometchat apply-feature <id> --app-id <X>` (native cohorts: iOS / Android / Flutter / Angular). Hits the dashboard API; no browser visit required.
@@ -1670,9 +1788,13 @@ For **adding features**: read the framework-appropriate features skill. Features
1670
1788
  - **dashboard-only** — third-party API keys / multi-field config (Giphy, Stipop, Tenor, Chatwoot, Intercom, Disappearing Messages, Message Shortcuts). The CLI returns `manual-action-required` and prints the dashboard path — these genuinely need the user to configure third-party credentials.
1671
1789
  - **package-install** — calls. Run `npm install @cometchat/calls-sdk-javascript` (or the framework's calls SDK).
1672
1790
  - **component-swap** — `rich-text-formatting`. Run `cometchat apply-feature rich-text-formatting`.
1791
+ - **calls-feature** — voice/video calling sub-features (`screen-share`, `virtual-background`, `call-recording`, etc.). `apply-feature` verifies the calls SDK is installed + the platform supports it, then records the choice and points at the family's `cometchat-*-calls` reference; the actual wiring is a `CallSettingsBuilder` flag in code. **⚠ `call-recording` is a PAID plan add-on — there is NO dashboard toggle / API call the CLI can flip; the user must contact CometChat support to enable it on their plan.** Never claim recording was "enabled."
1792
+ - **moderation** — profanity/image-moderation/data-masking/etc. Run `cometchat apply-feature <id> --config-json <…>` — it `PUT`s the rule config then enables via the `/moderation/rules` Rules API (NOT the legacy extensions). Returns `config-required` if no config is supplied.
1673
1793
 
1674
1794
  Ask which feature, look it up in `packages/registry/v6/features/catalog.json` (or run `cometchat features info <id>`) to learn its bucket, then execute the right recipe. **Never tell the user to "open the dashboard and flip a toggle" for an extension or ai-feature** — that's what `cometchat apply-feature <id>` does for them.
1675
1795
 
1796
+ > **Enable-features on a Visual-Builder (Visually) project — two layers, both required.** `apply-feature` and the Visual Builder operate on **independent backend stores**: `apply-feature` toggles the **dashboard extension** (server-side capability — `/apps/{appId}/extensions`); the builder's `chatFeatures` toggle controls whether the feature's **UI** is shown in the *exported builder app* (`/vcb/builders/{id}`). They compose, but they're complementary — for an extension/AI-backed feature on a Visually-customized project you need *both*: (1) `apply-feature <id>` for the capability, and (2) the builder's toggle ON so the exported UI actually surfaces it. If the customer enabled an extension via `apply-feature` but the builder app doesn't show it, the builder toggle is OFF → have them flip it in the Visual Builder and **re-sync** (`builder export --force`). Because the two stores are independent, `apply-feature`'d extensions **always survive a resync** — `builder export` never reads or writes the extensions store. (On the In-code path there's no builder: `apply-feature` is sufficient because the UI Kit's `defaultExtensions[]` auto-surfaces any enabled extension.)
1797
+
1676
1798
  For **component customization**: read the customization + components skills, then write the customization code directly. Ask the user what they want to customize, read the relevant component's props from the catalog, propose changes.
1677
1799
 
1678
1800
  For **production auth**: read the framework-appropriate production skill. It's interactive — ask the user about their auth system and generate the server-side token endpoint for their backend.
@@ -1695,6 +1817,36 @@ After every Phase B action completes, you **MUST** re-render the menu via your a
1695
1817
 
1696
1818
  The iteration loop is the whole point of Phase B. Re-rendering the canonical menu via your agent's structured-question primitive after every action is how the user controls the session.
1697
1819
 
1820
+ ### Step 8 — Self-verification before declaring success
1821
+
1822
+ **This is a process-level audit — distinct from the per-framework build verification in Step 6.** Before saying "done", "integration complete", or rendering the iteration menu, run through this checklist mentally. Each item targets a silent-skip failure mode that has bitten real testers in Round 1 (ENG-3571x cluster). Any "no" answer means the skill was misapplied — fix before declaring success.
1823
+
1824
+ > **Why this exists:** Round-1 testers reported 8+ incidents where the build succeeded but the agent had silently skipped a load-bearing process step (Step 1.5 "I see you" omitted, Step 3.1 prompt skipped, plan never confirmed, env-var pre-flight bypassed, RN-bare "done" lying without a smoke test). Build-output verification catches compile errors. This checklist catches process-skip errors — which are the ones that ship to customers.
1825
+
1826
+ **Process checks (must all be YES):**
1827
+
1828
+ - [ ] **Step 1.5 "I see you" moment** — Did I render 3–5 specific, observation-grounded bullets about the user's project BEFORE asking any question? (Not generic — must cite actual files/deps/router config I read in Step 1.)
1829
+ - [ ] **Step 2 credentials confirmed** — Did I run `npx @cometchat/skills-cli config show --json` AFTER Step 2 and verify `appId` is non-empty + the env file exists + contains the framework-appropriate keys? (No silent moves past empty credentials.)
1830
+ - [ ] **Step 2b.5/2b.6 dashboard prompts** — On signup paths, did I render the structured `AskUserQuestion` prompts for role, intent, app name, region, industry? (No silent defaults — auto-mode does NOT authorize bypass.)
1831
+ - [ ] **Step 3.0 product branch** — Did I resolve product (chat / calls / both) via auth-me OR natural-language inference OR an explicit `AskUserQuestion`? (If both inference paths returned null, the prompt MUST have fired — non-negotiable.)
1832
+ - [ ] **Step 3.1 customize prompt** — On supported platforms (`reactjs`, `nextjs`, `react-router`, `astro`, `expo`, `react-native`, `angular`, `android`, `flutter`), did I render the Visually-vs-In-code prompt? (Or surface the explicit fallback note for unsupported platforms like Pages Router + Astro?) Common skip-bug: doing 3a + 3c without 3.1 — observed 2026-05-22 on a real Android run.
1833
+ - [ ] **Step 3d.1 UID confirmation** — Did I ask the user which UID to log in as (with the bot-caveat warning), OR did I silently default to `cometchat-uid-1`? (ENG-35717 — silent default is the bug.)
1834
+ - [ ] **Step 3f trust-contract plan** — Did I render the three-section plan (Files I'll create / Files I'll modify / Files I won't touch) + dependencies + auth mode + estimated time, and did the user say "go" before any file write?
1835
+ - [ ] **Step 5 state.json written** — Did I write `.cometchat/state.json` with `files_owned` + `files_patched` after the implementation completed? (Required for Step 7 iteration menu to detect prior integration.)
1836
+ - [ ] **Step 6 verification** — Did I run the framework-appropriate build command (`tsc --noEmit` / `npm run build` / `flutter analyze` / `./gradlew :app:assembleDebug` / `xcodebuild build`) and confirm success?
1837
+ - [ ] **RN-bare smoke** (if applicable) — Did I additionally run `pod install` + `npx react-native run-{ios,android}` and confirm Metro bundle reached 100%? (RN-bare "done" lies are the canonical regression — ENG-35718.)
1838
+ - [ ] **Step 7 iteration menu** — Did I re-render the canonical menu via `AskUserQuestion` (8 options web / 11 options RN — verbatim labels and descriptions) AFTER the action completed?
1839
+
1840
+ **Rationalization checks (if any of these crossed my mind, I skipped a rule):**
1841
+
1842
+ - "The user said 'just do it' / 'I trust you, skip the plan'" → Step 3f plan confirmation is the trust contract; skip it and a regression will silently break their existing surfaces (ENG-35713 location-sharing-wipes-attachments). Always show the plan.
1843
+ - "Pattern skills are probably loaded, I won't check" → Step 1 pattern-skill-presence check (cometchat-react-patterns etc.) is non-optional; if absent, the agent writes from training memory + emits the bugs the patterns explicitly prevent.
1844
+ - "The user is in auto-mode / seems impatient, so I'll skip the prompt" → Auto-mode authorizes Bash approvals, NOT structured-question bypasses. Surface every required prompt regardless.
1845
+ - "I already know this framework, I can skip framework-specific patterns skill" → Pattern skills carry version-pinned traps (e.g. Next.js 15+ `dynamic(ssr:false)` Client-Component rule, RN doc-picker GuardedResultAsyncTask swap) that don't exist in training data. ALWAYS read the patterns skill before emitting code for that framework.
1846
+ - "I'll write code now and migrate to production-auth later" → Production-auth migration is a SEPARATE iteration-menu action with its own skill (`cometchat-{family}-production`). Wire dev mode first, surface the production-upgrade path explicitly, let the user choose when to do it.
1847
+
1848
+ If ANY of those rationalizations matches what I was about to do, STOP and apply the skipped rule before continuing.
1849
+
1698
1850
  ## Hard rules
1699
1851
 
1700
1852
  ### Always (every framework)
@@ -1707,8 +1859,20 @@ The iteration loop is the whole point of Phase B. Re-rendering the canonical men
1707
1859
  - ALWAYS show the plan (Step 3f) and get confirmation before writing.
1708
1860
  - **Every `<CometChatMessageList>` must pass `hideReplyInThreadOption={true}`** unless the user has explicitly opted into thread support and you've built the thread screen too. Without it, tapping a message shows a "Reply in Thread" action that leads to a broken (undefined) thread view.
1709
1861
  - **NEVER build a custom search UI.** The UI Kit ships `<CometChatSearch>` — full dual-scope search across conversations + messages with built-in filter chips, pagination, and result highlighting. Any request involving "search", "find messages", "search conversations" MUST use the built-in component (and `showSearchBar` / `onSearchBarClicked` on `CometChatConversations` for web; `hideSearch={false}` for RN). Do NOT create custom search bars, hand-rolled result lists, or filter UIs.
1862
+ - **Check the kit catalog FIRST — do not invent custom UI when the kit has it.** Before writing any custom component, sidebar, back button, header action, user/group details panel, or action sheet, look up the framework's `*-components` skill and confirm whether the kit already ships that surface. Testers found the agent rebuilding things the kit already provides — custom search bars, custom back buttons, custom user/group details views — leading to inconsistent UX + extra code that then breaks at edge cases. Rule: enumerate kit options, name the one you'll use, then write code. If the kit genuinely doesn't have it, say so explicitly before building custom (ENG-35712).
1863
+ - **Preserve existing functionality when adding features.** Before adding a new feature (e.g. location-sharing, custom message type), re-list what's already integrated (attachments, polls, message history, composer extensions) and confirm the addition is additive. If the change *would* remove or override an existing surface, surface that to the user as a warning and get explicit consent. Testers found that adding location-sharing wiped out the attachment menu + polls + visible message history — that's a regression the agent must not introduce silently (ENG-35713).
1864
+ - **Split multi-axis customization prompts into sequenced single-axis ops.** When a user prompt bundles multiple changes ("change the receiver bubble color AND show time on the side instead of bottom AND change the sender content view"), don't try to satisfy them all in one edit — testers got the wrong fields swapped (sender vs receiver, whole bubble vs content view). Restate the changes back as a numbered list, confirm, and apply one at a time, verifying each before moving on. Honor the bubble-override / content-view distinction explicitly (ENG-35713).
1865
+ - **Default to file-per-concern, NOT single-file (ENG-35715).** Scaffold provider, init, components, and screens as separate files in a `cometchat/` (web/Angular/RN) or `<package>/cometchat/` (Android/Flutter/iOS) folder. ONLY collapse to a single file when the developer explicitly opts in ("just give me one file" / "single-file demo"). The default plan in Step 3f already lists 3-5 files — keep it that way; testers complained that some quick-start paths dumped everything into `App.tsx` and made it impossible to refactor later. When in doubt, ask: *"Should I split this into multiple files (provider / init / screens) or keep it in a single file for the demo?"*
1866
+ - **Auto dark/light theme is the default, NOT a follow-up prompt (ENG-35715).** Every kit ships a theme system that switches by OS color scheme — the React kit's `<CometChatThemeProvider>`, the RN kit's `useColorScheme()`-driven theme, Android's `CometChatTheme.DayNight` parent style, Flutter's `CometChatThemeMode.system`, iOS's `traitCollection.userInterfaceStyle`. The scaffold MUST wire this on the first pass without asking. If the developer explicitly says "light mode only" or "dark mode only," then pin; otherwise honor the OS. Testers found that the agent only applied one theme until they manually asked for dark mode — fix that by defaulting to system.
1867
+ - **Provider exposes a `telemetry` callback prop for init/login lifecycle (ENG-35715).** When generating any provider (`CometChatProvider.tsx` / `CometChatModule.ts` / Android `CometChatInitProvider.kt` / Flutter `CometChatBootstrap`), accept an optional `telemetry?: (event: TelemetryEvent) => void` prop and fire it at four phases: `init_started`, `init_finished`, `login_started`, `login_finished` — plus `init_failed` / `login_failed` with the error payload. Developers want this for their own analytics; without the hook they have to monkey-patch the kit or wrap every method. The hook is opt-in (do nothing if not passed) so it doesn't bloat the happy path.
1868
+ - **Confirm `appId` + `region` + `authKey` are populated BEFORE Step 5 code emission (ENG-35718).** Two testers shipped code with empty `import.meta.env.VITE_COMETCHAT_APP_ID` values because the agent moved on without confirming the env file was actually written. Pre-flight check after Step 2 / before Step 4 — run `npx @cometchat/skills-cli config show --json`, verify `appId` is non-empty AND the env file referenced exists AND the file contains the three keys. **For Angular/Android/Flutter/iOS this pre-flight checks the handoff `.env` that `provision setup` writes — NOT the platform-native file** (`environment.ts` / `local.properties` / Dart const / `Secrets.swift`), because the migration into that native file happens later in Step 5. Verify the native runtime file has the values as a *separate, post-migration* check at the end of Step 5 (a re-run of this gate after migration is fine — it then accepts the native file). If any check fails, STOP and prompt: *"Your credentials aren't in `<envFile>` yet. Paste them now or run `auth login` to fetch them, then I'll continue."* Do NOT proceed silently.
1869
+ - **Pull dashboard feature state BEFORE recommending what to enable (ENG-35716).** Before suggesting "do you want to turn on reactions / polls / message-translation / AI-replies", run `npx @cometchat/skills-cli features list --json` (or `features get --json --feature <name>` for one), parse the response, and **lead with what's already enabled vs disabled** in the user's dashboard. Two testers complained: the agent claimed features were "not implemented" and asked them to enable manually, while their dashboard had them on already. Rule: read dashboard state first, recommend deltas (turn ON the ones the user wants that are currently OFF), and TELL the user what's already on so they don't waste a round-trip enabling something live.
1870
+ - **Auto-resolve credentials from `auth me` / `provision list` when the user is already logged in (ENG-35716).** If `auth status --json` returns `"logged-in"` AND the env file is missing or empty, run `provision list --json` to see if the user has an existing app on the dashboard. If exactly one, suggest using it: *"You're already logged in and your dashboard has the app `<app.name>` (region `<app.region>`). Use those credentials? [Y/n]"* — then `provision setup --app-id <id> --json` writes the env file. The user shouldn't have to copy-paste credentials they already have in their account.
1871
+ - **RN-bare integrations require a smoke-test before declaring success (ENG-35718).** "Done" lying on RN bare is the canonical "app didn't even run once" failure. After the last file write, the dispatcher MUST attempt: (a) `cd ios && pod install && cd ..` (iOS), (b) `npx react-native run-ios --no-packager` OR `npx react-native run-android` (whichever the user wants first), (c) tail the Metro output for *"BUNDLE → 100%"* and the first frame render in the simulator/emulator. If pods install fails or Metro errors mid-bundle, surface the raw error and DON'T declare success. Bare RN is the family with the most "looks done but broken" failures because there are 8+ moving parts (Cocoapods, Hermes, autolinking, gesture-handler, reanimated, async-storage native modules, Metro cache). One smoke is worth the 2-minute wait.
1872
+ - **Fuzzy-match free-form answers before rejecting them (ENG-35724).** When the user types a value that isn't in the structured-prompt enum — e.g. *"chatting"* for the industry picker, *"shop"* for marketplace, *"video meet"* for voice-video — DO NOT bounce them back to the picker. Map to the closest enum value, restate it back, and confirm: *"By 'chatting' I think you mean Community & Social — does that match? [Y/n]"*. One round-trip saved per prompt. Use the structured form's `options[].label` + `options[].description` as the match corpus; cosine-similarity on the lowercase tokens or a simple substring + synonym table is enough — the agent can do this in-line without an external tool. If similarity is below a confidence threshold (say, < 0.4), then ask the user to pick from the list — but explain the rejection: *"I couldn't tell which of these fits — could you pick one?"*.
1873
+ - **Emitted code must be lint-clean for the project's lint config (ENG-35724).** Every `.ts` / `.tsx` / `.kt` / `.swift` / `.dart` the agent writes should pass the user's existing `eslint` / `tsc --noEmit` / `ktlint` / `swiftlint` / `dart analyze` with zero new warnings or info-level issues. Before declaring success, run the project's lint command (read `package.json`'s `scripts.lint` or use sane defaults: `npx eslint .` for JS, `flutter analyze` for Flutter, etc.). If new warnings appear from kit imports the user can't suppress, document them in a one-line `// eslint-disable-next-line <rule>` comment with a reason — DON'T leave noise that the user has to clean up. Testers complained that every scaffold introduced 5–15 info-level lints that pile up if multiple features are added in sequence.
1710
1874
  - For component names and props, use the framework-appropriate `*-components` skill or docs MCP — never invent from training data.
1711
- - After writing code, record state in `.cometchat/state.json` (Step 5 step 11) so the iteration menu can detect the integration in a future session.
1875
+ - After writing code, record state in `.cometchat/state.json` (Step 5 step 11) so the iteration menu can detect the integration in a future session. **Timing:** record AFTER the RN-bare smoke-test passes (when one is required by the rule above); for all other frameworks, record immediately after the final file write. If the smoke-test fails, do NOT write state.json yet — fix the failure first, then record once the build succeeds.
1712
1876
  - **NEVER explicitly load CometChat skills via your agent's skill-loading mechanism.** They're already in your context as `.claude/skills/`, `.cursor/skills/`, `.kiro/skills/`, or `.agents/skills/` files. Just read and follow them directly.
1713
1877
 
1714
1878
  ### Web only
@@ -1728,9 +1892,9 @@ The iteration loop is the whole point of Phase B. Re-rendering the canonical men
1728
1892
  - **Credentials live in `src/environments/environment.ts`, NOT `.env`.** Angular bundles `environment.ts` at compile time; there is no runtime `.env` lookup. The CLI's `provision setup --framework angular` writes a `.env` only as a credentials handoff — migrate the values into `environment.ts` (and `environment.prod.ts` minus the `authKey`) during integration.
1729
1893
  - **Init runs through `APP_INITIALIZER`, not a wrapper component.** Angular has no React-style provider tree — `CometChatUIKit.init(settings)` must complete before any chat component renders. Wire it as `{ provide: APP_INITIALIZER, useFactory, deps: [...], multi: true }` in the root module.
1730
1894
  - **Login API is `CometChatUIKit.login({ uid })` (object form), NOT a bare string.** Same shape as the React Native UI Kit. Calling `CometChatUIKit.login("cometchat-uid-1")` silently fails on Angular too — always pass the credentials object: `login({ uid })` for dev, `login({ authToken })` for production.
1731
- - **Events are `[onX]` Input callbacks, not `(onX)` Output bindings.** The Angular UI Kit declares almost no `@Output` — events like `onSendButtonClick`, `onAccept`, `onItemClick` are `@Input()` callback functions. Writing `(onAccept)="handleAccept()"` silently no-ops or fails template type checking.
1895
+ - **Angular v5 kit has TWO event-binding patterns (corrected 2026-06-02 was wrong in v4 era).** New-style event names (no `on*` prefix) are `@Output()` — bind with **round brackets**: `(itemClick)="handler($event)"`, `(closeClick)`, `(sendButtonClick)`, `(threadRepliesClick)`, `(textChange)`, `(backClick)`, `(conversationClick)`, etc. Legacy `on*`-prefix names that still exist as `@Input()` callbacks are: `onAccept`, `onDecline`, `onVoiceCallClick`, `onVideoCallClick`, `onError`, `onSuccess` — bind with **square brackets**: `[onError]="handlerFn"`. Names like `onItemClick`, `onSendButtonClick`, `onThreadRepliesClick`, `onTextChange`, `onCloseClicked` **do not exist at all in v5** — use the round-bracket Output form above. See `cometchat-angular-components` §"Binding conventions" for the full mapping.
1732
1896
  - **`[messagesRequestBuilder]` is plural.** `[messageRequestBuilder]` (singular) on `<cometchat-message-list>` silently no-ops — the input doesn't exist.
1733
- - **Match the kit's `auxilaryButtonView` typo** on `<cometchat-message-composer>` (missing first 'i'). The corrected spelling `auxiliaryButtonView` does not exist in the kit and silently no-ops.
1897
+ - **`auxiliaryButtonView` is correctly spelled (two i's) — corrected 2026-06-02.** Earlier versions of this rule said to "match a kit typo `auxilaryButtonView`" that was wrong. The kit (`cometchat-message-composer.component.ts`) uses the correctly-spelled `auxiliaryButtonView` and earlier `auxilary`-typo claims were the source of confusion, not the kit.
1734
1898
  - **`CometChatThemeService` is the v4 theme entry point**, NOT the legacy v3 `CometChatTheme` class. Inject the service; access `themeService.theme` for palette/typography control.
1735
1899
 
1736
1900
  ### Android only
@@ -1769,7 +1933,7 @@ The iteration loop is the whole point of Phase B. Re-rendering the canonical men
1769
1933
  - **App theme parent is irrelevant on iOS** — but pod-side: Xcode 15+ requires `ENABLE_USER_SCRIPT_SANDBOXING = NO` in Build Settings (or the `post_install` Podfile hook). Without it, the resource-bundle build phase silently fails and assets/strings load empty at runtime.
1770
1934
  - **`pod 'CometChatUIKitSwift', '~> 5.1'`**, NOT `~> 5.0` — the binary target ships at 5.1.x (5.1.12 at last verification); the older pin would resolve to a stale subrelease.
1771
1935
  - **`CometChatLocalize.set(key:value:)` does not exist.** Public API is locale-only: `set(locale: Language)` / `set(locale: String)`. Override individual keys via your app's `Localizable.strings` instead.
1772
- - **`CometChatTypography.setFont(name:)` is a class func**, not a settable `fontFamily` property. `CometChatTypography.fontFamily = "Avenir"` does not compile.
1936
+ - **iOS font override uses `overrideFont(family:)` on the `Typography` struct (corrected 2026-06-02).** Verified at `cometchat-uikit-ios-v5/CometChatUIKitSwift/Components/Shared/Helpers/CometChatTheme/Typography.swift:108`: the actual API is `mutating func overrideFont(family: CometChatFontFamily)` on the `Typography` struct value — NOT `CometChatTypography.setFont(name:)` as earlier versions of this rule claimed. To customize fonts: instantiate a `CometChatFontFamily` (with regular/medium/semibold/bold faces) then call `myTypography.overrideFont(family: customFamily)`. `CometChatTypography.fontFamily = "Avenir"` does not compile either way.
1773
1937
  - **`CometChatGroupMembers()` takes zero args**; pass the group via `set(group:)`. There is no `CometChatGroupMembers(group:)` initializer.
1774
1938
  - **`CometChatCallButtons(width:height:)` requires explicit dimensions**; there is no zero-arg initializer.
1775
1939
  - **`CometChatThreadHeader` does NOT exist** — the real class is `CometChatThreadedMessageHeader`.
@@ -1861,7 +2025,7 @@ Not required for integration or Phase B CLI flows.
1861
2025
  | `cometchat-android-v5-testing` | When adding tests (Espresso, Robolectric, mocking the kit/SDK) |
1862
2026
  | `cometchat-android-v5-troubleshooting` | When diagnosing problems (Gradle, manifest, ProGuard, lifecycle) |
1863
2027
 
1864
- ### Android V6 family (beta — `chatuikit-{compose,kotlin}-android:6.x`)
2028
+ ### Android V6 family (stable, GA 2026-05-25 — `chatuikit-{compose,kotlin}-android:6.x`)
1865
2029
 
1866
2030
  | Skill | When to load |
1867
2031
  |---|---|
@@ -1901,7 +2065,7 @@ Not required for integration or Phase B CLI flows.
1901
2065
  | `cometchat-flutter-v5-push` | When setting up FCM / APNs / VoIP push |
1902
2066
  | `cometchat-flutter-v5-troubleshooting` | When diagnosing problems (pubspec, GetX, Pod errors, runtime crashes) |
1903
2067
 
1904
- ### Flutter V6 family (beta — `cometchat_chat_uikit: ^6.0`)
2068
+ ### Flutter V6 family (stable, GA 2026-05-25 — `cometchat_chat_uikit: ^6.0`)
1905
2069
 
1906
2070
  | Skill | When to load |
1907
2071
  |---|---|