chore(migration): Cursor → Claude Code 反向迁移 + 单轨化(v2)

- 删除 5 个 AGENTS.md(根 + 4 子模块)与 .cursor/、.cursorignore,全部已备份
- 在 CLAUDE.md 末尾追加 5 节迁移必需内容(CLI/Shell 中文与编码、Claude Code 资产入口、Hook 与权限、不破坏原则、历史追溯),保留用户选定的 226 行项目规则全集
- 用户级 12 个 skills 从 ~/.cursor/skills/ 剥包装回迁到 ~/.claude/skills/(neozqyy-cursor-migration → neozqyy-claude-code-migration)
- docs/ai-env-history/ 顶层 10 文件入仓(含 conversation_index.csv、file_impact_index.csv,已脱敏);sessions/ 原文继续本地保留
- 新增 tools/claude-code/migrate_ai_environment.py(--check 14/14 通过)
- 新增 docs/claude_code_migration.md 与 docs/audit/changes/2026-05-02__claude_code_migration.md
- .gitignore 调整:开放 2 个 CSV 索引入仓,保留 sessions/ 与 claude-history/ 排除
- 不混入 124 个业务变更(AI 模块重构、runtime_context、sandbox 等保持 unstaged)
- 备份位置:~/.claude/backups/pre-claude-code-migration-2026-05-02/

第二轮迁移(第一轮 commit 6facb2d 已被 git reset 回滚;本轮策略为追加而非重写 CLAUDE.md)
This commit is contained in:
Neo
2026-05-03 21:08:13 +08:00
parent 81e41730ec
commit f2e0de8fab
36 changed files with 15227 additions and 1041 deletions

View File

@@ -0,0 +1,32 @@
# AI 开发环境历史索引
> 迁移路径:旧服务器 → 本机 → **Claude Code** → Codex → Cursor → **Claude Code当前**
>
> 2026-05-02反向迁回 Claude Code 单轨化,详见 `docs/claude_code_migration.md`。
## 覆盖范围
- Claude 原始项目会话94 个,逐一生成摘要。
- Codex 本地/归档会话10 个,逐一生成摘要。
- Cursor 父会话 transcripts4 个,逐一生成摘要。
- Claude 全局 history`C:\Users\Administrator\.claude\history.jsonl`存在True。
- Claude plans6 份。
- Claude file-history 快照:约 5742 个。
- Cursor 本地文件历史 JSON12 个。
- Cursor checkpoints13 个。
## 主要入口
- 会话索引:`docs/ai-env-history/conversation_index.csv`
- 文件影响索引:`docs/ai-env-history/file_impact_index.csv`
- 主题时间线:`docs/ai-env-history/topic_timeline.md`
- 会话摘要:`docs/ai-env-history/sessions/`
- Claude 旧摘要:`docs/claude-history/`
- 审计记录:`docs/audit/changes/`
## 使用策略
1. 查“某文件为什么改”:先查 `file_impact_index.csv`,再读对应会话摘要和审计记录。
2. 查“某次对话做了什么”:先查 `conversation_index.csv`,再读摘要;必要时读原始 JSONL。
3. 恢复误改:再查 Claude file-history、Cursor local History 或 Cursor checkpoints。
4. 原始记录可能包含敏感信息;摘要会脱敏常见密钥和 DSN 形态,原文只在本机按需读取。