Files
Neo-ZQYY/docs/audit/changes/2026-05-01__cursor_migration.md
2026-05-02 03:11:39 +08:00

48 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 变更审计记录Cursor AI 开发环境迁移
| 字段 | 值 |
|------|-----|
| 日期 | 2026-05-02 00:05:37 |
## 操作摘要
本轮将 Claude Code 与 Codex 中已经沉淀的 AI 开发习惯迁移到 Cursor 原生结构。迁移目标是让 Cursor 继承中文沟通、前置调研、验证、审计、子代理审查、MCP 测试库优先和历史追溯习惯,同时避免把长规则和原始对话全文堆入常规上下文。
## 变更文件
### 新增/修改
- `tools/cursor/migrate_ai_environment.py`:可重复迁移脚本。
- `.cursor/rules/`Cursor 项目级短规则。
- `.cursor/skills/`:审计、前置调研、文档同步和 spec 收尾流程技能。
- `.cursor/hooks.json``.cursor/hooks/ai_env_guard.py`:轻量提醒/保护 hooks。
- `docs/cursor_migration.md`Cursor 迁移说明。
- `docs/ai-env-history/`Claude/Codex/Cursor 原始对话精简索引和逐会话摘要。
- `AGENTS.md` / `CLAUDE.md`:补充 CLI / Shell 中文编码处理规则,要求 UTF-8、乱码复核、中文路径正确加引号。
- `C:\Users\Administrator\.cursor\skills`:用户级技能迁移。
- `C:\Users\Administrator\.cursor\agents`:用户级子代理迁移。
## 数据库变更
无数据库 schema 变更。未执行 DDL未修改迁移 SQL。
## 风险与回滚
-Cursor hooks 与 Claude hooks 事件字段不完全一致,本轮只启用轻量提醒和 ask不启用强阻断。
- 中:历史摘要从原始 JSONL 自动分析,仍可能遗漏自然语言里的隐含决策;关键判断需回看原文和当前代码。
- 低:用户级 Cursor 资产覆盖前已备份,可从 manifest 恢复。
-Windows 终端中文输出可能受代码页影响;已在根规则和 Cursor 核心规则中要求 UTF-8、乱码不采信、必要时重跑。
## 验证
- 运行 `python tools/cursor/migrate_ai_environment.py --check` 校验生成结构。
- 运行 `python scripts/audit/prescan.py --files "<本轮迁移文件>"` 做审计预扫描。
- 解析 `.mcp.json``.cursor/hooks.json`、skill/subagent frontmatter。
- 运行 `.venv\Scripts\python.exe scripts\audit\prescan.py --files "AGENTS.md,CLAUDE.md,.cursor/rules/neozqyy-core.mdc,tools/cursor/migrate_ai_environment.py"` 校验中文规则增量。
## 合规检查
- 文档同步:已新增 `docs/cursor_migration.md``docs/ai-env-history/README.md`
- 数据库文档:不适用,本轮无 schema 变更。
- 审计记录:已落盘。