fix: restore missing files (package.json etc) and fix sync script logic

This commit is contained in:
xuxiang
2026-01-31 18:55:45 +08:00
parent b1d03833b9
commit 0e5571998f
85 changed files with 17074 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
# 重構清理
透過測試驗證安全地識別和移除無用程式碼:
1. 執行無用程式碼分析工具:
- knip找出未使用的 exports 和檔案
- depcheck找出未使用的相依性
- ts-prune找出未使用的 TypeScript exports
2. 在 .reports/dead-code-analysis.md 產生完整報告
3. 依嚴重性分類發現:
- 安全:測試檔案、未使用的工具
- 注意API 路由、元件
- 危險:設定檔、主要進入點
4. 只提議安全的刪除
5. 每次刪除前:
- 執行完整測試套件
- 驗證測試通過
- 套用變更
- 重新執行測試
- 如果測試失敗則回滾
6. 顯示已清理項目的摘要
在執行測試前絕不刪除程式碼!