@vc-shell/vc-app-skill 2.0.0-alpha.32 → 2.0.0-alpha.33-pr220.455e322

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 (195) hide show
  1. package/CHANGELOG.md +59 -47
  2. package/README.md +18 -12
  3. package/package.json +4 -4
  4. package/runtime/VERSION +1 -1
  5. package/runtime/agents/api-analyzer.md +31 -16
  6. package/runtime/agents/blade-enhancer.md +15 -9
  7. package/runtime/agents/details-blade-generator.md +47 -31
  8. package/runtime/agents/list-blade-generator.md +21 -37
  9. package/runtime/agents/locales-generator.md +3 -0
  10. package/runtime/agents/migration-agent.md +94 -0
  11. package/runtime/agents/module-analyzer.md +2 -0
  12. package/runtime/agents/module-assembler.md +15 -0
  13. package/runtime/agents/promote-agent.md +15 -4
  14. package/runtime/agents/type-checker.md +11 -0
  15. package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
  16. package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
  17. package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
  18. package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
  19. package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
  20. package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
  21. package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
  22. package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
  23. package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
  24. package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +31 -27
  25. package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
  26. package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
  27. package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
  28. package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +75 -19
  29. package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
  30. package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
  31. package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
  32. package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
  33. package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
  34. package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
  35. package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
  36. package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
  37. package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
  38. package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
  39. package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
  40. package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -10
  41. package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
  42. package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
  43. package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
  44. package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
  45. package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
  46. package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
  47. package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +24 -15
  48. package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
  49. package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
  50. package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
  51. package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
  52. package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
  53. package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
  54. package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
  55. package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
  56. package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
  57. package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
  58. package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
  59. package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
  60. package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
  61. package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +107 -91
  62. package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
  63. package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
  64. package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +98 -90
  65. package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
  66. package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
  67. package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
  68. package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
  69. package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
  70. package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
  71. package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
  72. package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
  73. package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
  74. package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
  75. package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
  76. package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
  77. package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +102 -0
  78. package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
  79. package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
  80. package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
  81. package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
  82. package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
  83. package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
  84. package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
  85. package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
  86. package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
  87. package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
  88. package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
  89. package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +12 -18
  90. package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
  91. package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
  92. package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
  93. package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
  94. package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
  95. package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
  96. package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
  97. package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
  98. package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
  99. package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
  100. package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +104 -59
  101. package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
  102. package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
  103. package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
  104. package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
  105. package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
  106. package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
  107. package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
  108. package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
  109. package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
  110. package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
  111. package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
  112. package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
  113. package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
  114. package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
  115. package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
  116. package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
  117. package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
  118. package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
  119. package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +59 -44
  120. package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
  121. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +96 -64
  122. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
  123. package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
  124. package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
  125. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
  126. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
  127. package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +60 -72
  128. package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
  129. package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
  130. package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
  131. package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
  132. package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +115 -130
  133. package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
  134. package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
  135. package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
  136. package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
  137. package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +63 -64
  138. package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
  139. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +59 -19
  140. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
  141. package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
  142. package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
  143. package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
  144. package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
  145. package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
  146. package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
  147. package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
  148. package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
  149. package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +120 -75
  150. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
  151. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
  152. package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
  153. package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
  154. package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
  155. package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
  156. package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
  157. package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
  158. package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
  159. package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
  160. package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
  161. package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
  162. package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
  163. package/runtime/knowledge/examples/offers-module.md +15 -13
  164. package/runtime/knowledge/examples/team-module.md +82 -119
  165. package/runtime/knowledge/examples/videos-module.md +44 -17
  166. package/runtime/knowledge/index.md +22 -0
  167. package/runtime/knowledge/migration-prompts/blade-form-migration.md +255 -0
  168. package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
  169. package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
  170. package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
  171. package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
  172. package/runtime/knowledge/migration-prompts/notifications-migration.md +223 -0
  173. package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
  174. package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
  175. package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
  176. package/runtime/knowledge/migration-prompts/widgets-migration.md +178 -0
  177. package/runtime/knowledge/patterns/assets-management.md +20 -20
  178. package/runtime/knowledge/patterns/blade-navigation.md +7 -14
  179. package/runtime/knowledge/patterns/blade-widget.md +19 -17
  180. package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
  181. package/runtime/knowledge/patterns/composable-details.md +20 -50
  182. package/runtime/knowledge/patterns/composable-list.md +43 -31
  183. package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
  184. package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
  185. package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
  186. package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
  187. package/runtime/knowledge/patterns/form-validation.md +28 -64
  188. package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
  189. package/runtime/knowledge/patterns/module-structure.md +7 -1
  190. package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
  191. package/runtime/knowledge/patterns/notification-template.md +21 -14
  192. package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
  193. package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
  194. package/runtime/vc-app.md +354 -49
  195. package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
@@ -10,13 +10,13 @@ description: Generates a details blade Vue component and its singular composable
10
10
  "required": {
11
11
  "moduleName": "string — kebab-case module name (e.g., 'team', 'catalog-items')",
12
12
  "entityName": "string — PascalCase entity name (e.g., 'TeamMember', 'Order')",
13
- "entityTypePath": "string — import path for entity types (e.g., '../../api_client/virtocommerce.marketplace')",
14
- "clientClass": "string — NSwag client class name (e.g., 'VcmpSellerSecurityClient')",
13
+ "entityTypePath": "string — import path for entity types (e.g., '../../api_client/virtocommerce.mymodule')",
14
+ "clientClass": "string — NSwag client class name (e.g., 'MyEntityClient')",
15
15
  "crudMethods": {
16
- "get": "string? — camelCase get method on client (e.g., 'getSellerUser')",
17
- "create": "string? — camelCase create method (e.g., 'createSellerUser')",
18
- "update": "string? — camelCase update method (e.g., 'updateSellerUser')",
19
- "delete": "string? — camelCase delete method (e.g., 'deleteSellerUsers')"
16
+ "get": "string? — camelCase get method on client (e.g., 'getUser')",
17
+ "create": "string? — camelCase create method (e.g., 'createUser')",
18
+ "update": "string? — camelCase update method (e.g., 'updateUser')",
19
+ "delete": "string? — camelCase delete method (e.g., 'deleteUsers')"
20
20
  },
21
21
  "fields": [
22
22
  {
@@ -56,6 +56,7 @@ Before generating, Read these files in order:
56
56
  3. `{knowledgeBase}/index.md` — to find relevant component docs
57
57
 
58
58
  From `index.md`, identify and Read docs from `{docsRoot}/` for:
59
+
59
60
  - **Always:** `VcBlade`, `VcForm`, `VcInput`, `VcSelect`, `VcSwitch`
60
61
  - **Based on field types present:** Read docs for each component that appears in the field type mapping below (e.g., if any field has type `text` → read `VcTextarea` docs; if `rich-text` → read `VcEditor` docs; if `currency` → read `VcInputCurrency` docs; etc.)
61
62
  - **Layout:** If 5+ fields → read `VcCard` docs; if 8+ fields → read `VcAccordion` docs
@@ -65,6 +66,7 @@ From `index.md`, identify and Read docs from `{docsRoot}/` for:
65
66
  ### Step 1: Derive naming variables
66
67
 
67
68
  From inputs compute:
69
+
68
70
  - `composableName` = `use` + `entityName` (e.g., `useTeamMember`)
69
71
  - `entityNameLower` = camelCase of `entityName` (e.g., `teamMember`)
70
72
  - `bladeComponentName` = PascalCase of `moduleName` + `Details` (e.g., `TeamDetails`)
@@ -73,15 +75,18 @@ From inputs compute:
73
75
  - `updateCommandClass` = `Update` + `entityName` + `Command` (if `crudMethods.update` provided)
74
76
 
75
77
  For standalone blades:
78
+
76
79
  - `url` = `"/" + moduleName + "-details"`
77
80
 
78
81
  ### Existing Module Context
79
82
 
80
83
  When `existingModule` is provided:
84
+
81
85
  - Use the same `localePrefix` convention from `existingModule.localePrefix` instead of deriving a new one. This ensures i18n keys are consistent across all blades in the module.
82
86
  - Reference `existingModule.blades` to avoid naming collisions with existing blade component names.
83
87
 
84
88
  When `linkTo` is provided:
89
+
85
90
  - After generating the new details blade, open the source blade file specified by `linkTo.blade` (resolve from `existingModule.indexPath` parent directory + `pages/`).
86
91
  - Add an `openBlade` call to the source blade based on `linkTo.trigger`:
87
92
  - `"button"` — add a toolbar button with `linkTo.label` that calls `openBlade({ blade: {bladeComponentName} })`
@@ -93,30 +98,31 @@ When `linkTo` is provided:
93
98
 
94
99
  For each field in `fields`, determine the component using this table. If the field already has a `component` property (from `/vc-app design`), use that directly. Otherwise, map from `type`:
95
100
 
96
- | Field type | Component | Validation rules | Notes |
97
- |------------|-----------|------------------|-------|
98
- | `string` | `VcInput` | `required` (if required) | Default for short text. Use `rules="email"` if name contains "email", `type="tel"` if phone, `type="url"` if url/website |
99
- | `text` | `VcTextarea` | `required` (if required) | Long text: description, notes, comments, bio, summary |
100
- | `rich-text` | `VcEditor` | `required` (if required) | HTML/WYSIWYG: body, content, article, template |
101
- | `boolean` | `VcSwitch` | none | No `Field` wrapper. Default for toggles (isActive, isEnabled) |
102
- | `boolean` | `VcCheckbox` | none | No `Field` wrapper. Use for consent/accept semantics (agreeTerms) |
103
- | `number` | `VcInput type="number"` | `required\|bigint\|min_value:0` | Plain numbers: quantity, count, age |
104
- | `currency` | `VcInputCurrency` | `required\|min_value:0` | Money: price, cost, amount, salary. Set `currency="USD"` (or infer from context) |
105
- | `date-time` | `VcDatePicker` | `required` (if required) | Preferred over `VcInput type="datetime-local"`. Calendar picker widget |
106
- | `Date` | `VcDatePicker` | `required` (if required) | Legacy alias — same as `date-time` |
107
- | `enum` | `VcSelect` | `required` (if required) | For 6+ options or dynamic options. Needs `{field}Options` computed |
108
- | `enum` (2-5 options) | `VcRadioGroup` | `required` (if required) | More visual for small static sets. Needs `{field}Options` array |
109
- | `multi-select` | `VcMultivalue` | none | Tags/multi-pick: tags, categories, roles. No `Field` wrapper needed |
110
- | `multi-select` (static) | `VcCheckboxGroup` | none | Few static checkboxes. Needs `{field}Options` array |
111
- | `rating` | `VcRating` | none | Star rating 1-5. No `Field` wrapper needed |
112
- | `range` | `VcSlider` | none | Numeric slider: discount, percentage. Set `:min` / `:max` |
113
- | `color` | `VcColorInput` | none | Color picker with hex. No `Field` wrapper needed |
114
- | `image` | `VcImageUpload` | none | Single image upload with preview |
115
- | `gallery` | `VcGallery` | none | Multi-image management grid |
116
- | `file` | `VcFileUpload` | none | File attachment. Set `:accept` filter for allowed extensions |
117
- | `array` | `VcDataTable` (inline) | none | Read-only nested table |
101
+ | Field type | Component | Validation rules | Notes |
102
+ | ----------------------- | ----------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
103
+ | `string` | `VcInput` | `required` (if required) | Default for short text. Use `rules="email"` if name contains "email", `type="tel"` if phone, `type="url"` if url/website |
104
+ | `text` | `VcTextarea` | `required` (if required) | Long text: description, notes, comments, bio, summary |
105
+ | `rich-text` | `VcEditor` | `required` (if required) | HTML/WYSIWYG: body, content, article, template |
106
+ | `boolean` | `VcSwitch` | none | No `Field` wrapper. Default for toggles (isActive, isEnabled) |
107
+ | `boolean` | `VcCheckbox` | none | No `Field` wrapper. Use for consent/accept semantics (agreeTerms) |
108
+ | `number` | `VcInput type="number"` | `required\|bigint\|min_value:0` | Plain numbers: quantity, count, age |
109
+ | `currency` | `VcInputCurrency` | `required\|min_value:0` | Money: price, cost, amount, salary. Set `currency="USD"` (or infer from context) |
110
+ | `date-time` | `VcDatePicker` | `required` (if required) | Preferred over `VcInput type="datetime-local"`. Calendar picker widget |
111
+ | `Date` | `VcDatePicker` | `required` (if required) | Legacy alias — same as `date-time` |
112
+ | `enum` | `VcSelect` | `required` (if required) | For 6+ options or dynamic options. Needs `{field}Options` computed |
113
+ | `enum` (2-5 options) | `VcRadioGroup` | `required` (if required) | More visual for small static sets. Needs `{field}Options` array |
114
+ | `multi-select` | `VcMultivalue` | none | Tags/multi-pick: tags, categories, roles. No `Field` wrapper needed |
115
+ | `multi-select` (static) | `VcCheckboxGroup` | none | Few static checkboxes. Needs `{field}Options` array |
116
+ | `rating` | `VcRating` | none | Star rating 1-5. No `Field` wrapper needed |
117
+ | `range` | `VcSlider` | none | Numeric slider: discount, percentage. Set `:min` / `:max` |
118
+ | `color` | `VcColorInput` | none | Color picker with hex. No `Field` wrapper needed |
119
+ | `image` | `VcImageUpload` | none | Single image upload with preview |
120
+ | `gallery` | `VcGallery` | none | Multi-image management grid |
121
+ | `file` | `VcFileUpload` | none | File attachment. Set `:accept` filter for allowed extensions |
122
+ | `array` | `VcDataTable` (inline) | none | Read-only nested table |
118
123
 
119
124
  **Field name heuristics:** When field type is plain `"string"`, upgrade based on the field name:
125
+
120
126
  - `description`, `notes`, `comment`, `bio`, `summary`, `about` → `text` (VcTextarea)
121
127
  - `body`, `content`, `html`, `article`, `template` → `rich-text` (VcEditor)
122
128
  - `price`, `cost`, `amount`, `total`, `salary`, `budget`, `fee` → `currency` (VcInputCurrency)
@@ -132,6 +138,7 @@ Refer to `details-blade-pattern.md` → "Field Type → Component Mapping" secti
132
138
  Write to: `{targetDir}/composables/use{EntityName}/index.ts`
133
139
 
134
140
  Follow `composable-details.md` skeleton exactly:
141
+
135
142
  - Import `useModificationTracker`, `useApiClient`, `useAsync`, `useLoading`, `AsyncAction` from `@vc-shell/framework`
136
143
  - Import entity types and command classes from `entityTypePath`
137
144
  - Define `IUse{EntityName}` interface — include only methods present in `crudMethods`
@@ -155,9 +162,7 @@ Instead of the normal composable that imports API client classes, generate this
155
162
 
156
163
  ```ts
157
164
  // vc-app:mock-start
158
- const mockData: Record<string, unknown>[] = [
159
- { id: "1", name: "Item 1", status: "active", createdDate: new Date().toISOString() },
160
- ];
165
+ const mockData: Record<string, unknown>[] = [{ id: "1", name: "Item 1", status: "active", createdDate: new Date().toISOString() }];
161
166
 
162
167
  const fetchItem = async (id: string) => {
163
168
  return mockData.find((item) => item.id === id) ?? {};
@@ -185,6 +190,7 @@ Write to: `{targetDir}/pages/{moduleName}-details.vue`
185
190
  Follow `details-blade-pattern.md` template exactly:
186
191
 
187
192
  **Script setup:**
193
+
188
194
  - `defineBlade({ name: "{bladeComponentName}" })` — no url/isWorkspace for child blades
189
195
  - If `isStandalone: true`: `defineBlade({ name: "{bladeComponentName}", url: "{url}", isWorkspace: true, menuItem: { title: "{menuConfig.title}", icon: "{menuConfig.icon}", priority: {menuConfig.priority} } })` — standalone details blades that serve as the module entry point need a menu item to be accessible from navigation
190
196
  - `const { onBeforeClose, param, options, callParent, closeSelf } = useBlade()`
@@ -194,6 +200,7 @@ Follow `details-blade-pattern.md` template exactly:
194
200
  - `isDisabled` computed: `!meta.value.dirty || !meta.value.valid`
195
201
 
196
202
  **Toolbar items (include only for methods present in `crudMethods`):**
203
+
197
204
  - `save` button: `isVisible: !!param.value`, calls `updateXxx` then `callParent("reload"); closeSelf()`
198
205
  - `create` button: `isVisible: !param.value`, calls `createXxx` then `callParent("reload"); closeSelf()`
199
206
  - `reset` button: `isVisible: !!param.value`, calls `resetEntries()`
@@ -203,15 +210,18 @@ Follow `details-blade-pattern.md` template exactly:
203
210
  - If `crudMethods.delete` is null: omit delete button
204
211
 
205
212
  **Template:**
213
+
206
214
  - `<VcBlade :loading="loading" :modified="modified" :title="title" :toolbar-items="bladeToolbar" width="50%">`
207
215
  - `<VcContainer>`
208
216
 
209
217
  **Banners (contextual alerts):**
218
+
210
219
  - Add `<VcBanner>` at the top of the form (before `<VcForm>`) for state-dependent alerts. See `details-blade-pattern.md` → "Contextual Banners Pattern".
211
220
  - Use `variant="info"` for creation hints, `variant="danger"` for errors, `variant="warning"` for missing data.
212
221
  - Example: `<VcBanner v-if="!entity.id" variant="info" icon="lucide-lightbulb" icon-size="l">{{ $t("...CREATE_HINT") }}</VcBanner>`
213
222
 
214
223
  **Form fields:**
224
+
215
225
  - `<VcForm>` wraps all editable fields
216
226
  - Use the component determined in Step 2 for each field. Refer to `details-blade-pattern.md` for full template examples of each component type.
217
227
  - Components that need `<Field>` wrapper (for validation): `VcInput`, `VcTextarea`, `VcEditor`, `VcDatePicker`, `VcSelect`, `VcRadioGroup`, `VcInputCurrency`, `VcFileUpload`
@@ -220,6 +230,7 @@ Follow `details-blade-pattern.md` template exactly:
220
230
  - Use i18n keys: `{i18nPrefix}.FIELDS.{FIELD_NAME_UPPER}.LABEL` and `.PLACEHOLDER`
221
231
 
222
232
  **Read-only fields (VcField):**
233
+
223
234
  - For fields that should display data without editing (computed values, IDs, timestamps on existing entities), use `<VcField>` instead of `<VcInput>`:
224
235
  ```vue
225
236
  <VcField :label="$t('...')" :model-value="entity.number" orientation="horizontal" :aspect-ratio="[1, 2]" copyable type="text" />
@@ -228,12 +239,14 @@ Follow `details-blade-pattern.md` template exactly:
228
239
  - Use `VcField` when: the blade is view-only, or for specific non-editable fields within an editable form (order number, creation date).
229
240
 
230
241
  **Layout — ALWAYS use VcCard sections:**
242
+
231
243
  - Group related fields in `<VcCard :header="$t('...')">` sections. This is how real vc-shell apps are built — flat forms without cards look unfinished.
232
244
  - If 3+ fields → at minimum 1 card. If 5+ fields → 2+ cards grouped by topic.
233
245
  - If 8+ fields → consider `<VcAccordion>` for secondary/advanced fields.
234
246
  - **Grid:** Use `<VcRow><VcCol>` to arrange short fields in 2 columns. Wide fields (`VcTextarea`, `VcEditor`, `VcGallery`, `VcDataTable`) span full width.
235
247
 
236
248
  **Close guard:**
249
+
237
250
  ```ts
238
251
  onBeforeClose(async () => {
239
252
  if (modified.value) {
@@ -248,6 +261,7 @@ onBeforeClose(async () => {
248
261
  Write to: `{targetDir}/composables/index.ts`
249
262
 
250
263
  Append (or create):
264
+
251
265
  ```ts
252
266
  export { default as use{EntityName} } from "./use{EntityName}";
253
267
  ```
@@ -255,6 +269,7 @@ export { default as use{EntityName} } from "./use{EntityName}";
255
269
  ## Output Contract
256
270
 
257
271
  Files written to disk:
272
+
258
273
  1. `{targetDir}/composables/use{EntityName}/index.ts`
259
274
  2. `{targetDir}/pages/{moduleName}-details.vue`
260
275
  3. `{targetDir}/composables/index.ts` (created or appended)
@@ -264,6 +279,7 @@ Returns a summary of generated files and any field type assumptions made.
264
279
  ## Self-Check
265
280
 
266
281
  Before completing, verify:
282
+
267
283
  - [ ] `defineBlade` is at module scope, not inside a function
268
284
  - [ ] `useForm({ validateOnMount: false })` is called
269
285
  - [ ] `onBeforeClose` guard is present if `modified` is used
@@ -10,9 +10,9 @@ description: Generates a list blade Vue component and its plural composable for
10
10
  "required": {
11
11
  "moduleName": "string — kebab-case module name (e.g., 'team', 'catalog-items')",
12
12
  "entityName": "string — PascalCase entity name (e.g., 'TeamMember', 'Order')",
13
- "entityTypePath": "string — import path for entity types (e.g., '../../api_client/virtocommerce.marketplace')",
14
- "clientClass": "string — NSwag client class name (e.g., 'VcmpSellerSecurityClient')",
15
- "searchMethod": "string — camelCase search method on client (e.g., 'searchSellerUsers')",
13
+ "entityTypePath": "string — import path for entity types (e.g., '../../api_client/virtocommerce.mymodule')",
14
+ "clientClass": "string — NSwag client class name (e.g., 'UserSecurityClient')",
15
+ "searchMethod": "string — camelCase search method on client (e.g., 'searchUsers')",
16
16
  "columns": [
17
17
  {
18
18
  "name": "string — field name (camelCase)",
@@ -61,6 +61,7 @@ From `index.md`, identify any `.docs.md` files for `VcBlade`, `VcDataTable`, `Vc
61
61
  ### Step 1: Derive naming variables
62
62
 
63
63
  From inputs compute:
64
+
64
65
  - `entityNamePlural` = `entityName` + "s" (e.g., `TeamMembers`, `Orders`)
65
66
  - `entityNameLower` = camelCase of `entityName` (e.g., `teamMember`, `order`)
66
67
  - `entityNamePluralLower` = camelCase of `entityNamePlural` (e.g., `teamMembers`, `orders`)
@@ -76,10 +77,12 @@ From inputs compute:
76
77
  ### Existing Module Context
77
78
 
78
79
  When `existingModule` is provided:
80
+
79
81
  - Use the same `localePrefix` convention from `existingModule.localePrefix` instead of deriving a new one. This ensures i18n keys are consistent across all blades in the module.
80
82
  - Reference `existingModule.blades` to avoid naming collisions with existing blade component names.
81
83
 
82
84
  When `linkTo` is provided:
85
+
83
86
  - After generating the new list blade, open the source blade file specified by `linkTo.blade` (resolve from `existingModule.indexPath` parent directory + `pages/`).
84
87
  - Add an `openBlade` call to the source blade based on `linkTo.trigger`:
85
88
  - `"button"` — add a toolbar button with `linkTo.label` that calls `openBlade({ blade: {bladeComponentName} })`
@@ -92,6 +95,7 @@ When `linkTo` is provided:
92
95
  Write to: `{targetDir}/composables/use{EntityNamePlural}/index.ts`
93
96
 
94
97
  Follow the skeleton from `composable-list.md` exactly:
98
+
95
99
  - Import `useApiClient`, `useAsync`, `useLoading` from `@vc-shell/framework`
96
100
  - Import `Search{EntityName}Query`, `Search{EntityName}Result`, `{EntityName}`, `{ClientClass}` from `entityTypePath`
97
101
  - Import type alias: `import type { Search{EntityName}Query as ISearch{EntityName}Query }`
@@ -100,13 +104,14 @@ Follow the skeleton from `composable-list.md` exactly:
100
104
  - Use `useAsync<ISearch{EntityName}Query>` for the `{getFnName}` action
101
105
  - Return `loading`, `{listVarName}`, `totalCount`, `currentPage`, `pages`, `searchQuery`, `{getFnName}`
102
106
 
103
- If the `searchMethod` uses a non-standard pluralization (e.g., `searchSellerUsers` for `SellerUser`), match the client method name exactly.
107
+ If the `searchMethod` uses a non-standard pluralization (e.g., `searchUsers` for `User`), match the client method name exactly.
104
108
 
105
109
  ### Step 3: Classify columns and assign VcColumn attributes
106
110
 
107
111
  For each column in `columns`, determine the VcColumn attributes using these rules:
108
112
 
109
113
  **Column type mapping** (based on field name and data type):
114
+
110
115
  - Field name contains "status" or "state" OR `isEnum: true` → `type="status"`, add `#body` slot with `VcStatus`
111
116
  - Field name starts with "is", "has", "can" (boolean) → `type="status-icon"`
112
117
  - Field name contains "date", "created", "modified", "updated" (Date type) → `type="date-ago"`
@@ -116,6 +121,7 @@ For each column in `columns`, determine the VcColumn attributes using these rule
116
121
  - Everything else → no type (plain text)
117
122
 
118
123
  **Mobile layout assignment** (assign to the first matching column):
124
+
119
125
  - First image column → `mobile-role="image"`, `:always-visible="true"`
120
126
  - First identifier column (name, number, title) → `mobile-position="top-left"`, `:always-visible="true"`
121
127
  - First status column → `mobile-role="status"`, `:always-visible="true"`
@@ -132,50 +138,28 @@ Follow the template from `list-blade-pattern.md` exactly.
132
138
  **CRITICAL: Template section — explicit VcColumn declarations (NO v-for):**
133
139
 
134
140
  Each column must be declared as a separate `<VcColumn>` element in the template. Do NOT use `v-for` with a computed array. This enables:
141
+
135
142
  - `#body` slots for status badges, images, and custom rendering
136
143
  - Per-column `mobile-role` / `mobile-position` attributes
137
144
  - Better readability and maintainability
138
145
 
139
146
  Example of correct column declarations:
147
+
140
148
  ```vue
141
- <VcColumn
142
- id="number"
143
- :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.NUMBER')"
144
- :always-visible="true"
145
- :sortable="true"
146
- mobile-position="top-left"
147
- />
148
- <VcColumn
149
- id="status"
150
- :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.STATUS')"
151
- :always-visible="true"
152
- :sortable="true"
153
- type="status"
154
- mobile-role="status"
155
- >
149
+ <VcColumn id="number" :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.NUMBER')" :always-visible="true" :sortable="true" mobile-position="top-left" />
150
+ <VcColumn id="status" :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.STATUS')" :always-visible="true" :sortable="true" type="status" mobile-role="status">
156
151
  <template #body="{ data }">
157
152
  <VcStatus :variant="statusVariant(data.status)">
158
153
  {{ data.status }}
159
154
  </VcStatus>
160
155
  </template>
161
156
  </VcColumn>
162
- <VcColumn
163
- id="total"
164
- :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.TOTAL')"
165
- :sortable="true"
166
- type="money"
167
- mobile-position="top-right"
168
- />
169
- <VcColumn
170
- id="createdDate"
171
- :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.CREATED_DATE')"
172
- :sortable="true"
173
- type="date-ago"
174
- mobile-position="bottom-right"
175
- />
157
+ <VcColumn id="total" :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.TOTAL')" :sortable="true" type="money" mobile-position="top-right" />
158
+ <VcColumn id="createdDate" :title="t('ORDERS.PAGES.LIST.TABLE.HEADER.CREATED_DATE')" :sortable="true" type="date-ago" mobile-position="bottom-right" />
176
159
  ```
177
160
 
178
161
  **Script setup section:**
162
+
179
163
  - `defineBlade({ name: "{bladeComponentName}", url: "{url}", isWorkspace: true, permissions: ["{i18nPrefix_lower}:manage"], menuItem: { title: "{menuConfig.title}", icon: "{menuConfig.icon}", priority: {menuConfig.priority} } })`
180
164
  - Import and destructure `{composableName}` with correct variable names
181
165
  - `useDataTableSort({ initialField: "createdDate", initialDirection: "DESC" })`
@@ -196,9 +180,7 @@ Instead of the normal composable that imports API client classes, generate this
196
180
 
197
181
  ```ts
198
182
  // vc-app:mock-start
199
- const mockData: Record<string, unknown>[] = [
200
- { id: "1", name: "Item 1", status: "active", createdDate: new Date().toISOString() },
201
- ];
183
+ const mockData: Record<string, unknown>[] = [{ id: "1", name: "Item 1", status: "active", createdDate: new Date().toISOString() }];
202
184
 
203
185
  const fetchItems = async (query?: Record<string, unknown>) => {
204
186
  return { results: mockData, totalCount: mockData.length };
@@ -236,6 +218,7 @@ If the file already exists, append the export line (do not overwrite).
236
218
  ## Output Contract
237
219
 
238
220
  Files written to disk:
221
+
239
222
  1. `{targetDir}/composables/use{EntityNamePlural}/index.ts`
240
223
  2. `{targetDir}/pages/{moduleName}-list.vue`
241
224
  3. `{targetDir}/composables/index.ts` (created or appended)
@@ -245,6 +228,7 @@ Returns a summary of generated files and any assumptions made.
245
228
  ## Self-Check
246
229
 
247
230
  Before completing, verify:
231
+
248
232
  - [ ] `defineBlade` is at module scope (top-level of `<script setup>`), not inside any function
249
233
  - [ ] `state-key` is snake_case and unique (based on `moduleName`)
250
234
  - [ ] `useDataTableSort` destructures `sortField`, `sortOrder`, `sortExpression` — all three used
@@ -256,7 +240,7 @@ Before completing, verify:
256
240
  - [ ] **Each VcColumn is declared explicitly in the template — NO v-for with computed array**
257
241
  - [ ] Date columns use `type="date-ago"` (NOT `"date-time"`)
258
242
  - [ ] Status/state columns use `type="status"` with `#body` slot containing `VcStatus` component
259
- - [ ] Boolean columns (is*, has*, can*) use `type="status-icon"`
243
+ - [ ] Boolean columns (is*, has*, can\*) use `type="status-icon"`
260
244
  - [ ] Monetary columns use `type="money"`
261
245
  - [ ] Mobile layout attributes (`mobile-position`, `mobile-role`) are assigned to key columns
262
246
  - [ ] If status column exists, `statusVariant()` function is defined in script setup
@@ -61,6 +61,7 @@ For each key, derive its English value using this algorithm:
61
61
  For unknown suffixes: split by `_`, convert each word to Title Case, join with space.
62
62
 
63
63
  Examples:
64
+
64
65
  - `TEAM.MENU.TITLE` → `"Team"`
65
66
  - `TEAM.PAGES.LIST.TITLE` → `"Team"`
66
67
  - `TEAM.PAGES.LIST.TOOLBAR.ADD` → `"Add"`
@@ -112,6 +113,7 @@ export { en };
112
113
  ## Output Contract
113
114
 
114
115
  Files written to disk:
116
+
115
117
  1. `{targetDir}/locales/en.json`
116
118
  2. `{targetDir}/locales/index.ts`
117
119
 
@@ -120,6 +122,7 @@ Returns a summary listing number of keys extracted and any keys with uncertain v
120
122
  ## Self-Check
121
123
 
122
124
  Before completing, verify:
125
+
123
126
  - [ ] All files in `generatedFiles` were read (not just the first)
124
127
  - [ ] Both `$t('...')` and `t('...')` patterns were captured
125
128
  - [ ] Keys with template literal interpolation (`${...}`) were excluded
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: migration-agent
3
+ description: Performs AI-powered manual migrations on files identified by MIGRATION_REPORT.md, using transformation rules from migration prompts.
4
+ ---
5
+
6
+ ## Input Contract
7
+
8
+ ```json
9
+ {
10
+ "required": {
11
+ "cwd": "string — absolute path to project root",
12
+ "reportPath": "string — path to MIGRATION_REPORT.md",
13
+ "topics": "array — migration topics to process, each with: { name, affectedFiles, migrationPromptPath, patternPath? }"
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Knowledge Loading
19
+
20
+ For each topic in `topics`:
21
+
22
+ 1. Read the migration prompt from `migrationPromptPath` — these contain specific transformation rules with BEFORE/AFTER examples
23
+ 2. If `patternPath` is provided, read the pattern file — this shows what correct target code looks like
24
+
25
+ Do NOT read all prompts upfront. Load each topic's knowledge just before processing that topic.
26
+
27
+ ## Processing Strategy
28
+
29
+ ### Topic Order
30
+
31
+ Process topics in this order (dependencies first):
32
+
33
+ 1. `notification-migration` — may create new files and restructure directories
34
+ 2. `nswag-class-to-interface` — type-level changes that affect all other code
35
+ 3. `use-assets-migration` — rewires assets handlers and may add manager wiring used by blades/widgets
36
+ 4. `widgets-migration` — creates new composable files referenced by blades
37
+ 5. `use-blade-form` — depends on correct types from nswag
38
+ 6. `blade-props-simplification` — final cleanup of reusable components
39
+ 7. `vctable-audit` — VcTable → VcDataTable component and API rewrite
40
+ 8. `icon-audit` — replace all non-lucide icons with lucide equivalents (last among mechanical manual edits)
41
+ 9. `manual-migration-audit` — catch-all manual refactors (run last to avoid overlap)
42
+
43
+ Skip topics not present in the `topics` input.
44
+
45
+ ### Per-File Strategy
46
+
47
+ For each affected file in the current topic:
48
+
49
+ 1. **Read the file** completely
50
+ 2. **Apply transformation rules** from the loaded migration prompt — follow the BEFORE/AFTER patterns exactly
51
+ 3. **Create new files if required** by the prompt (e.g. `widgets/useXxxWidgets.ts` and `widgets/useXxxCount.ts` for widget migration — new files go in the `widgets/` directory at the module level, NOT in `composables/`)
52
+ 4. **Write the modified file**
53
+ 5. **Type-check:** Run `cd {cwd} && npx vue-tsc --noEmit 2>&1 | head -30` to check for errors
54
+ 6. **If errors in this file:** Read error messages, fix, re-check. Max 3 attempts.
55
+ 7. **If fixed or clean:** Commit: `fix(migrate): {topic name} — {filename}`
56
+ 8. **If still broken after 3 attempts:** Restore from backup copy (`cp {filepath}.bak {filepath}`), delete backup (`rm -f {filepath}.bak`), keep the failure in the report as "needs manual intervention", continue to next file
57
+
58
+ Before step 4, always create a backup:
59
+
60
+ - `cp {filepath} {filepath}.bak`
61
+ - Delete the backup after a successful commit for that file
62
+
63
+ ### Important Rules
64
+
65
+ 1. **Only modify files listed in the topic's `affectedFiles`** — do not touch other files unless creating new files required by the migration prompt (e.g. widget composables)
66
+ 2. **Follow transformation rules exactly** — each migration prompt has specific BEFORE/AFTER patterns. Apply them mechanically.
67
+ 3. **Do not add features or refactor** — only transform existing code to the new API
68
+ 4. **Preserve all business logic** — the behavior must stay identical after migration
69
+ 5. **Commit after each successfully migrated file** — atomic commits for easy rollback
70
+ 6. **Do not modify `api_client/` directory** — generated code, not consumer code
71
+ 7. **Do not modify `node_modules/`**
72
+
73
+ ## Output
74
+
75
+ When all topics are processed, report:
76
+
77
+ ```
78
+ ## Migration Agent Report
79
+
80
+ ### Completed
81
+ - {topic}: {N} files migrated
82
+ - src/path/to/file.vue ✅
83
+ - src/path/to/other.ts ✅
84
+
85
+ ### Failed (needs manual intervention)
86
+ - {topic}: {M} files failed
87
+ - src/path/to/problem.vue — {error description}
88
+
89
+ ### New Files Created
90
+ - src/modules/xxx/widgets/useXxxWidgets.ts
91
+
92
+ ### Remaining TypeScript Errors
93
+ {output of final vue-tsc --noEmit, if any}
94
+ ```
@@ -26,6 +26,7 @@ This agent does NOT write files. It reads the module source tree and produces a
26
26
  Read `{targetDir}/index.ts` (or `{targetDir}/index.js` if TypeScript variant is absent).
27
27
 
28
28
  Extract:
29
+
29
30
  - **Module name** — from the `defineAppModule` call's first argument or the `id` / `name` field in the object argument
30
31
  - **Blade registrations** — from the `blades` key in `defineAppModule`. Each entry maps a blade component import to its registration. Collect the import paths to locate blade files.
31
32
  - **All imports** — record import paths and specifiers for cross-referencing
@@ -140,6 +141,7 @@ Combine all extracted data into the output contract structure.
140
141
  ## Self-Check
141
142
 
142
143
  Before completing, verify:
144
+
143
145
  - [ ] All `.vue` files in `pages/` have been discovered and typed correctly as `list`, `details`, or `custom`
144
146
  - [ ] All composables in `composables/` (including nested index.ts patterns) have been discovered with their exports listed
145
147
  - [ ] API connection status is accurate — reflects actual `useApiClient` usage, not just the presence of import paths
@@ -37,6 +37,7 @@ When `mode: "append"`:
37
37
  5. Use the Edit tool (not Write tool) for all file modifications in append mode
38
38
 
39
39
  Specifically in append mode:
40
+
40
41
  - `pages/index.ts` — append new `export { default as NewBlade } from "./new-blade.vue"` lines
41
42
  - `composables/index.ts` — append new composable export lines
42
43
  - `{targetDir}/index.ts` — no changes needed (namespace import `* as pages` picks up new pages automatically)
@@ -45,6 +46,7 @@ Specifically in append mode:
45
46
  ### Step 1: Derive naming variables
46
47
 
47
48
  From `moduleName` compute:
49
+
48
50
  - `moduleClassName` = PascalCase of `moduleName` (e.g., `Team`, `CatalogItems`)
49
51
  - `targetDir` = directory containing the generated files (parent of `pages/`, `composables/`, `locales/`)
50
52
 
@@ -53,10 +55,12 @@ To find `targetDir`: take the directory of the first file in `generatedFiles` th
53
55
  ### Step 2: Identify generated pages and composables
54
56
 
55
57
  From `generatedFiles`, classify each file:
58
+
56
59
  - Files under `*/pages/*.vue` → page components
57
60
  - Files under `*/composables/**/*.ts` but NOT `*/composables/index.ts` → composable implementations
58
61
 
59
62
  For each page file, derive its export name:
63
+
60
64
  - `team-list.vue` → `TeamList`
61
65
  - `team-details.vue` → `TeamDetails`
62
66
  - `{moduleName}-list.vue` → PascalCase(`moduleName`) + `List`
@@ -69,6 +73,7 @@ For each composable directory (e.g., `useTeamMembers/`), derive its export name
69
73
  Write to: `{targetDir}/pages/index.ts`
70
74
 
71
75
  Export each page component as a named export:
76
+
72
77
  ```ts
73
78
  export { default as TeamList } from "./team-list.vue";
74
79
  export { default as TeamDetails } from "./team-details.vue";
@@ -83,6 +88,7 @@ Write to: `{targetDir}/composables/index.ts`
83
88
  If the file was already created by a generator agent (list-blade-generator or details-blade-generator), read it and ensure all composables have an export. Otherwise create it with all discovered composables.
84
89
 
85
90
  Format:
91
+
86
92
  ```ts
87
93
  export { default as useTeamMembers } from "./useTeamMembers";
88
94
  export { default as useTeamMember } from "./useTeamMember";
@@ -93,6 +99,7 @@ export { default as useTeamMember } from "./useTeamMember";
93
99
  Write to: `{targetDir}/index.ts`
94
100
 
95
101
  Follow `module-structure.md` exactly:
102
+
96
103
  ```ts
97
104
  import * as pages from "./pages";
98
105
  import * as locales from "./locales";
@@ -111,14 +118,17 @@ Do NOT re-export locales. Do NOT use a default export for locales.
111
118
  Read `appModulesRegistryPath` (e.g., `src/modules/index.ts`).
112
119
 
113
120
  Parse existing exports to detect if the module is already registered:
121
+
114
122
  - Check for `export { default as {moduleClassName} }` or `export * from "./{moduleName}"`
115
123
 
116
124
  If NOT already registered, append:
125
+
117
126
  ```ts
118
127
  export { default as {moduleClassName} } from "./{moduleName}";
119
128
  ```
120
129
 
121
130
  **Critical rules for registry update:**
131
+
122
132
  - Read the existing file first — NEVER overwrite it from scratch
123
133
  - Append the new export at the end of the file
124
134
  - Preserve all existing export lines exactly
@@ -130,12 +140,14 @@ export { default as {moduleClassName} } from "./{moduleName}";
130
140
  Find the app entry point: look for `src/main.ts` relative to the project root (the parent of `src/modules/`).
131
141
 
132
142
  Read `main.ts` and check if `{moduleClassName}` is already imported and used:
143
+
133
144
  - Check for `import { ... {moduleClassName} ... } from "./modules"` (or `from "@/modules"`)
134
145
  - Check for `app.use({moduleClassName})`
135
146
 
136
147
  If NOT already registered:
137
148
 
138
149
  1. **Update the modules import.** Find the existing `import { ... } from "./modules"` line. Add `{moduleClassName}` to its named imports. If no such import exists, add:
150
+
139
151
  ```ts
140
152
  import { {moduleClassName} } from "./modules";
141
153
  ```
@@ -146,6 +158,7 @@ If NOT already registered:
146
158
  - BEFORE `app.use(router)` (router must come after all modules)
147
159
 
148
160
  **Critical rules:**
161
+
149
162
  - Read the file first — NEVER overwrite from scratch
150
163
  - Use Edit tool for surgical changes
151
164
  - Preserve all existing imports and app.use() calls
@@ -155,6 +168,7 @@ If NOT already registered:
155
168
  ## Output Contract
156
169
 
157
170
  Files written to disk:
171
+
158
172
  1. `{targetDir}/pages/index.ts` (created or updated)
159
173
  2. `{targetDir}/composables/index.ts` (created or updated)
160
174
  3. `{targetDir}/index.ts` (created)
@@ -166,6 +180,7 @@ Returns a summary of all files created/modified and confirmation of registry reg
166
180
  ## Self-Check
167
181
 
168
182
  Before completing, verify:
183
+
169
184
  - [ ] `defineAppModule({ blades: pages, locales })` — both `pages` and `locales` are passed
170
185
  - [ ] `export * from "./pages"` and `export * from "./composables"` are in module `index.ts`
171
186
  - [ ] `locales` is NOT re-exported (no `export * from "./locales"`)