@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.
- package/CHANGELOG.md +59 -47
- package/README.md +18 -12
- package/package.json +4 -4
- package/runtime/VERSION +1 -1
- package/runtime/agents/api-analyzer.md +31 -16
- package/runtime/agents/blade-enhancer.md +15 -9
- package/runtime/agents/details-blade-generator.md +47 -31
- package/runtime/agents/list-blade-generator.md +21 -37
- package/runtime/agents/locales-generator.md +3 -0
- package/runtime/agents/migration-agent.md +94 -0
- package/runtime/agents/module-analyzer.md +2 -0
- package/runtime/agents/module-assembler.md +15 -0
- package/runtime/agents/promote-agent.md +15 -4
- package/runtime/agents/type-checker.md +11 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +31 -27
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +75 -19
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -10
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +24 -15
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +107 -91
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +98 -90
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
- package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
- package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
- package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +102 -0
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +12 -18
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +104 -59
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +59 -44
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +96 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +60 -72
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +115 -130
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +63 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +59 -19
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +120 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
- package/runtime/knowledge/examples/offers-module.md +15 -13
- package/runtime/knowledge/examples/team-module.md +82 -119
- package/runtime/knowledge/examples/videos-module.md +44 -17
- package/runtime/knowledge/index.md +22 -0
- package/runtime/knowledge/migration-prompts/blade-form-migration.md +255 -0
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
- package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
- package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
- package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
- package/runtime/knowledge/migration-prompts/notifications-migration.md +223 -0
- package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
- package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
- package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
- package/runtime/knowledge/migration-prompts/widgets-migration.md +178 -0
- package/runtime/knowledge/patterns/assets-management.md +20 -20
- package/runtime/knowledge/patterns/blade-navigation.md +7 -14
- package/runtime/knowledge/patterns/blade-widget.md +19 -17
- package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
- package/runtime/knowledge/patterns/composable-details.md +20 -50
- package/runtime/knowledge/patterns/composable-list.md +43 -31
- package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
- package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
- package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
- package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
- package/runtime/knowledge/patterns/form-validation.md +28 -64
- package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
- package/runtime/knowledge/patterns/module-structure.md +7 -1
- package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
- package/runtime/knowledge/patterns/notification-template.md +21 -14
- package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
- package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
- package/runtime/vc-app.md +354 -49
- package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
package/runtime/vc-app.md
CHANGED
|
@@ -45,15 +45,16 @@ Store `DOCS_ROOT` for passing to subagents.
|
|
|
45
45
|
|
|
46
46
|
Parse `$ARGUMENTS` to determine the subcommand:
|
|
47
47
|
|
|
48
|
-
| Arguments pattern
|
|
49
|
-
|
|
50
|
-
| `create ...`
|
|
51
|
-
| `connect ...`
|
|
52
|
-
| `add-module <name>`
|
|
53
|
-
| `generate ...`
|
|
54
|
-
| `promote <moduleName>`
|
|
55
|
-
| `design ...` | Section: `/vc-app design`
|
|
56
|
-
|
|
|
48
|
+
| Arguments pattern | Route to |
|
|
49
|
+
| ------------------------- | ----------------------------- |
|
|
50
|
+
| `create ...` | Section: `/vc-app create` |
|
|
51
|
+
| `connect ...` | Section: `/vc-app connect` |
|
|
52
|
+
| `add-module <name>` | Section: `/vc-app add-module` |
|
|
53
|
+
| `generate ...` | Section: `/vc-app generate` |
|
|
54
|
+
| `promote <moduleName>` | Section: `/vc-app promote` |
|
|
55
|
+
| `design ...` | Section: `/vc-app design` |
|
|
56
|
+
| `migrate` | Section: `/vc-app migrate` |
|
|
57
|
+
| empty / `help` / `--help` | Section: Help |
|
|
57
58
|
|
|
58
59
|
If no arguments match, show the help section.
|
|
59
60
|
|
|
@@ -73,6 +74,7 @@ Commands:
|
|
|
73
74
|
/vc-app generate Generate a full UI module from intent (list/details blades, composables, locales)
|
|
74
75
|
/vc-app promote <name> Transition a prototype module from mock data to real API client
|
|
75
76
|
/vc-app design [prompt] Generate a full application from a free-text description (multi-module)
|
|
77
|
+
/vc-app migrate Migrate existing app to latest @vc-shell/framework (CLI + AI)
|
|
76
78
|
|
|
77
79
|
Examples:
|
|
78
80
|
/vc-app create
|
|
@@ -159,7 +161,7 @@ Interactive platform connection dialog. This configures environment variables an
|
|
|
159
161
|
### Dialog
|
|
160
162
|
|
|
161
163
|
1. **Ask the user:** What is the platform URL? (e.g., `https://admin.example.com` or `https://localhost:5001`)
|
|
162
|
-
2. **Ask the user:** Which platform modules do you need API clients for? (comma-separated, e.g., `VirtoCommerce.Orders,VirtoCommerce.Catalog,VirtoCommerce.
|
|
164
|
+
2. **Ask the user:** Which platform modules do you need API clients for? (comma-separated, e.g., `VirtoCommerce.Orders,VirtoCommerce.Catalog,VirtoCommerce.MyModule`)
|
|
163
165
|
|
|
164
166
|
### Execution
|
|
165
167
|
|
|
@@ -194,16 +196,19 @@ cat package.json | grep -q "generate-api-client"
|
|
|
194
196
|
```
|
|
195
197
|
|
|
196
198
|
If yes, run:
|
|
199
|
+
|
|
197
200
|
```bash
|
|
198
201
|
yarn generate-api-client
|
|
199
202
|
```
|
|
200
203
|
|
|
201
204
|
If no, run:
|
|
205
|
+
|
|
202
206
|
```bash
|
|
203
207
|
npx @vc-shell/api-client-generator
|
|
204
208
|
```
|
|
205
209
|
|
|
206
210
|
If the command fails, show stderr and suggest:
|
|
211
|
+
|
|
207
212
|
- Check that the platform URL is reachable
|
|
208
213
|
- Check that the module names are correct
|
|
209
214
|
- Try running with `--verbose` for more details
|
|
@@ -217,6 +222,7 @@ npx vue-tsc --noEmit
|
|
|
217
222
|
```
|
|
218
223
|
|
|
219
224
|
If `vue-tsc` is not available, fall back to:
|
|
225
|
+
|
|
220
226
|
```bash
|
|
221
227
|
npx tsc --noEmit
|
|
222
228
|
```
|
|
@@ -306,6 +312,7 @@ Full intent-driven module generation. This is the main power feature — it walk
|
|
|
306
312
|
- Menu priority? (default: 100)
|
|
307
313
|
|
|
308
314
|
Store all collected values:
|
|
315
|
+
|
|
309
316
|
```
|
|
310
317
|
INTENT = {
|
|
311
318
|
description: string,
|
|
@@ -332,10 +339,12 @@ After collecting `INTENT.moduleName`, check if `src/modules/<moduleName>/` alrea
|
|
|
332
339
|
### Phase 2: Data Source (Interactive Dialog)
|
|
333
340
|
|
|
334
341
|
**Auto-detect no-API mode:** Before asking, check whether an API client directory exists:
|
|
342
|
+
|
|
335
343
|
- Check `src/api_client/` relative to project root
|
|
336
344
|
- Check the value of `APP_API_CLIENT_DIRECTORY` from `.env`
|
|
337
345
|
|
|
338
346
|
If neither exists and `APP_API_CLIENT_DIRECTORY` is not set, skip the "Should this module use an API client?" question — go directly to mock mode (Phase 3 with empty data source). Show a note to the user:
|
|
347
|
+
|
|
339
348
|
```
|
|
340
349
|
No API client found — generating with mock data.
|
|
341
350
|
```
|
|
@@ -355,6 +364,7 @@ If an API client directory does exist, proceed with the interactive dialog:
|
|
|
355
364
|
> Read the file `{SKILL_DIR}/agents/api-analyzer.md` for your full instructions.
|
|
356
365
|
>
|
|
357
366
|
> Execute with these parameters:
|
|
367
|
+
>
|
|
358
368
|
> ```json
|
|
359
369
|
> {
|
|
360
370
|
> "apiClientDir": "<resolved api_client directory absolute path>",
|
|
@@ -365,10 +375,11 @@ If an API client directory does exist, proceed with the interactive dialog:
|
|
|
365
375
|
> Return the structured JSON result.
|
|
366
376
|
|
|
367
377
|
3. **Present discovered entities to the user.** Show a numbered list:
|
|
378
|
+
|
|
368
379
|
```
|
|
369
380
|
Discovered API entities:
|
|
370
|
-
1.
|
|
371
|
-
2. TeamMember (
|
|
381
|
+
1. User (UserSecurityClient) — search, get, create, update, delete
|
|
382
|
+
2. TeamMember (UserSecurityClient) — search, get, update
|
|
372
383
|
...
|
|
373
384
|
Select an entity (number):
|
|
374
385
|
```
|
|
@@ -376,8 +387,9 @@ If an API client directory does exist, proceed with the interactive dialog:
|
|
|
376
387
|
4. **Ask the user:** Which entity to use? (number from list)
|
|
377
388
|
|
|
378
389
|
5. **Read the entity's type file** to discover available fields. Use Grep to find the entity class definition and extract its properties. Present them to the user:
|
|
390
|
+
|
|
379
391
|
```
|
|
380
|
-
Fields on
|
|
392
|
+
Fields on User:
|
|
381
393
|
1. id (string)
|
|
382
394
|
2. userName (string)
|
|
383
395
|
3. email (string)
|
|
@@ -398,15 +410,16 @@ If an API client directory does exist, proceed with the interactive dialog:
|
|
|
398
410
|
- Default: all available operations checked
|
|
399
411
|
```
|
|
400
412
|
Available CRUD methods:
|
|
401
|
-
[x] search (
|
|
402
|
-
[x] get (
|
|
403
|
-
[x] create (
|
|
404
|
-
[x] update (
|
|
405
|
-
[x] delete (
|
|
413
|
+
[x] search (searchUsers)
|
|
414
|
+
[x] get (getUser)
|
|
415
|
+
[x] create (createUser)
|
|
416
|
+
[x] update (updateUser)
|
|
417
|
+
[x] delete (deleteUsers)
|
|
406
418
|
Uncheck any you don't need (comma-separated numbers to toggle, or Enter to accept all):
|
|
407
419
|
```
|
|
408
420
|
|
|
409
421
|
Store all collected values:
|
|
422
|
+
|
|
410
423
|
```
|
|
411
424
|
DATA_SOURCE = {
|
|
412
425
|
clientClass: string,
|
|
@@ -426,11 +439,13 @@ DATA_SOURCE = {
|
|
|
426
439
|
### Phase 3: Generation (Dispatch Subagents)
|
|
427
440
|
|
|
428
441
|
Determine the target directory for the module:
|
|
442
|
+
|
|
429
443
|
```
|
|
430
444
|
TARGET_DIR = <project root>/src/modules/{INTENT.moduleName}
|
|
431
445
|
```
|
|
432
446
|
|
|
433
447
|
Create the directory if it doesn't exist:
|
|
448
|
+
|
|
434
449
|
```bash
|
|
435
450
|
mkdir -p {TARGET_DIR}/pages {TARGET_DIR}/composables {TARGET_DIR}/locales
|
|
436
451
|
```
|
|
@@ -446,6 +461,7 @@ Dispatch the `list-blade-generator` agent:
|
|
|
446
461
|
> Read the file `{SKILL_DIR}/agents/list-blade-generator.md` for your full instructions.
|
|
447
462
|
>
|
|
448
463
|
> Execute with these parameters:
|
|
464
|
+
>
|
|
449
465
|
> ```json
|
|
450
466
|
> {
|
|
451
467
|
> "moduleName": "{INTENT.moduleName}",
|
|
@@ -472,6 +488,7 @@ Dispatch the `details-blade-generator` agent:
|
|
|
472
488
|
> Read the file `{SKILL_DIR}/agents/details-blade-generator.md` for your full instructions.
|
|
473
489
|
>
|
|
474
490
|
> Execute with these parameters:
|
|
491
|
+
>
|
|
475
492
|
> ```json
|
|
476
493
|
> {
|
|
477
494
|
> "moduleName": "{INTENT.moduleName}",
|
|
@@ -505,6 +522,7 @@ After blade generators complete (wait for both if parallel), dispatch the `local
|
|
|
505
522
|
> Read the file `{SKILL_DIR}/agents/locales-generator.md` for your full instructions.
|
|
506
523
|
>
|
|
507
524
|
> Execute with these parameters:
|
|
525
|
+
>
|
|
508
526
|
> ```json
|
|
509
527
|
> {
|
|
510
528
|
> "moduleName": "{INTENT.moduleName}",
|
|
@@ -524,6 +542,7 @@ After locales are generated, dispatch the `module-assembler` agent:
|
|
|
524
542
|
> Read the file `{SKILL_DIR}/agents/module-assembler.md` for your full instructions.
|
|
525
543
|
>
|
|
526
544
|
> Execute with these parameters:
|
|
545
|
+
>
|
|
527
546
|
> ```json
|
|
528
547
|
> {
|
|
529
548
|
> "moduleName": "{INTENT.moduleName}",
|
|
@@ -575,6 +594,7 @@ Populate `mockFields.columns` from the column definitions used to dispatch the l
|
|
|
575
594
|
3. Add `.vc-app-prototype.json` to `GENERATED_FILES`.
|
|
576
595
|
|
|
577
596
|
4. Append to the Phase 4 summary output:
|
|
597
|
+
|
|
578
598
|
```
|
|
579
599
|
Module generated with mock data.
|
|
580
600
|
When your API is ready, run: /vc-app connect && /vc-app promote <moduleName>
|
|
@@ -589,6 +609,7 @@ After all generation is complete, dispatch the `type-checker` agent:
|
|
|
589
609
|
> Read the file `{SKILL_DIR}/agents/type-checker.md` for your full instructions.
|
|
590
610
|
>
|
|
591
611
|
> Execute with these parameters:
|
|
612
|
+
>
|
|
592
613
|
> ```json
|
|
593
614
|
> {
|
|
594
615
|
> "projectRoot": "<project root absolute path>",
|
|
@@ -640,6 +661,7 @@ Dispatch `module-analyzer` agent:
|
|
|
640
661
|
> Read the file `{SKILL_DIR}/agents/module-analyzer.md` for your full instructions.
|
|
641
662
|
>
|
|
642
663
|
> Execute with these parameters:
|
|
664
|
+
>
|
|
643
665
|
> ```json
|
|
644
666
|
> {
|
|
645
667
|
> "targetDir": "<absolute path to module directory>"
|
|
@@ -649,6 +671,7 @@ Dispatch `module-analyzer` agent:
|
|
|
649
671
|
Store the result as `MODULE_ANALYSIS`.
|
|
650
672
|
|
|
651
673
|
Present the module summary to the user:
|
|
674
|
+
|
|
652
675
|
```
|
|
653
676
|
Module "<moduleName>" analysis:
|
|
654
677
|
Blades: <list blade names and types>
|
|
@@ -662,6 +685,7 @@ Ask: **"What would you like to change? (describe in free text)"**
|
|
|
662
685
|
#### Phase E2: Intent Parsing
|
|
663
686
|
|
|
664
687
|
Parse the user's free-text description into an action plan. Map to action types:
|
|
688
|
+
|
|
665
689
|
- Mentions of "column", "add to list/table" → `add-column`
|
|
666
690
|
- Mentions of "field", "input", "form" → `add-field`
|
|
667
691
|
- Mentions of "logic", "validation", "computed", "watcher" → `add-logic`
|
|
@@ -670,6 +694,7 @@ Parse the user's free-text description into an action plan. Map to action types:
|
|
|
670
694
|
- Mentions of "new blade", "new list", "new details" → new blade creation (uses existing generators)
|
|
671
695
|
|
|
672
696
|
Present the parsed action plan to the user for confirmation:
|
|
697
|
+
|
|
673
698
|
```
|
|
674
699
|
Proposed changes:
|
|
675
700
|
1. [add-column] Add "email" column to team-list after "name"
|
|
@@ -690,6 +715,7 @@ Confirm? (y to proceed, or describe corrections)
|
|
|
690
715
|
For each action in the confirmed plan:
|
|
691
716
|
|
|
692
717
|
**New blades** → dispatch `list-blade-generator` or `details-blade-generator` with `existingModule` context:
|
|
718
|
+
|
|
693
719
|
- `existingModule.blades` = blade names from `MODULE_ANALYSIS.blades`
|
|
694
720
|
- `existingModule.localePrefix` = derive from existing locale keys
|
|
695
721
|
- `existingModule.indexPath` = path to module's `index.ts`
|
|
@@ -704,6 +730,7 @@ Then dispatch `module-assembler` with `mode: "append"`.
|
|
|
704
730
|
> Read the file `{SKILL_DIR}/agents/blade-enhancer.md` for your full instructions.
|
|
705
731
|
>
|
|
706
732
|
> Execute with these parameters:
|
|
733
|
+
>
|
|
707
734
|
> ```json
|
|
708
735
|
> {
|
|
709
736
|
> "targetDir": "<absolute path to module>",
|
|
@@ -716,6 +743,7 @@ Then dispatch `module-assembler` with `mode: "append"`.
|
|
|
716
743
|
> ```
|
|
717
744
|
|
|
718
745
|
Handle agent status:
|
|
746
|
+
|
|
719
747
|
- `DONE` → proceed to Phase E5
|
|
720
748
|
- `DONE_WITH_CONCERNS` → show concerns to user, proceed to Phase E5
|
|
721
749
|
- `BLOCKED` → show error, stop
|
|
@@ -725,6 +753,7 @@ Handle agent status:
|
|
|
725
753
|
Dispatch `type-checker` agent to verify TypeScript compiles.
|
|
726
754
|
|
|
727
755
|
Present summary of all changes:
|
|
756
|
+
|
|
728
757
|
```
|
|
729
758
|
Module "<moduleName>" enhanced:
|
|
730
759
|
|
|
@@ -749,10 +778,13 @@ Transition a prototype module from mock data to a real API client. This command
|
|
|
749
778
|
1. **Parse arguments.** Extract the module name from `$ARGUMENTS`. Format: `promote <moduleName>`. If no name provided, ask the user.
|
|
750
779
|
|
|
751
780
|
2. **Read prototype metadata.** Look for `.vc-app-prototype.json` in `src/modules/<moduleName>/`:
|
|
781
|
+
|
|
752
782
|
```bash
|
|
753
783
|
cat src/modules/<moduleName>/.vc-app-prototype.json
|
|
754
784
|
```
|
|
785
|
+
|
|
755
786
|
If the file does not exist, stop with an error:
|
|
787
|
+
|
|
756
788
|
```
|
|
757
789
|
Error: Module '<moduleName>' is not a prototype. Only modules generated without an API client can be promoted.
|
|
758
790
|
Run /vc-app generate with an API client to create a production module directly.
|
|
@@ -769,6 +801,7 @@ Transition a prototype module from mock data to a real API client. This command
|
|
|
769
801
|
```
|
|
770
802
|
|
|
771
803
|
Store:
|
|
804
|
+
|
|
772
805
|
```
|
|
773
806
|
MODULE_DIR = <project root>/src/modules/<moduleName>
|
|
774
807
|
PROTOTYPE = <parsed .vc-app-prototype.json>
|
|
@@ -780,6 +813,7 @@ API_CLIENT_DIR = <resolved api_client directory>
|
|
|
780
813
|
Follow the same interactive dialog flow as `/vc-app generate` Phase 2 — dispatch the `api-analyzer` agent, present entities to the user, let them select an entity, discover fields, select columns/form fields, and choose CRUD methods.
|
|
781
814
|
|
|
782
815
|
Key differences from generate:
|
|
816
|
+
|
|
783
817
|
- Only collect **columns** if `PROTOTYPE.intent.bladeTypes` includes `"list"`.
|
|
784
818
|
- Only collect **form fields** if `PROTOTYPE.intent.bladeTypes` includes `"details"`.
|
|
785
819
|
|
|
@@ -795,6 +829,7 @@ Map prototype mock fields to real API entity fields.
|
|
|
795
829
|
- **Unmatched**: no reasonable API counterpart found
|
|
796
830
|
|
|
797
831
|
2. **Present mapping table** to the user for confirmation:
|
|
832
|
+
|
|
798
833
|
```
|
|
799
834
|
Field Mapping (mock → API):
|
|
800
835
|
name → displayName (semantic match)
|
|
@@ -834,6 +869,7 @@ Dispatch the `promote-agent` to rewrite module files:
|
|
|
834
869
|
> Read the file `{SKILL_DIR}/agents/promote-agent.md` for your full instructions.
|
|
835
870
|
>
|
|
836
871
|
> Execute with these parameters:
|
|
872
|
+
>
|
|
837
873
|
> ```json
|
|
838
874
|
> {
|
|
839
875
|
> "targetDir": "<absolute path to module directory>",
|
|
@@ -846,6 +882,7 @@ Dispatch the `promote-agent` to rewrite module files:
|
|
|
846
882
|
> ```
|
|
847
883
|
|
|
848
884
|
Handle agent status:
|
|
885
|
+
|
|
849
886
|
- **DONE** — Proceed to Phase 5.
|
|
850
887
|
- **DONE_WITH_CONCERNS** — Show concerns to the user, then proceed to Phase 5.
|
|
851
888
|
- **BLOCKED** — Show the error to the user. Do NOT proceed. Suggest fixing the issue and re-running `/vc-app promote <moduleName>`.
|
|
@@ -859,6 +896,7 @@ Handle agent status:
|
|
|
859
896
|
> Read the file `{SKILL_DIR}/agents/type-checker.md` for your full instructions.
|
|
860
897
|
>
|
|
861
898
|
> Execute with these parameters:
|
|
899
|
+
>
|
|
862
900
|
> ```json
|
|
863
901
|
> {
|
|
864
902
|
> "projectRoot": "<project root absolute path>",
|
|
@@ -928,10 +966,12 @@ After acquiring the prompt, ask the user for the platform address:
|
|
|
928
966
|
- **If the user skips** (says "skip", "no", "none", empty, "later", etc.) → set `PLATFORM_URL = null`
|
|
929
967
|
|
|
930
968
|
This URL is needed for:
|
|
969
|
+
|
|
931
970
|
- Writing `.env.local` with `APP_PLATFORM_URL` so the app can authenticate against the platform
|
|
932
971
|
- Enabling API client generation (via `/vc-app connect` flow) during or after design
|
|
933
972
|
|
|
934
973
|
If the prompt is very short (under 20 words) or too abstract (no concrete entities/data mentioned), ask for clarification:
|
|
974
|
+
|
|
935
975
|
```
|
|
936
976
|
Your description is quite abstract. To generate modules, I need to know what entities/data the app manages.
|
|
937
977
|
|
|
@@ -946,43 +986,47 @@ Could you describe:
|
|
|
946
986
|
Parse `DESIGN_PROMPT` into a structured application plan. Apply these parsing rules:
|
|
947
987
|
|
|
948
988
|
**Entity extraction:**
|
|
989
|
+
|
|
949
990
|
- Nouns that represent manageable data objects → modules (e.g., "tenants", "subscriptions", "agents")
|
|
950
991
|
- Module names: always kebab-case english, derived from entity names, regardless of prompt language
|
|
951
992
|
|
|
952
993
|
**Field extraction:**
|
|
994
|
+
|
|
953
995
|
- Concrete field mentions ("subscription token key", "trial period", "email") → columns or formFields with inferred types
|
|
954
996
|
- Type inference — use the most specific type possible:
|
|
955
997
|
|
|
956
|
-
| Signal in prompt
|
|
957
|
-
|
|
958
|
-
| date, deadline, birthday, created, expires
|
|
959
|
-
| is*, has*, can
|
|
960
|
-
| price, cost, amount, total, salary, budget, fee | `currency`
|
|
961
|
-
| count, quantity, age, priority (numeric)
|
|
962
|
-
| description, notes, comment, bio, summary
|
|
963
|
-
| body, content, html, article, template
|
|
964
|
-
| status, state, type, category (from fixed set)
|
|
965
|
-
| tags, labels, categories, roles, permissions
|
|
966
|
-
| avatar, logo, photo, thumbnail, banner
|
|
967
|
-
| photos, images, screenshots, gallery
|
|
968
|
-
| file, attachment, document, contract
|
|
969
|
-
| rating, score, stars
|
|
970
|
-
| color, colour, brandColor
|
|
971
|
-
| discount, opacity, percentage, progress
|
|
972
|
-
| email
|
|
973
|
-
| phone, tel
|
|
974
|
-
| url, website, link
|
|
975
|
-
| everything else
|
|
998
|
+
| Signal in prompt | Field type | Component (details) | Column type (list) |
|
|
999
|
+
| ----------------------------------------------- | -------------- | ---------------------------- | ------------------ |
|
|
1000
|
+
| date, deadline, birthday, created, expires | `date-time` | `VcDatePicker` | `date-ago` |
|
|
1001
|
+
| is*, has*, can\*, enabled, active, published | `boolean` | `VcSwitch` | `status-icon` |
|
|
1002
|
+
| price, cost, amount, total, salary, budget, fee | `currency` | `VcInputCurrency` | `money` |
|
|
1003
|
+
| count, quantity, age, priority (numeric) | `number` | `VcInput type="number"` | `number` |
|
|
1004
|
+
| description, notes, comment, bio, summary | `text` | `VcTextarea` | — (not in list) |
|
|
1005
|
+
| body, content, html, article, template | `rich-text` | `VcEditor` | — (not in list) |
|
|
1006
|
+
| status, state, type, category (from fixed set) | `enum` | `VcSelect` or `VcRadioGroup` | `status` |
|
|
1007
|
+
| tags, labels, categories, roles, permissions | `multi-select` | `VcMultivalue` | — (not in list) |
|
|
1008
|
+
| avatar, logo, photo, thumbnail, banner | `image` | `VcImageUpload` | `image` |
|
|
1009
|
+
| photos, images, screenshots, gallery | `gallery` | `VcGallery` | — (not in list) |
|
|
1010
|
+
| file, attachment, document, contract | `file` | `VcFileUpload` | — (not in list) |
|
|
1011
|
+
| rating, score, stars | `rating` | `VcRating` | — (custom slot) |
|
|
1012
|
+
| color, colour, brandColor | `color` | `VcColorInput` | — (custom slot) |
|
|
1013
|
+
| discount, opacity, percentage, progress | `range` | `VcSlider` | — (custom slot) |
|
|
1014
|
+
| email | `string` | `VcInput` (rules="email") | plain text |
|
|
1015
|
+
| phone, tel | `string` | `VcInput` (type="tel") | plain text |
|
|
1016
|
+
| url, website, link | `string` | `VcInput` (type="url") | plain text |
|
|
1017
|
+
| everything else | `string` | `VcInput` | plain text |
|
|
976
1018
|
|
|
977
1019
|
- If a field clearly belongs to a list view (searchable, sortable characteristic) → column
|
|
978
1020
|
- If a field clearly belongs to a form (editable, configurable) → formField
|
|
979
1021
|
- If unclear → put in both columns and formFields
|
|
980
1022
|
|
|
981
1023
|
**Action extraction:**
|
|
1024
|
+
|
|
982
1025
|
- Concrete actions ("start trial", "upgrade plan", "approve") → toolbarActions with action name derived from the verb
|
|
983
1026
|
- Navigation mentions ("from tenant to subscription", "drill into details") → connections
|
|
984
1027
|
|
|
985
1028
|
**Abstract requirement extraction:**
|
|
1029
|
+
|
|
986
1030
|
- Anything that cannot be mapped to a concrete field/action/connection → todos
|
|
987
1031
|
- Quote the original text from the prompt
|
|
988
1032
|
- Examples: "plan limits will be identified later", "integration with external billing TBD"
|
|
@@ -1016,11 +1060,13 @@ DESIGN_PLAN = {
|
|
|
1016
1060
|
```
|
|
1017
1061
|
|
|
1018
1062
|
**Scaffold detection:** Check if the current directory is a vc-shell project:
|
|
1063
|
+
|
|
1019
1064
|
- Look for `package.json` with `@vc-shell/framework` in dependencies or devDependencies
|
|
1020
1065
|
- If not found → set `needsScaffold: true`
|
|
1021
1066
|
- If found → set `needsScaffold: false`
|
|
1022
1067
|
|
|
1023
1068
|
**Blade type inference:**
|
|
1069
|
+
|
|
1024
1070
|
- Entity with both list-worthy columns AND editable fields → `"list+details"`
|
|
1025
1071
|
- Entity that is mainly a collection/catalog with no edit form → `"list-only"`
|
|
1026
1072
|
- Entity that is a singleton/settings with no list → `"details-only"`
|
|
@@ -1028,10 +1074,12 @@ DESIGN_PLAN = {
|
|
|
1028
1074
|
- Default to `"list+details"` when unclear
|
|
1029
1075
|
|
|
1030
1076
|
**Details blade mode inference:**
|
|
1077
|
+
|
|
1031
1078
|
- If the entity is view-only (order, transaction, audit log, payment) → set `readOnly: true` on the module — the details generator will use `VcField` for display instead of `VcInput`
|
|
1032
1079
|
- If the entity has mixed editable + read-only fields → default `readOnly: false`, individual fields marked as `readOnly` in `formFields`
|
|
1033
1080
|
|
|
1034
1081
|
**Feature inference (enrich modules based on prompt signals):**
|
|
1082
|
+
|
|
1035
1083
|
- If entity mentions "related" sub-entities (e.g., "product has offers and videos") → add `widgets: ["sub-entity-name"]` — generates blade sidebar widgets with `useBladeWidgets()`
|
|
1036
1084
|
- If entity is a "primary" concept that would benefit from a dashboard summary → add `dashboard: true` — generates a `DashboardWidgetCard` with stats
|
|
1037
1085
|
- If entity mentions "notifications" or "events" or "alerts" → add `notifications: ["EventName"]` — generates notification template components
|
|
@@ -1069,6 +1117,7 @@ Confirm? (y to proceed, or describe corrections)
|
|
|
1069
1117
|
**Confirmation loop:**
|
|
1070
1118
|
|
|
1071
1119
|
Wait for the user's response:
|
|
1120
|
+
|
|
1072
1121
|
- **"y" / "yes" / confirmation** → proceed to Phase 4
|
|
1073
1122
|
- **Free-text corrections** → re-parse the corrections, update `DESIGN_PLAN`, show the updated plan again. Examples of corrections the user might give:
|
|
1074
1123
|
- "remove the agent-catalog module"
|
|
@@ -1078,6 +1127,7 @@ Wait for the user's response:
|
|
|
1078
1127
|
- **No iteration limit** — keep looping until the user confirms or cancels
|
|
1079
1128
|
|
|
1080
1129
|
**Large plan warning:** If the plan has 10 or more modules, show a suggestion before the confirmation prompt:
|
|
1130
|
+
|
|
1081
1131
|
```
|
|
1082
1132
|
This is a large application ({count} modules). Consider generating in batches:
|
|
1083
1133
|
- Generate first {N} modules now, the rest later?
|
|
@@ -1098,6 +1148,7 @@ After the user confirms the plan:
|
|
|
1098
1148
|
> Read the file `{SKILL_DIR}/agents/api-analyzer.md` for your full instructions.
|
|
1099
1149
|
>
|
|
1100
1150
|
> Execute with these parameters:
|
|
1151
|
+
>
|
|
1101
1152
|
> ```json
|
|
1102
1153
|
> {
|
|
1103
1154
|
> "apiClientDir": "<resolved api_client directory absolute path>",
|
|
@@ -1113,6 +1164,7 @@ After the user confirms the plan:
|
|
|
1113
1164
|
- No match → module stays in mock mode
|
|
1114
1165
|
|
|
1115
1166
|
Update the plan display with data source info:
|
|
1167
|
+
|
|
1116
1168
|
```
|
|
1117
1169
|
1. tenants (list+details) — Data: API (TenantEntity matched)
|
|
1118
1170
|
2. subscriptions (details-only) — Data: API (SubscriptionEntity matched)
|
|
@@ -1122,11 +1174,13 @@ After the user confirms the plan:
|
|
|
1122
1174
|
Show the updated plan to the user for final confirmation before execution.
|
|
1123
1175
|
|
|
1124
1176
|
3. **If no API client AND `DESIGN_PLAN.platformUrl` is set** → the user provided a platform URL but hasn't generated API clients yet. Ask:
|
|
1177
|
+
|
|
1125
1178
|
```
|
|
1126
1179
|
Platform URL is set ({DESIGN_PLAN.platformUrl}) but no API client found.
|
|
1127
1180
|
Would you like to connect to the platform and generate API clients now? (y/n)
|
|
1128
1181
|
- If yes: which platform modules? (comma-separated, e.g., VirtoCommerce.Orders,VirtoCommerce.Catalog)
|
|
1129
1182
|
```
|
|
1183
|
+
|
|
1130
1184
|
If the user says yes and provides module names → run the `/vc-app connect` execution steps (Steps 1-4 from the connect section) using `DESIGN_PLAN.platformUrl` and the provided module list. After connect completes, re-run API Detection (step 1-2 above) to match entities.
|
|
1131
1185
|
|
|
1132
1186
|
If the user declines → proceed with mock mode for all modules.
|
|
@@ -1142,6 +1196,7 @@ After the user confirms the plan:
|
|
|
1142
1196
|
#### Step 1: Scaffold (if `needsScaffold: true`)
|
|
1143
1197
|
|
|
1144
1198
|
If `DESIGN_PLAN.needsScaffold` is true, run the `/vc-app create` flow:
|
|
1199
|
+
|
|
1145
1200
|
- Use `DESIGN_PLAN.appName` as the project name
|
|
1146
1201
|
- Enable default options (no dashboard, no tenant-routes, no ai-agent, no mocks)
|
|
1147
1202
|
- After scaffold completes, `cd` into the new project directory
|
|
@@ -1154,9 +1209,11 @@ If scaffold is not needed, skip to the `.env.local` step below.
|
|
|
1154
1209
|
If `DESIGN_PLAN.platformUrl` is not null:
|
|
1155
1210
|
|
|
1156
1211
|
1. Write or update `.env.local` in the project root:
|
|
1212
|
+
|
|
1157
1213
|
```env
|
|
1158
1214
|
APP_PLATFORM_URL=<DESIGN_PLAN.platformUrl>
|
|
1159
1215
|
```
|
|
1216
|
+
|
|
1160
1217
|
If `.env.local` already exists, read it first and only update/add the `APP_PLATFORM_URL` line. Do NOT remove other variables.
|
|
1161
1218
|
|
|
1162
1219
|
2. This enables the app to authenticate against the platform on first launch (`yarn serve`).
|
|
@@ -1170,6 +1227,7 @@ Process each module in `DESIGN_PLAN.modules` in order:
|
|
|
1170
1227
|
For module at index `i`:
|
|
1171
1228
|
|
|
1172
1229
|
**2a: Build INTENT**
|
|
1230
|
+
|
|
1173
1231
|
```json
|
|
1174
1232
|
INTENT = {
|
|
1175
1233
|
"description": "{module.description}",
|
|
@@ -1183,6 +1241,7 @@ INTENT = {
|
|
|
1183
1241
|
"isWorkspace": true
|
|
1184
1242
|
}
|
|
1185
1243
|
```
|
|
1244
|
+
|
|
1186
1245
|
Where `I18N_PREFIX` = SCREAMING_SNAKE_CASE of `module.name`.
|
|
1187
1246
|
|
|
1188
1247
|
**2b: Build DATA_SOURCE**
|
|
@@ -1196,9 +1255,11 @@ Where `I18N_PREFIX` = SCREAMING_SNAKE_CASE of `module.name`.
|
|
|
1196
1255
|
Follow the same Phase 3 generation flow as `/vc-app generate`:
|
|
1197
1256
|
|
|
1198
1257
|
1. Create target directory:
|
|
1258
|
+
|
|
1199
1259
|
```bash
|
|
1200
1260
|
mkdir -p {TARGET_DIR}/pages {TARGET_DIR}/composables {TARGET_DIR}/locales
|
|
1201
1261
|
```
|
|
1262
|
+
|
|
1202
1263
|
Where `TARGET_DIR = <project root>/src/modules/{module.name}`
|
|
1203
1264
|
|
|
1204
1265
|
2. Initialize `GENERATED_FILES = []`
|
|
@@ -1217,6 +1278,7 @@ Follow the same Phase 3 generation flow as `/vc-app generate`:
|
|
|
1217
1278
|
**2d: Pass context for connections**
|
|
1218
1279
|
|
|
1219
1280
|
For modules after the first, if `DESIGN_PLAN.connections` references a connection FROM an already-generated blade TO the current module's blade, pass `existingModule` context to the blade generator:
|
|
1281
|
+
|
|
1220
1282
|
```json
|
|
1221
1283
|
"existingModule": {
|
|
1222
1284
|
"blades": ["<list of already-generated blade names>"],
|
|
@@ -1239,6 +1301,7 @@ After all modules are generated, for each connection in `DESIGN_PLAN.connections
|
|
|
1239
1301
|
> Read the file `{SKILL_DIR}/agents/blade-enhancer.md` for your full instructions.
|
|
1240
1302
|
>
|
|
1241
1303
|
> Execute with these parameters:
|
|
1304
|
+
>
|
|
1242
1305
|
> ```json
|
|
1243
1306
|
> {
|
|
1244
1307
|
> "targetDir": "<absolute path to source module directory>",
|
|
@@ -1276,6 +1339,7 @@ After all modules are generated and TODOs injected, dispatch the `type-checker`
|
|
|
1276
1339
|
> Read the file `{SKILL_DIR}/agents/type-checker.md` for your full instructions.
|
|
1277
1340
|
>
|
|
1278
1341
|
> Execute with these parameters:
|
|
1342
|
+
>
|
|
1279
1343
|
> ```json
|
|
1280
1344
|
> {
|
|
1281
1345
|
> "projectRoot": "<project root absolute path>",
|
|
@@ -1310,6 +1374,7 @@ TypeScript: {✓ no errors / ✗ N errors (see above)}
|
|
|
1310
1374
|
```
|
|
1311
1375
|
|
|
1312
1376
|
If all modules used mock data, append:
|
|
1377
|
+
|
|
1313
1378
|
```
|
|
1314
1379
|
Next steps:
|
|
1315
1380
|
/vc-app connect — connect to platform API
|
|
@@ -1317,6 +1382,7 @@ Next steps:
|
|
|
1317
1382
|
```
|
|
1318
1383
|
|
|
1319
1384
|
If some modules matched API and some didn't, append:
|
|
1385
|
+
|
|
1320
1386
|
```
|
|
1321
1387
|
Next steps:
|
|
1322
1388
|
/vc-app promote <name> — transition mock modules to real API when ready
|
|
@@ -1329,53 +1395,71 @@ Next steps:
|
|
|
1329
1395
|
Apply these rules throughout all sections:
|
|
1330
1396
|
|
|
1331
1397
|
### CLI command fails
|
|
1398
|
+
|
|
1332
1399
|
If any `npx` or `yarn` command exits with non-zero status:
|
|
1400
|
+
|
|
1333
1401
|
- Show the stderr/stdout output to the user
|
|
1334
1402
|
- Suggest a manual fix or alternative command
|
|
1335
1403
|
- Do NOT proceed to subsequent steps that depend on the failed step
|
|
1336
1404
|
|
|
1337
1405
|
### `vue-tsc` / `tsc` fails during connect
|
|
1406
|
+
|
|
1338
1407
|
If type checking fails after API client generation:
|
|
1408
|
+
|
|
1339
1409
|
- Dispatch the `type-checker` agent with the generated files in `src/api_client/`
|
|
1340
1410
|
- Show the type-checker's report to the user
|
|
1341
1411
|
|
|
1342
1412
|
### User cancels mid-dialog
|
|
1413
|
+
|
|
1343
1414
|
If the user indicates they want to cancel (says "cancel", "stop", "nevermind", etc.) at any dialog step:
|
|
1415
|
+
|
|
1344
1416
|
- Stop immediately
|
|
1345
1417
|
- Do NOT write any partial files
|
|
1346
1418
|
- Confirm cancellation: "Generation cancelled. No files were created."
|
|
1347
1419
|
|
|
1348
1420
|
### Agent returns error
|
|
1421
|
+
|
|
1349
1422
|
If any subagent reports an error or fails to complete:
|
|
1423
|
+
|
|
1350
1424
|
- Show the error details to the user
|
|
1351
1425
|
- Suggest retrying: "You can retry with `/vc-app generate` — your previous answers will need to be re-entered."
|
|
1352
1426
|
- Do NOT proceed to subsequent phases that depend on the failed agent
|
|
1353
1427
|
|
|
1354
1428
|
### Missing API client directory
|
|
1429
|
+
|
|
1355
1430
|
If `src/api_client/` does not exist and the user wants API-backed generation:
|
|
1431
|
+
|
|
1356
1432
|
- Suggest running `/vc-app connect` first
|
|
1357
1433
|
- Do NOT proceed with generation
|
|
1358
1434
|
|
|
1359
1435
|
### Prompt too abstract (design)
|
|
1436
|
+
|
|
1360
1437
|
If the prompt contains no identifiable entities, data objects, or concrete fields (e.g., "make me an app", "something cool"):
|
|
1438
|
+
|
|
1361
1439
|
- Ask the user to clarify: "Describe what entities/data the app manages, what actions users perform, and how objects relate."
|
|
1362
1440
|
- Do NOT attempt to parse an empty/abstract prompt into modules.
|
|
1363
1441
|
|
|
1364
1442
|
### Large design plan (10+ modules)
|
|
1443
|
+
|
|
1365
1444
|
If prompt analysis produces 10 or more modules:
|
|
1445
|
+
|
|
1366
1446
|
- Show the full plan for review
|
|
1367
1447
|
- Suggest batching: "Generate first N now, rest later?"
|
|
1368
1448
|
- If user agrees to split, truncate modules list and note the remainder
|
|
1369
1449
|
|
|
1370
1450
|
### One module fails in design loop
|
|
1451
|
+
|
|
1371
1452
|
If a single module's generation fails during the design execution loop:
|
|
1453
|
+
|
|
1372
1454
|
- Show the error for that module
|
|
1373
1455
|
- Continue generating remaining modules
|
|
1374
1456
|
- In the final summary, list the failed module under "Skipped (errors):" with the error message
|
|
1375
1457
|
- Suggest: "Re-run /vc-app generate for the skipped module after fixing the issue."
|
|
1376
1458
|
|
|
1377
1459
|
### Prompt in non-English (design)
|
|
1460
|
+
|
|
1378
1461
|
The prompt may be in any language. This is fine — parse entities and intent from any language, but:
|
|
1462
|
+
|
|
1379
1463
|
- Module names → always kebab-case english
|
|
1380
1464
|
- Field names → always camelCase english
|
|
1381
1465
|
- If you cannot confidently translate an entity name, ask the user to confirm the english name
|
|
@@ -1386,17 +1470,17 @@ The prompt may be in any language. This is fine — parse entities and intent fr
|
|
|
1386
1470
|
|
|
1387
1471
|
All agents live at `{SKILL_DIR}/agents/`. Each agent file contains its own Input Contract, Knowledge Loading, Generation Rules, Output Contract, and Self-Check.
|
|
1388
1472
|
|
|
1389
|
-
| Agent
|
|
1390
|
-
|
|
1391
|
-
| api-analyzer
|
|
1392
|
-
| list-blade-generator
|
|
1393
|
-
| details-blade-generator | `agents/details-blade-generator.md` | Generates details blade + singular composable
|
|
1394
|
-
| locales-generator
|
|
1395
|
-
| module-assembler
|
|
1396
|
-
| type-checker
|
|
1397
|
-
| promote-agent
|
|
1398
|
-
| module-analyzer
|
|
1399
|
-
| blade-enhancer
|
|
1473
|
+
| Agent | File | Purpose | Writes files? |
|
|
1474
|
+
| ----------------------- | ----------------------------------- | ----------------------------------------------------------------- | ----------------- |
|
|
1475
|
+
| api-analyzer | `agents/api-analyzer.md` | Discovers entities/methods in API client files | No (returns JSON) |
|
|
1476
|
+
| list-blade-generator | `agents/list-blade-generator.md` | Generates list blade + plural composable | Yes |
|
|
1477
|
+
| details-blade-generator | `agents/details-blade-generator.md` | Generates details blade + singular composable | Yes |
|
|
1478
|
+
| locales-generator | `agents/locales-generator.md` | Scans generated files for i18n keys, writes en.json | Yes |
|
|
1479
|
+
| module-assembler | `agents/module-assembler.md` | Creates barrel files, registers module | Yes |
|
|
1480
|
+
| type-checker | `agents/type-checker.md` | Runs vue-tsc, fixes type errors iteratively | Yes (fixes only) |
|
|
1481
|
+
| promote-agent | `agents/promote-agent.md` | Transforms mock composables/blades/locales to use real API | Yes (edits only) |
|
|
1482
|
+
| module-analyzer | `agents/module-analyzer.md` | Analyzes existing module structure (blades, composables, locales) | No (returns JSON) |
|
|
1483
|
+
| blade-enhancer | `agents/blade-enhancer.md` | Surgical edits to existing blades/composables/locales | Yes (edits only) |
|
|
1400
1484
|
|
|
1401
1485
|
### How to dispatch an agent
|
|
1402
1486
|
|
|
@@ -1415,3 +1499,224 @@ Additional context:
|
|
|
1415
1499
|
```
|
|
1416
1500
|
|
|
1417
1501
|
The agent will read its own instruction file, load any required knowledge/pattern files, execute its generation rules, perform its self-check, and report back.
|
|
1502
|
+
|
|
1503
|
+
---
|
|
1504
|
+
|
|
1505
|
+
## /vc-app migrate
|
|
1506
|
+
|
|
1507
|
+
Fully automatic migration to the latest @vc-shell/framework version. Runs the CLI migrator for mechanical transforms, installs updated dependencies, then uses AI to complete manual migrations.
|
|
1508
|
+
|
|
1509
|
+
### Step 1: Pre-flight checks
|
|
1510
|
+
|
|
1511
|
+
1. Verify `@vc-shell/framework` exists in package.json (dependencies or devDependencies). If not found, stop: "This doesn't appear to be a vc-shell project."
|
|
1512
|
+
2. Run `git status --porcelain` — if output is non-empty, warn: "You have uncommitted changes. Commit or stash before migrating." Ask user to confirm before proceeding.
|
|
1513
|
+
3. Read current framework version from package.json for display.
|
|
1514
|
+
|
|
1515
|
+
### Step 2: Run CLI migrator
|
|
1516
|
+
|
|
1517
|
+
Resolve the migrate CLI binary. Run this shell snippet and use the result:
|
|
1518
|
+
|
|
1519
|
+
```bash
|
|
1520
|
+
if [ -n "$VC_SHELL_MIGRATE_CLI" ] && [ -f "$VC_SHELL_MIGRATE_CLI" ]; then
|
|
1521
|
+
echo "node $VC_SHELL_MIGRATE_CLI"
|
|
1522
|
+
elif [ -f "./node_modules/@vc-shell/migrate/dist/cli.js" ]; then
|
|
1523
|
+
echo "node ./node_modules/@vc-shell/migrate/dist/cli.js"
|
|
1524
|
+
else
|
|
1525
|
+
echo "npx @vc-shell/migrate"
|
|
1526
|
+
fi
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
Priority:
|
|
1530
|
+
|
|
1531
|
+
1. **Env override:** `VC_SHELL_MIGRATE_CLI` env var
|
|
1532
|
+
2. **Project node_modules:** `./node_modules/@vc-shell/migrate/dist/cli.js`
|
|
1533
|
+
3. **npx fallback:** `npx @vc-shell/migrate`
|
|
1534
|
+
|
|
1535
|
+
Run:
|
|
1536
|
+
|
|
1537
|
+
```bash
|
|
1538
|
+
{resolved_migrate_command} --update-deps
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
`--update-deps` bumps all `@vc-shell/*` dependencies to the target framework version **and** aligns peer-dep versions (ESLint, Vite, TypeScript, VueUse, `vue-router`, etc.) with the curated set at `configs/peer-versions.json` in the framework repo. Intersection-only — nothing is added or removed from the user's `package.json`.
|
|
1542
|
+
|
|
1543
|
+
Display the output to the user. If the command fails, stop and show the error.
|
|
1544
|
+
|
|
1545
|
+
### Step 2.5: Regenerate API clients with Interface style
|
|
1546
|
+
|
|
1547
|
+
1. **Detect config location:**
|
|
1548
|
+
- Read `package.json`. If the `generate-api-client` script contains `--APP_PLATFORM_MODULES`, configuration is inline in package.json.
|
|
1549
|
+
- Otherwise, read `.env`. If it contains `APP_PLATFORM_MODULES`, configuration is in the .env file.
|
|
1550
|
+
|
|
1551
|
+
2. **Add `APP_TYPE_STYLE=Interface`:**
|
|
1552
|
+
- If inline in package.json: append `--APP_TYPE_STYLE=Interface` to the `generate-api-client` script arguments.
|
|
1553
|
+
- If in `.env`: add or update the line `APP_TYPE_STYLE=Interface`.
|
|
1554
|
+
|
|
1555
|
+
3. **Hard gate — verify platform accessibility:**
|
|
1556
|
+
- Check for `APP_PLATFORM_URL` in `.env.local` or `.env`.
|
|
1557
|
+
- If not found, **STOP** with this error:
|
|
1558
|
+
|
|
1559
|
+
```
|
|
1560
|
+
Error: Platform URL not configured.
|
|
1561
|
+
|
|
1562
|
+
API clients must be regenerated with Interface style before migration can continue.
|
|
1563
|
+
|
|
1564
|
+
1. Create .env.local with: APP_PLATFORM_URL=https://your-platform-url
|
|
1565
|
+
2. Ensure the platform is running and accessible
|
|
1566
|
+
3. Re-run /vc-app migrate
|
|
1567
|
+
```
|
|
1568
|
+
|
|
1569
|
+
- If found, run:
|
|
1570
|
+
```bash
|
|
1571
|
+
yarn generate-api-client
|
|
1572
|
+
```
|
|
1573
|
+
- If the generator fails (platform unreachable), **STOP** with the same error.
|
|
1574
|
+
|
|
1575
|
+
4. **Verify generated types compile:**
|
|
1576
|
+
|
|
1577
|
+
```bash
|
|
1578
|
+
npx vue-tsc --noEmit 2>&1 | head -20
|
|
1579
|
+
```
|
|
1580
|
+
|
|
1581
|
+
If there are errors in `src/api_client/` files, the generator produced invalid output — **STOP** and ask the user to check the platform API and re-run.
|
|
1582
|
+
|
|
1583
|
+
5. On success, continue to Step 3.
|
|
1584
|
+
|
|
1585
|
+
### Step 3: Install dependencies
|
|
1586
|
+
|
|
1587
|
+
Run:
|
|
1588
|
+
|
|
1589
|
+
```bash
|
|
1590
|
+
yarn install
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
If yarn fails (version conflicts, missing packages), stop and show the error. Dependencies must resolve before AI migration can type-check.
|
|
1594
|
+
|
|
1595
|
+
### Step 4: Parse migration report
|
|
1596
|
+
|
|
1597
|
+
Read `MIGRATION_REPORT.md` from project root.
|
|
1598
|
+
|
|
1599
|
+
Parse the "Manual Migration Required" section. Extract each topic heading and the affected files listed under it.
|
|
1600
|
+
|
|
1601
|
+
Map topic headings to migration prompt files and pattern files:
|
|
1602
|
+
|
|
1603
|
+
| Report Heading contains (or equals transform name) | Canonical topic name | Migration Prompt | Pattern |
|
|
1604
|
+
| -------------------------------------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
1605
|
+
| Widget / widgets-migration | `widgets-migration` | `{KNOWLEDGE_BASE}/migration-prompts/widgets-migration.md` | `{KNOWLEDGE_BASE}/patterns/blade-widget.md` |
|
|
1606
|
+
| Form Management / useBladeForm / use-blade-form | `use-blade-form` | `{KNOWLEDGE_BASE}/migration-prompts/blade-form-migration.md` | `{KNOWLEDGE_BASE}/patterns/form-validation.md` |
|
|
1607
|
+
| Injection Key / remove-deprecated-aliases | `remove-deprecated-aliases` | `{KNOWLEDGE_BASE}/migration-prompts/blade-props-migration.md` | `{KNOWLEDGE_BASE}/patterns/blade-navigation.md` |
|
|
1608
|
+
| NSwag / DTO / Clone-then-mutate / nswag-class-to-interface | `nswag-class-to-interface` | `{KNOWLEDGE_BASE}/migration-prompts/nswag-migration.md` | — |
|
|
1609
|
+
| Reusable Blade Components / blade-props-simplification | `blade-props-simplification` | `{KNOWLEDGE_BASE}/migration-prompts/blade-props-migration.md` | `{KNOWLEDGE_BASE}/patterns/child-blade-flow.md` |
|
|
1610
|
+
| Notification / notification-migration | `notification-migration` | `{KNOWLEDGE_BASE}/migration-prompts/notifications-migration.md` | `{KNOWLEDGE_BASE}/patterns/signalr-notifications.md` |
|
|
1611
|
+
| VcTable / DataTable / vctable-audit | `vctable-audit` | `{KNOWLEDGE_BASE}/migration-prompts/datatable-migration.md` | `{KNOWLEDGE_BASE}/patterns/datatable-pattern.md` |
|
|
1612
|
+
| Icon / material- / bi- / fa- / icon-audit | `icon-audit` | `{KNOWLEDGE_BASE}/migration-prompts/icon-migration.md` | — |
|
|
1613
|
+
| Assets API / useAssets / useAssetsManager / use-assets-migration | `use-assets-migration` | `{KNOWLEDGE_BASE}/migration-prompts/use-assets-migration.md` | `{KNOWLEDGE_BASE}/patterns/assets-management.md` |
|
|
1614
|
+
| Manual Migration Audit / useExternalWidgets / moment / useFunctions / manual-migration-audit | `manual-migration-audit` | `{KNOWLEDGE_BASE}/migration-prompts/manual-migration-audit.md` | — |
|
|
1615
|
+
| Pagination / useDataTablePagination / use-data-table-pagination-audit | `use-data-table-pagination-audit` | `{KNOWLEDGE_BASE}/migration-prompts/use-data-table-pagination-migration.md` | — |
|
|
1616
|
+
|
|
1617
|
+
Build the `topics` array for the migration-agent using the canonical topic names above.
|
|
1618
|
+
|
|
1619
|
+
Hard gate:
|
|
1620
|
+
|
|
1621
|
+
1. If a heading from "Manual Migration Required" does not match any row, add it to `unmappedTopics`.
|
|
1622
|
+
2. If a mapped row references a missing migration prompt file, add it to `missingPrompts`.
|
|
1623
|
+
3. If `unmappedTopics` or `missingPrompts` is non-empty, **STOP** and print both lists. Do not silently skip actionable topics.
|
|
1624
|
+
|
|
1625
|
+
### Step 5: Dispatch migration-agent (with partial recovery)
|
|
1626
|
+
|
|
1627
|
+
**Before dispatching, check for partial completion** from a previous run:
|
|
1628
|
+
|
|
1629
|
+
1. Parse `MIGRATION_REPORT.md` and collect topics already marked as completed (`### ✅ ...` headings).
|
|
1630
|
+
2. If `.vc-app-migrate-state.json` exists, load completed topics from it.
|
|
1631
|
+
3. Union both sources into `alreadyCompletedTopics`.
|
|
1632
|
+
4. Run `npx vue-tsc --noEmit`. If it fails, do **not** infer completion from file diffs.
|
|
1633
|
+
5. Use `git diff --name-only` only as a weak signal for "in-progress" topics, not as completion proof.
|
|
1634
|
+
6. Dispatch only topics not in `alreadyCompletedTopics`.
|
|
1635
|
+
|
|
1636
|
+
If there are topics to process, dispatch the migration-agent subagent:
|
|
1637
|
+
|
|
1638
|
+
**Agent:** `{SKILL_DIR}/agents/migration-agent.md`
|
|
1639
|
+
|
|
1640
|
+
**Input:**
|
|
1641
|
+
|
|
1642
|
+
```json
|
|
1643
|
+
{
|
|
1644
|
+
"cwd": "<project root>",
|
|
1645
|
+
"reportPath": "<path to MIGRATION_REPORT.md>",
|
|
1646
|
+
"topics": [
|
|
1647
|
+
{
|
|
1648
|
+
"name": "<topic name>",
|
|
1649
|
+
"affectedFiles": ["src/path/to/file.vue"],
|
|
1650
|
+
"migrationPromptPath": "<absolute path to migration prompt>",
|
|
1651
|
+
"patternPath": "<absolute path to pattern file or null>"
|
|
1652
|
+
}
|
|
1653
|
+
]
|
|
1654
|
+
}
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
### Step 6: Type-check and build verification
|
|
1658
|
+
|
|
1659
|
+
After migration-agent completes, run type-check:
|
|
1660
|
+
|
|
1661
|
+
```bash
|
|
1662
|
+
npx vue-tsc --noEmit
|
|
1663
|
+
```
|
|
1664
|
+
|
|
1665
|
+
If there are remaining TypeScript errors:
|
|
1666
|
+
|
|
1667
|
+
1. Show the errors to the user
|
|
1668
|
+
2. Attempt to fix iteratively — read each error, fix the file, re-check (max 3 rounds)
|
|
1669
|
+
|
|
1670
|
+
After type-check passes, run a full build:
|
|
1671
|
+
|
|
1672
|
+
```bash
|
|
1673
|
+
yarn build
|
|
1674
|
+
```
|
|
1675
|
+
|
|
1676
|
+
If the build fails (Vite resolve errors, missing assets, etc.):
|
|
1677
|
+
|
|
1678
|
+
1. Show the error to the user
|
|
1679
|
+
2. Attempt to fix iteratively (max 2 rounds) — common issues: missing imports, deleted files still referenced, CSS import paths
|
|
1680
|
+
3. If still failing after 2 rounds, **STOP** and mark migration as incomplete (do not print "Migration complete")
|
|
1681
|
+
|
|
1682
|
+
### Step 6.5: Run Prettier across the project
|
|
1683
|
+
|
|
1684
|
+
After type-check/build are green, run formatting:
|
|
1685
|
+
|
|
1686
|
+
1. If `package.json` has a `prettier` script:
|
|
1687
|
+
```bash
|
|
1688
|
+
yarn prettier --write .
|
|
1689
|
+
```
|
|
1690
|
+
2. Otherwise run:
|
|
1691
|
+
```bash
|
|
1692
|
+
npx prettier --write .
|
|
1693
|
+
```
|
|
1694
|
+
|
|
1695
|
+
If Prettier fails, stop and show the error.
|
|
1696
|
+
|
|
1697
|
+
### Step 7: Update report and summarize
|
|
1698
|
+
|
|
1699
|
+
Update `MIGRATION_REPORT.md`:
|
|
1700
|
+
|
|
1701
|
+
- For each topic the agent successfully completed, add ✅ to the heading
|
|
1702
|
+
- Add a "Completed by AI" section listing what was done
|
|
1703
|
+
|
|
1704
|
+
Write `.vc-app-migrate-state.json` in project root:
|
|
1705
|
+
|
|
1706
|
+
- Store per-topic status (`completed`/`failed`), affected files, and timestamp
|
|
1707
|
+
- This state is used by Step 5 for automatic resume on the next `/vc-app migrate` run
|
|
1708
|
+
|
|
1709
|
+
Print summary to user:
|
|
1710
|
+
|
|
1711
|
+
```
|
|
1712
|
+
Migration complete!
|
|
1713
|
+
|
|
1714
|
+
Mechanical (CLI): {N} files
|
|
1715
|
+
AI-assisted: {M} files across {T} topics
|
|
1716
|
+
Remaining issues: {R} (see MIGRATION_REPORT.md)
|
|
1717
|
+
|
|
1718
|
+
Next steps:
|
|
1719
|
+
1. Review the changes: git diff
|
|
1720
|
+
2. Run: yarn build
|
|
1721
|
+
3. Test the application
|
|
1722
|
+
```
|