Files
CursorInitGeneral/.cursor/rules/common/cursor-init-recall.mdc

30 lines
1.3 KiB
Plaintext
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.
---
description: 首次会话检查 Cursor 初始化状态,并响应显式初始化或重置请求
alwaysApply: true
---
# Cursor 初始化触发
## 首次会话自检
处理每次会话的第一个用户任务前,检查 `.cursor/.init-done`
- 文件存在:正常处理任务;没有显式触发词时不重复提醒。
- 文件不存在:说明仓库尚未完成 Cursor 初始化,概述原任务,并在执行清理、移动、覆盖等操作前取得用户确认。
- 用户要求跳过初始化时,继续原任务并简短提示下次会话仍会检查;不得强制初始化。
用户确认后读取 `.cursor/skills/cursor-init/SKILL.md`严格按其当前阶段执行。Skill 不存在时停止初始化并报告缺失,不自行实施破坏性替代流程。
## 手动触发
以下意图触发完整初始化或重置:`初始化 cursor`、`cursor init`、`重置 cursor`、`reset cursor`、清理复制来的 `.cursor`。
以下意图仅触发 Skill 中的 `.gitignore` 流程:`补 gitignore`、`生成 .gitignore`、`gitignore 模板`。
## 执行约束
- 开始前检查工作区状态,提醒用户处理未提交改动。
- 删除、重置、覆盖和批量移动前提供 dry-run 清单并取得确认。
- 分类不清的文件逐项询问,不猜测归属。
- 流程保持幂等;重复执行不应破坏已经正确的状态。