allocation-confirmation.example.incremental-patch-plan.json
5.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{
"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": []
},
"sectionRoles": [
{
"id": "section-1-1592-results",
"role": "results",
"blockCount": 1
}
],
"blockRoleDistribution": {
"withRole": 1,
"withoutRole": 0,
"roles": ["primary-table"]
},
"actionScopeDistribution": {
"total": 0,
"byScope": {
"toolbar": 0,
"row": 0,
"dialog": 0,
"filter": 0,
"page": 0,
"unscoped": 0
}
}
},
"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": "patch-file",
"targetPath": "src/views/AllocationConfirmation.vue",
"description": "Page AllocationConfirmation.vue already exists. Review and decide whether to merge or overwrite.",
"patchStrategy": "manual-review",
"reason": "Existing page found at src/views/AllocationConfirmation.vue. Manual review required to avoid data loss.",
"semanticContext": {
"conflictDetected": true,
"existingPath": "src/views/AllocationConfirmation.vue"
}
},
{
"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",
"prefer existing @vui/vue components before introducing raw UI markup",
"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",
"section roles: results(1 blocks)",
"block roles: 1 with role [primary-table], 0 without",
"detected primary table: primary-table (6 columns)",
"project naming convention: PascalCase (13 existing pages)",
"page conflict: src/views/AllocationConfirmation.vue already exists"
]
}