allocation-confirmation.example.incremental-patch-plan.json 4.93 KB
{
	"planId": "allocation-confirmation-incremental-patch",
	"targetProject": {
		"projectName": "@venus/example-admin",
		"projectRoot": "D:/work/venus/example",
		"framework": "vue",
		"primaryUiLibrary": "@vui/vue",
		"componentManifestEntry": "packages/vui/vue/meta/index.json"
	},
	"page": {
		"pageId": "allocation-confirmation",
		"title": "调拨确认单",
		"intent": "list",
		"routePath": "/allocation/confirmation",
		"routeName": "AllocationConfirmation"
	},
	"semanticContext": {
		"filterContext": null,
		"primaryTable": {
			"id": "table-1-1592",
			"role": "primary-table",
			"columnCount": 6,
			"hasRowActions": false
		},
		"toolbarActions": [],
		"rowActions": [],
		"dialogContext": null,
		"actionClassification": {
			"filterActions": [],
			"toolbarActions": [],
			"rowActions": [],
			"dialogTriggers": [],
			"navigateActions": [],
			"requestActions": []
		}
	},
	"routeRegistration": {
		"strategy": "static-routes-array",
		"routeFile": "src/router/index.ts",
		"suggestedParentRoute": "Layout",
		"anchorStrategy": "catch-all-fallback",
		"anchorConfidence": "medium",
		"anchorReviewRequired": false,
		"anchorRoutePath": "/:pathMatch(.*)*",
		"insertionScope": "Layout.children",
		"insertBeforeRoutePath": "/:pathMatch(.*)*",
		"insertionHint": "Insert the new route into Layout.children before the catch-all 404 route.",
		"detectedSignals": ["routes-array", "layout-parent-route", "layout-children-array", "catch-all-route"],
		"menuConfigTarget": "src/config/menus.ts",
		"menuAnchorPath": "/allocation",
		"menuAnchorConfidence": "high",
		"menuAnchorReviewRequired": false,
		"menuParentPath": null,
		"menuInsertAfterPath": "/allocation",
		"menuInsertionHint": "Candidate menu insertion: update the menu config near \"/allocation\" using the closest shared route prefix so the new page appears in the closest existing navigation group."
	},
	"componentSelections": [
		{
			"hint": "VTable",
			"exportName": "VTable",
			"packageName": "@vui/vue",
			"sourceManifest": "packages/vui/vue/src/components/VTable/VTable.manifest.json",
			"usedIn": ["block:table-1-1592"],
			"recommendedScenarios": ["后台列表页", "带行操作的数据展示", "查询结果表格"]
		}
	],
	"operations": [
		{
			"id": "create-page-file",
			"kind": "create-file",
			"targetPath": "src/views/AllocationConfirmation.vue",
			"description": "Create the generated list page component.",
			"patchStrategy": "none",
			"reason": "The page does not exist yet and should be introduced as a new file."
		},
		{
			"id": "create-route-snippet",
			"kind": "create-file",
			"targetPath": "src/views/AllocationConfirmation.route-snippet.ts",
			"description": "Create an isolated route export that can be reviewed before touching the live router file.",
			"patchStrategy": "none",
			"reason": "Separating the route definition reduces risk for old projects."
		},
		{
			"id": "patch-router-registration",
			"kind": "patch-file",
			"targetPath": "src/router/index.ts",
			"description": "Register the generated route using the detected static-routes-array strategy.",
			"patchStrategy": "append-snippet",
			"snippet": "import { AllocationConfirmationRoute } from \"../views/AllocationConfirmation.route-snippet\";\n\n/*\nInsert into the static routes array:\nInsert before route: /:pathMatch(.*)*\nInsert the new route into Layout.children before the catch-all 404 route.\nAllocationConfirmationRoute,\n*/",
			"dependsOn": ["create-route-snippet"],
			"reason": "The project context indicates that route registration is required for new pages and the router file matches static-routes-array."
		},
		{
			"id": "review-menu-coupling",
			"kind": "review-only",
			"targetPath": "src/config/menus.ts",
			"description": "Review whether the new page also requires a menu entry update. Candidate menu insertion: update the menu config near \"/allocation\" using the closest shared route prefix so the new page appears in the closest existing navigation group.",
			"patchStrategy": "manual-review",
			"reason": "The project context indicates that menu configuration is coupled with routing."
		},
		{
			"id": "review-state-impact",
			"kind": "review-only",
			"targetPath": "src/stores/app.ts",
			"description": "Review whether this page needs a dedicated pinia store or can remain local-state only.",
			"patchStrategy": "manual-review",
			"reason": "The project uses pinia and new module pages may need shared state integration."
		}
	],
	"validation": {
		"commands": ["pnpm lint", "pnpm run check:type"],
		"notes": [
			"Review the generated route snippet before patching the live router file.",
			"Prefer reusing the existing project UI library rather than introducing raw UI markup."
		]
	},
	"notes": [
		"changes must respect workspace-level quality gates",
		"new pages should include route registration planning",
		"state additions should align with the current pinia store layout",
		"component library manifest loaded from packages/vui/vue/meta/index.json",
		"detected primary table: primary-table"
	]
}