Use the deterministic script provided with the skill to clean up wot-starter v2, keeping the basic pages, Wot UI,uni-echarts , and echarts capabilities.
Execution Flow
-
Run in the project root
git status --short, confirm and inform the user that uncommitted changes will be preserved, but changes in the directories to be cleaned up will be deleted along with the directories. -
If the user has not yet explicitly requested the cleanup, first explain that this is a destructive operation and obtain confirmation.
-
First preview the cleanup plan:
node .agents/skills/starter-cleaner/scripts/clean.js --dry-run -
After confirming the target is
wot-starterv2, execute. The script will delete the oldsrc/pages.json, then run in a controlled mannerpnpm dev:h5, and exit the dev server after the new minimalsrc/pages.jsonis generated:node .agents/skills/starter-cleaner/scripts/clean.js
- Run
pnpm install --lockfile-onlyto update the lockfile, then runpnpm type-checkandpnpm lint. If dependencies are unavailable, at least checkgit diff --checkand the diff after cleanup, and clearly inform the user of the validations that were not run.
Cleanup Scope
The script performs the following operations and supports repeated runs:
- Delete
docs/、src/subPages/、src/subEcharts/、src/subAsyncEcharts/。 - Delete the old
src/pages.json, then triggerpnpm dev:h5viavite-plugin-uni-pagesto regenerate the minimal page configuration. - Delete
pnpm-workspace.yaml, restoring the project from a docs workspace to a single-package project. - From
vite.config.ts'sUniHelperPagesconfiguration, remove the above three example subpackage entries. - From
package.json, remove thedocs:*andlint:docsscripts. - Keep the
uni-echarts、echartsdependencies and related Vite configuration so the business can continue using charts.
Safety Constraints
- Do not directly concatenate or extend deletion paths; use only the fixed list within the script.
- Do not run in a non-
wot-starterv2 project. Only after the user explicitly confirms the target project, use--forceto skip the project identity check. - Do not use
--forceto bypass the uncommitted changes prompt; this parameter is only used for the project identity check.