agentleFS
lss486558354-ship-itlss486558354-ship-it/engineering-workflow/.cursor/rules/07-dialogue-execute-mode.md

engineering-workflow / rules

Cursor rule0 starsChanged 36 days agoMITView on GitHub

本规则只决定当前请求是否允许产生副作用,不负责规定任务要持续执行多久。 以下任一情况发生时进入或退回对话态: 新要求即使出现在执行过程中,也不得自动并入原执行授权。 仅当用户明确授权执行已经对齐的目标和范围时进入,例如: 模糊许可、讨论实现方式、询问“能不能做”不构成执行授权。

The file

Files
07-dialogue-execute-mode.md

对话态与执行态(读写门)

职责

本规则只决定当前请求是否允许产生副作用,不负责规定任务要持续执行多久。

  • 对话态:只读,可分析、检索、检查、解释和提出方案;不可修改文件、安装依赖、启动有副作用的命令或改变外部状态。
  • 执行态:可在已确认的目标和范围内写文件、运行命令并验证结果。
  • 务必完成:不是第三种读写状态,而是执行态上的持续执行策略,详见 05-must-complete-mode.md。

状态机

首次会话 / 新要求 / 范围变化
            │
            ▼
         dialogue
            │ 用户明确授权执行当前方案
            ▼
          execute ────── 任务完成 / 用户暂停 ──────▶ dialogue
            │
            └── 新要求或范围变化 ─────────────────▶ dialogue

"务必完成:" = dialogue --完成 5 问对齐--> execute(must_complete)

状态判定

进入对话态

以下任一情况发生时进入或退回对话态:

  • 新会话开始。
  • 用户提出新目标、新要求或改变范围。
  • 当前任务完成、被暂停或被取消。
  • 执行中发现必须扩大已确认范围。

新要求即使出现在执行过程中,也不得自动并入原执行授权。

进入执行态

仅当用户明确授权执行已经对齐的目标和范围时进入,例如:

  • “执行”“开始做”“按这个方案改”“直接处理”。
  • 用户对刚刚给出的方案作出明确同意。
  • 务必完成: 的 5 问已经完成。

模糊许可、讨论实现方式、询问“能不能做”不构成执行授权。

对话态允许与禁止

允许:

  • 读取文件、搜索内容、检查日志与配置。
  • 分析架构、数据流、状态机和影响范围。
  • 给出方案、伪代码、变更清单与风险说明。

禁止:

  • 创建、修改、删除文件。
  • 安装或卸载依赖。
  • 执行会写入磁盘、改变进程、网络资源、数据库或版本历史的命令。
  • 以“顺手修复”为由扩大授权。

执行态边界

  • 执行授权只覆盖已确认的目标、范围和必要验证。
  • 实现细节可自主判断;架构或范围发生实质变化时退回对话态。
  • 完成后报告可验证结果,并自动退回对话态。
  • 高风险操作仍受 02-ask-before-act.md 约束。

优先级

用户停止指令
  > 范围与安全硬边界
  > 对话态/执行态读写门
  > 务必完成持续策略
  > 普通工作循环

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.