[{"data":1,"prerenderedAt":1175},["ShallowReactive",2],{"article-claudecode模式选择指南":3,"mdc--dvo56m-key":14},{"_path":4,"slug":5,"title":6,"description":7,"date":8,"tags":9,"type":11,"cover":12,"content":13},"\u002Fknowledge\u002Fclaudecode模式选择指南","claudecode模式选择指南","Claude Code 模式选择指南：Brainstorming 与 Systematic Debugging","Claude Code 模式选择指南：Brainstorming 与 Systematic Debugging 一、Claude Code 四种模式概览 | 模式 | 显示标识 | 核心特征 | 适合场景 | | :------------------ | :------------------- | :-------","2026-06-15",[10],"Claude","article","\u002Fknowledge-assets\u002Fclaudecode模式选择指南\u002Fclaude.png","# Claude Code 模式选择指南：Brainstorming 与 Systematic Debugging\r\n\r\n## 一、Claude Code 四种模式概览\r\n\r\n| 模式                | 显示标识             | 核心特征                                   | 适合场景                       |\r\n| :------------------ | :------------------- | :----------------------------------------- | :----------------------------- |\r\n| **默认模式**        | `? for shortcuts`    | 自由对话，AI 提出改动需用户确认            | 通用场景，探索性对话，诊断调试 |\r\n| **Accept Edits On** | `⏵⏵ accept edits on` | AI 可直接应用代码改动，无需逐条确认        | 信任度高的编码任务，追求效率   |\r\n| **Plan Mode**       | `⏸ plan mode on`     | 只读分析，生成计划，不修改代码             | 架构设计、代码审查、风险评估   |\r\n| **Auto Mode**       | `⏵⏵ auto mode on`    | 自动判断：简单任务直接执行，复杂任务先询问 | 效率与安全平衡，适合熟练用户   |\r\n\r\n> 按 `Shift+Tab` 循环切换四种模式。\r\n\r\n------\r\n\r\n## 二、Brainstorming（头脑风暴）模式选择\r\n\r\n### 推荐：**默认模式** (`? for shortcuts`) 或 **Auto Mode**\r\n\r\n| 模式               | 是否适合 | 理由                                                         |\r\n| :----------------- | :------- | :----------------------------------------------------------- |\r\n| ✅ **默认模式**     | 最适合   | 自由对话，AI 通过提问引导思路探索问题，不会急于产出最终代码。这是需求探索和思想碰撞的理想环境。 |\r\n| ✅ **Auto Mode**    | 也适合   | AI 会将头脑风暴判断为“探索性对话”，自动保持谨慎，不会擅自修改代码。适合在探索过程中兼顾一些快速验证。 |\r\n| ⚠️ **Plan Mode**    | 部分可用 | 适合在已有设计草案时用只读方式分析架构，但无法执行任何验证性操作（如运行原型代码）。 |\r\n| ❌ **Accept Edits** | 不适合   | AI 可能过早直接写代码，跳过真正的问题定义和需求澄清阶段，导致方向偏差。 |\r\n\r\n### 为什么 Brainstorming 不适合 Plan Mode？\r\n\r\nPlan Mode 是**只读模式**，其设计目标是“在修改代码前生成执行计划”。而 Brainstorming 的本质是：\r\n\r\n- **对话探索**：需要自由地让 AI 提问、反问、追问\r\n- **需求澄清**：可能需要快速写草稿、画原型（虽然最终不保留）\r\n- **灵活迭代**：思路随时调整，不需要严格的结构化输出\r\n\r\nPlan Mode 的只读约束会限制这种探索性对话的深度。\r\n\r\n### 为什么 Brainstorming 不适合 Accept Edits Mode？\r\n\r\nAccept Edits Mode 的默认行为是“AI 可以直接改代码”。这在头脑风暴阶段是危险的：\r\n\r\n- AI 可能过早跳到“写代码”阶段\r\n- 用户的模糊需求可能被 AI 过度具体化\r\n- 失去了“先想清楚再做”的关键环节\r\n\r\n------\r\n\r\n## 三、Systematic Debugging（系统性调试）模式选择\r\n\r\n### 推荐：**默认模式** (`? for shortcuts`) 或 **Auto Mode**\r\n\r\nSystematic Debugging 的四阶段流程：\r\n\r\n1. **Phase 1: 根因调查** — 复现问题、添加日志、追踪数据流\r\n2. **Phase 2: 模式分析** — 寻找正常工作的对比案例\r\n3. **Phase 3: 假设验证** — 提出单一假设，最小化测试\r\n4. **Phase 4: 实施修复** — 写失败测试，实施修复，验证\r\n\r\n| 模式               | 是否适合 | 理由                                                         |\r\n| :----------------- | :------- | :----------------------------------------------------------- |\r\n| ✅ **默认模式**     | 最适合   | 四阶段调试需要自由对话、执行诊断命令、添加日志、运行测试、验证假设——这些都需要写入和执行权限。 |\r\n| ✅ **Auto Mode**    | 也适合   | AI 可自动判断何时直接加日志\u002F运行测试（Phase 1-3），何时需要汇报。平衡效率与安全。 |\r\n| ⚠️ **Accept Edits** | 谨慎使用 | 仅适合 Phase 4（实施修复）阶段，且根因已完全明确。调试早期绝不可用。 |\r\n| ❌ **Plan Mode**    | 不适合   | 只读模式无法运行测试、添加诊断日志、执行验证命令——这些都是调试的核心动作。 |\r\n\r\n### 为什么 Systematic Debugging 不适合 Plan Mode？\r\n\r\nPlan Mode 的核心约束是**只读**，而 Systematic Debugging 强制要求的动作包括：\r\n\r\n- 添加 `console.log` \u002F 诊断日志\r\n- 运行测试用例\r\n- 执行 `git bisect` 等诊断命令\r\n- 创建最小复现示例\r\n\r\n这些操作在 Plan Mode 下完全被禁止。调试和规划是不同性质的活动：\r\n\r\n- **规划**：在看清楚之前，不动手\r\n- **调试**：在动手过程中，才能看清楚\r\n\r\n### 为什么 Phase 4 可以谨慎使用 Accept Edits？\r\n\r\n当调试进入 Phase 4 时，根因已经完全明确：\r\n\r\n- 你知道要改什么\r\n- 你知道怎么改\r\n- 你有测试用例验证\r\n\r\n此时 Accept Edits Mode 可以加速修复过程。但前提是**根因已确认**，否则风险极大。\r\n\r\n------\r\n\r\n## 四、快速决策指南\r\n\r\n### 按场景选择\r\n\r\ntext\r\n\r\n```\r\n开始任务\r\n    │\r\n    ├─ 需求模糊，需要探索和讨论？\r\n    │   └─ 默认模式 (? for shortcuts)\r\n    │       例：Brainstorming、需求分析、Systematic Debugging Phase 1-3\r\n    │\r\n    ├─ 任务明确，但希望保留控制权？\r\n    │   └─ 默认模式（AI 提出改动需你确认）\r\n    │       例：常规编码、代码审查、学习新代码库\r\n    │\r\n    ├─ 信任 AI，追求效率最大化？\r\n    │   └─ Accept Edits On (⏵⏵)\r\n    │       例：批量重构、脚手架生成、熟悉的领域\r\n    │\r\n    ├─ 只读分析，不想有任何风险？\r\n    │   └─ Plan Mode (⏸)\r\n    │       例：架构评审、安全审计、生成迁移计划\r\n    │\r\n    └─ 想要平衡，让 AI 自己判断？\r\n        └─ Auto Mode (⏵⏵)\r\n            例：日常开发，AI 判断简单改动直接做，复杂改动先请示\r\n```\r\n\r\n\r\n\r\n### 按方法论选择\r\n\r\n| 方法论                   | 首选模式      | 次选模式 | 禁用模式     |\r\n| :----------------------- | :------------ | :------- | :----------- |\r\n| **Brainstorming**        | Default (`?`) | Auto     | Accept Edits |\r\n| **Systematic Debugging** | Default (`?`) | Auto     | Plan Mode    |\r\n\r\n------\r\n\r\n## 五、核心原则总结\r\n\r\n1. **方法论 vs 执行模式是两个维度**\r\n   - Brainstorming 和 Systematic Debugging 是**思维框架**（how to think）\r\n   - Default\u002FPlan\u002FAuto\u002FAccept Edits 是**操作权限模式**（what AI can do）\r\n2. **默认模式是最安全、最通用的起点**\r\n   - 探索性工作：默认模式\r\n   - 诊断性工作：默认模式\r\n   - 不确定用什么模式：默认模式\r\n3. **Plan Mode 只适合“纯规划”场景**\r\n   - 架构评审、迁移计划、风险评估\r\n   - 任何需要“动手”的工作（包括加日志、运行测试）都不适合\r\n4. **Auto Mode 是熟练用户的效率之选**\r\n   - AI 会根据任务复杂度自动判断是否需要确认\r\n   - 探索性对话会自动保持谨慎，简单任务会直接执行\r\n5. **Accept Edits Mode 需要充分信任**\r\n   - 仅适合根因明确、方案清晰、风险可控的场景\r\n   - 绝不要在调试早期或需求模糊时使用\r\n\r\n------\r\n\r\n## 六、实际操作示例\r\n\r\n### 示例 1：Brainstorming 新功能\r\n\r\nbash\r\n\r\n```\r\n$ claude\r\n# 左下角显示: ? for shortcuts\r\n\r\n> 我想给电商网站加一个“猜你喜欢”功能，帮我 brainstorm 一下\r\n# AI 会通过提问引导你思考：数据来源、算法选择、展示位置、冷启动问题等\r\n```\r\n\r\n\r\n\r\n### 示例 2：Systematic Debugging 完整流程\r\n\r\nbash\r\n\r\n```\r\n$ claude\r\n# 左下角显示: ? for shortcuts\r\n\r\n> 运行 npm run build 报错 TypeError: Cannot read properties of undefined...\r\n# AI 自动激活 Systematic Debugging 技能，按 Phase 1→2→3→4 执行\r\n\r\n# Phase 4 时可临时切换提高效率\r\nShift+Tab   # 切换到 Auto Mode 或 Accept Edits\r\n```\r\n\r\n\r\n\r\n### 示例 3：需要只读评审时切换到 Plan Mode\r\n\r\nbash\r\n\r\n```\r\n# 调试到 Phase 3，发现需要重构核心模块\r\nShift+Tab   # 切换到 ⏸ plan mode on\r\n\r\n> 帮我生成一个 ProductList 组件的重构计划，先不要改代码\r\n# AI 生成只读计划，风险评估，依赖分析\r\n\r\nShift+Tab   # 切回默认模式开始执行\r\n```\r\n\r\n\r\n\r\n------\r\n\r\n## 七、常见误区\r\n\r\n| 误区                                  | 正确理解                                                     |\r\n| :------------------------------------ | :----------------------------------------------------------- |\r\n| “Brainstorming 应该在 Plan Mode 下做” | ❌ Plan Mode 是只读规划，不能执行探索性对话所需的快速原型验证 |\r\n| “调试时用 Plan Mode 更安全”           | ❌ 调试需要加日志、跑测试、执行命令，Plan Mode 的只读约束反而阻碍调试 |\r\n| “Auto Mode 会自动选择最优模式”        | ⚠️ Auto Mode 只在“是否确认”上做判断，不会自动切换四种模式     |\r\n| “Accept Edits 适用于所有编码任务”     | ❌ 仅适合根因明确、风险可控的场景，调试早期绝对禁用           |\r\n\r\n------\r\n\r\n",{"data":15,"body":16},{},{"type":17,"children":18},"root",[19,27,34,195,213,217,223,247,361,367,379,414,419,425,430,448,451,457,477,482,526,631,637,649,688,693,716,722,727,745,757,760,766,771,775,787,792,886,889,895,1022,1025,1031,1037,1042,1051,1057,1061,1070,1076,1080,1089,1092,1098,1172],{"type":20,"tag":21,"props":22,"children":24},"element","h1",{"id":23},"claude-code-模式选择指南brainstorming-与-systematic-debugging",[25],{"type":26,"value":6},"text",{"type":20,"tag":28,"props":29,"children":31},"h2",{"id":30},"一claude-code-四种模式概览",[32],{"type":26,"value":33},"一、Claude Code 四种模式概览",{"type":20,"tag":35,"props":36,"children":37},"table",{},[38,68],{"type":20,"tag":39,"props":40,"children":41},"thead",{},[42],{"type":20,"tag":43,"props":44,"children":45},"tr",{},[46,53,58,63],{"type":20,"tag":47,"props":48,"children":50},"th",{"align":49},"left",[51],{"type":26,"value":52},"模式",{"type":20,"tag":47,"props":54,"children":55},{"align":49},[56],{"type":26,"value":57},"显示标识",{"type":20,"tag":47,"props":59,"children":60},{"align":49},[61],{"type":26,"value":62},"核心特征",{"type":20,"tag":47,"props":64,"children":65},{"align":49},[66],{"type":26,"value":67},"适合场景",{"type":20,"tag":69,"props":70,"children":71},"tbody",{},[72,105,135,165],{"type":20,"tag":43,"props":73,"children":74},{},[75,85,95,100],{"type":20,"tag":76,"props":77,"children":78},"td",{"align":49},[79],{"type":20,"tag":80,"props":81,"children":82},"strong",{},[83],{"type":26,"value":84},"默认模式",{"type":20,"tag":76,"props":86,"children":87},{"align":49},[88],{"type":20,"tag":89,"props":90,"children":92},"code",{"className":91},[],[93],{"type":26,"value":94},"? for shortcuts",{"type":20,"tag":76,"props":96,"children":97},{"align":49},[98],{"type":26,"value":99},"自由对话，AI 提出改动需用户确认",{"type":20,"tag":76,"props":101,"children":102},{"align":49},[103],{"type":26,"value":104},"通用场景，探索性对话，诊断调试",{"type":20,"tag":43,"props":106,"children":107},{},[108,116,125,130],{"type":20,"tag":76,"props":109,"children":110},{"align":49},[111],{"type":20,"tag":80,"props":112,"children":113},{},[114],{"type":26,"value":115},"Accept Edits On",{"type":20,"tag":76,"props":117,"children":118},{"align":49},[119],{"type":20,"tag":89,"props":120,"children":122},{"className":121},[],[123],{"type":26,"value":124},"⏵⏵ accept edits on",{"type":20,"tag":76,"props":126,"children":127},{"align":49},[128],{"type":26,"value":129},"AI 可直接应用代码改动，无需逐条确认",{"type":20,"tag":76,"props":131,"children":132},{"align":49},[133],{"type":26,"value":134},"信任度高的编码任务，追求效率",{"type":20,"tag":43,"props":136,"children":137},{},[138,146,155,160],{"type":20,"tag":76,"props":139,"children":140},{"align":49},[141],{"type":20,"tag":80,"props":142,"children":143},{},[144],{"type":26,"value":145},"Plan Mode",{"type":20,"tag":76,"props":147,"children":148},{"align":49},[149],{"type":20,"tag":89,"props":150,"children":152},{"className":151},[],[153],{"type":26,"value":154},"⏸ plan mode on",{"type":20,"tag":76,"props":156,"children":157},{"align":49},[158],{"type":26,"value":159},"只读分析，生成计划，不修改代码",{"type":20,"tag":76,"props":161,"children":162},{"align":49},[163],{"type":26,"value":164},"架构设计、代码审查、风险评估",{"type":20,"tag":43,"props":166,"children":167},{},[168,176,185,190],{"type":20,"tag":76,"props":169,"children":170},{"align":49},[171],{"type":20,"tag":80,"props":172,"children":173},{},[174],{"type":26,"value":175},"Auto Mode",{"type":20,"tag":76,"props":177,"children":178},{"align":49},[179],{"type":20,"tag":89,"props":180,"children":182},{"className":181},[],[183],{"type":26,"value":184},"⏵⏵ auto mode on",{"type":20,"tag":76,"props":186,"children":187},{"align":49},[188],{"type":26,"value":189},"自动判断：简单任务直接执行，复杂任务先询问",{"type":20,"tag":76,"props":191,"children":192},{"align":49},[193],{"type":26,"value":194},"效率与安全平衡，适合熟练用户",{"type":20,"tag":196,"props":197,"children":198},"blockquote",{},[199],{"type":20,"tag":200,"props":201,"children":202},"p",{},[203,205,211],{"type":26,"value":204},"按 ",{"type":20,"tag":89,"props":206,"children":208},{"className":207},[],[209],{"type":26,"value":210},"Shift+Tab",{"type":26,"value":212}," 循环切换四种模式。",{"type":20,"tag":214,"props":215,"children":216},"hr",{},[],{"type":20,"tag":28,"props":218,"children":220},{"id":219},"二brainstorming头脑风暴模式选择",[221],{"type":26,"value":222},"二、Brainstorming（头脑风暴）模式选择",{"type":20,"tag":224,"props":225,"children":227},"h3",{"id":226},"推荐默认模式-for-shortcuts-或-auto-mode",[228,230,234,236,241,243],{"type":26,"value":229},"推荐：",{"type":20,"tag":80,"props":231,"children":232},{},[233],{"type":26,"value":84},{"type":26,"value":235}," (",{"type":20,"tag":89,"props":237,"children":239},{"className":238},[],[240],{"type":26,"value":94},{"type":26,"value":242},") 或 ",{"type":20,"tag":80,"props":244,"children":245},{},[246],{"type":26,"value":175},{"type":20,"tag":35,"props":248,"children":249},{},[250,270],{"type":20,"tag":39,"props":251,"children":252},{},[253],{"type":20,"tag":43,"props":254,"children":255},{},[256,260,265],{"type":20,"tag":47,"props":257,"children":258},{"align":49},[259],{"type":26,"value":52},{"type":20,"tag":47,"props":261,"children":262},{"align":49},[263],{"type":26,"value":264},"是否适合",{"type":20,"tag":47,"props":266,"children":267},{"align":49},[268],{"type":26,"value":269},"理由",{"type":20,"tag":69,"props":271,"children":272},{},[273,295,316,338],{"type":20,"tag":43,"props":274,"children":275},{},[276,285,290],{"type":20,"tag":76,"props":277,"children":278},{"align":49},[279,281],{"type":26,"value":280},"✅ ",{"type":20,"tag":80,"props":282,"children":283},{},[284],{"type":26,"value":84},{"type":20,"tag":76,"props":286,"children":287},{"align":49},[288],{"type":26,"value":289},"最适合",{"type":20,"tag":76,"props":291,"children":292},{"align":49},[293],{"type":26,"value":294},"自由对话，AI 通过提问引导思路探索问题，不会急于产出最终代码。这是需求探索和思想碰撞的理想环境。",{"type":20,"tag":43,"props":296,"children":297},{},[298,306,311],{"type":20,"tag":76,"props":299,"children":300},{"align":49},[301,302],{"type":26,"value":280},{"type":20,"tag":80,"props":303,"children":304},{},[305],{"type":26,"value":175},{"type":20,"tag":76,"props":307,"children":308},{"align":49},[309],{"type":26,"value":310},"也适合",{"type":20,"tag":76,"props":312,"children":313},{"align":49},[314],{"type":26,"value":315},"AI 会将头脑风暴判断为“探索性对话”，自动保持谨慎，不会擅自修改代码。适合在探索过程中兼顾一些快速验证。",{"type":20,"tag":43,"props":317,"children":318},{},[319,328,333],{"type":20,"tag":76,"props":320,"children":321},{"align":49},[322,324],{"type":26,"value":323},"⚠️ ",{"type":20,"tag":80,"props":325,"children":326},{},[327],{"type":26,"value":145},{"type":20,"tag":76,"props":329,"children":330},{"align":49},[331],{"type":26,"value":332},"部分可用",{"type":20,"tag":76,"props":334,"children":335},{"align":49},[336],{"type":26,"value":337},"适合在已有设计草案时用只读方式分析架构，但无法执行任何验证性操作（如运行原型代码）。",{"type":20,"tag":43,"props":339,"children":340},{},[341,351,356],{"type":20,"tag":76,"props":342,"children":343},{"align":49},[344,346],{"type":26,"value":345},"❌ ",{"type":20,"tag":80,"props":347,"children":348},{},[349],{"type":26,"value":350},"Accept Edits",{"type":20,"tag":76,"props":352,"children":353},{"align":49},[354],{"type":26,"value":355},"不适合",{"type":20,"tag":76,"props":357,"children":358},{"align":49},[359],{"type":26,"value":360},"AI 可能过早直接写代码，跳过真正的问题定义和需求澄清阶段，导致方向偏差。",{"type":20,"tag":224,"props":362,"children":364},{"id":363},"为什么-brainstorming-不适合-plan-mode",[365],{"type":26,"value":366},"为什么 Brainstorming 不适合 Plan Mode？",{"type":20,"tag":200,"props":368,"children":369},{},[370,372,377],{"type":26,"value":371},"Plan Mode 是",{"type":20,"tag":80,"props":373,"children":374},{},[375],{"type":26,"value":376},"只读模式",{"type":26,"value":378},"，其设计目标是“在修改代码前生成执行计划”。而 Brainstorming 的本质是：",{"type":20,"tag":380,"props":381,"children":382},"ul",{},[383,394,404],{"type":20,"tag":384,"props":385,"children":386},"li",{},[387,392],{"type":20,"tag":80,"props":388,"children":389},{},[390],{"type":26,"value":391},"对话探索",{"type":26,"value":393},"：需要自由地让 AI 提问、反问、追问",{"type":20,"tag":384,"props":395,"children":396},{},[397,402],{"type":20,"tag":80,"props":398,"children":399},{},[400],{"type":26,"value":401},"需求澄清",{"type":26,"value":403},"：可能需要快速写草稿、画原型（虽然最终不保留）",{"type":20,"tag":384,"props":405,"children":406},{},[407,412],{"type":20,"tag":80,"props":408,"children":409},{},[410],{"type":26,"value":411},"灵活迭代",{"type":26,"value":413},"：思路随时调整，不需要严格的结构化输出",{"type":20,"tag":200,"props":415,"children":416},{},[417],{"type":26,"value":418},"Plan Mode 的只读约束会限制这种探索性对话的深度。",{"type":20,"tag":224,"props":420,"children":422},{"id":421},"为什么-brainstorming-不适合-accept-edits-mode",[423],{"type":26,"value":424},"为什么 Brainstorming 不适合 Accept Edits Mode？",{"type":20,"tag":200,"props":426,"children":427},{},[428],{"type":26,"value":429},"Accept Edits Mode 的默认行为是“AI 可以直接改代码”。这在头脑风暴阶段是危险的：",{"type":20,"tag":380,"props":431,"children":432},{},[433,438,443],{"type":20,"tag":384,"props":434,"children":435},{},[436],{"type":26,"value":437},"AI 可能过早跳到“写代码”阶段",{"type":20,"tag":384,"props":439,"children":440},{},[441],{"type":26,"value":442},"用户的模糊需求可能被 AI 过度具体化",{"type":20,"tag":384,"props":444,"children":445},{},[446],{"type":26,"value":447},"失去了“先想清楚再做”的关键环节",{"type":20,"tag":214,"props":449,"children":450},{},[],{"type":20,"tag":28,"props":452,"children":454},{"id":453},"三systematic-debugging系统性调试模式选择",[455],{"type":26,"value":456},"三、Systematic Debugging（系统性调试）模式选择",{"type":20,"tag":224,"props":458,"children":460},{"id":459},"推荐默认模式-for-shortcuts-或-auto-mode-1",[461,462,466,467,472,473],{"type":26,"value":229},{"type":20,"tag":80,"props":463,"children":464},{},[465],{"type":26,"value":84},{"type":26,"value":235},{"type":20,"tag":89,"props":468,"children":470},{"className":469},[],[471],{"type":26,"value":94},{"type":26,"value":242},{"type":20,"tag":80,"props":474,"children":475},{},[476],{"type":26,"value":175},{"type":20,"tag":200,"props":478,"children":479},{},[480],{"type":26,"value":481},"Systematic Debugging 的四阶段流程：",{"type":20,"tag":483,"props":484,"children":485},"ol",{},[486,496,506,516],{"type":20,"tag":384,"props":487,"children":488},{},[489,494],{"type":20,"tag":80,"props":490,"children":491},{},[492],{"type":26,"value":493},"Phase 1: 根因调查",{"type":26,"value":495}," — 复现问题、添加日志、追踪数据流",{"type":20,"tag":384,"props":497,"children":498},{},[499,504],{"type":20,"tag":80,"props":500,"children":501},{},[502],{"type":26,"value":503},"Phase 2: 模式分析",{"type":26,"value":505}," — 寻找正常工作的对比案例",{"type":20,"tag":384,"props":507,"children":508},{},[509,514],{"type":20,"tag":80,"props":510,"children":511},{},[512],{"type":26,"value":513},"Phase 3: 假设验证",{"type":26,"value":515}," — 提出单一假设，最小化测试",{"type":20,"tag":384,"props":517,"children":518},{},[519,524],{"type":20,"tag":80,"props":520,"children":521},{},[522],{"type":26,"value":523},"Phase 4: 实施修复",{"type":26,"value":525}," — 写失败测试，实施修复，验证",{"type":20,"tag":35,"props":527,"children":528},{},[529,547],{"type":20,"tag":39,"props":530,"children":531},{},[532],{"type":20,"tag":43,"props":533,"children":534},{},[535,539,543],{"type":20,"tag":47,"props":536,"children":537},{"align":49},[538],{"type":26,"value":52},{"type":20,"tag":47,"props":540,"children":541},{"align":49},[542],{"type":26,"value":264},{"type":20,"tag":47,"props":544,"children":545},{"align":49},[546],{"type":26,"value":269},{"type":20,"tag":69,"props":548,"children":549},{},[550,570,590,611],{"type":20,"tag":43,"props":551,"children":552},{},[553,561,565],{"type":20,"tag":76,"props":554,"children":555},{"align":49},[556,557],{"type":26,"value":280},{"type":20,"tag":80,"props":558,"children":559},{},[560],{"type":26,"value":84},{"type":20,"tag":76,"props":562,"children":563},{"align":49},[564],{"type":26,"value":289},{"type":20,"tag":76,"props":566,"children":567},{"align":49},[568],{"type":26,"value":569},"四阶段调试需要自由对话、执行诊断命令、添加日志、运行测试、验证假设——这些都需要写入和执行权限。",{"type":20,"tag":43,"props":571,"children":572},{},[573,581,585],{"type":20,"tag":76,"props":574,"children":575},{"align":49},[576,577],{"type":26,"value":280},{"type":20,"tag":80,"props":578,"children":579},{},[580],{"type":26,"value":175},{"type":20,"tag":76,"props":582,"children":583},{"align":49},[584],{"type":26,"value":310},{"type":20,"tag":76,"props":586,"children":587},{"align":49},[588],{"type":26,"value":589},"AI 可自动判断何时直接加日志\u002F运行测试（Phase 1-3），何时需要汇报。平衡效率与安全。",{"type":20,"tag":43,"props":591,"children":592},{},[593,601,606],{"type":20,"tag":76,"props":594,"children":595},{"align":49},[596,597],{"type":26,"value":323},{"type":20,"tag":80,"props":598,"children":599},{},[600],{"type":26,"value":350},{"type":20,"tag":76,"props":602,"children":603},{"align":49},[604],{"type":26,"value":605},"谨慎使用",{"type":20,"tag":76,"props":607,"children":608},{"align":49},[609],{"type":26,"value":610},"仅适合 Phase 4（实施修复）阶段，且根因已完全明确。调试早期绝不可用。",{"type":20,"tag":43,"props":612,"children":613},{},[614,622,626],{"type":20,"tag":76,"props":615,"children":616},{"align":49},[617,618],{"type":26,"value":345},{"type":20,"tag":80,"props":619,"children":620},{},[621],{"type":26,"value":145},{"type":20,"tag":76,"props":623,"children":624},{"align":49},[625],{"type":26,"value":355},{"type":20,"tag":76,"props":627,"children":628},{"align":49},[629],{"type":26,"value":630},"只读模式无法运行测试、添加诊断日志、执行验证命令——这些都是调试的核心动作。",{"type":20,"tag":224,"props":632,"children":634},{"id":633},"为什么-systematic-debugging-不适合-plan-mode",[635],{"type":26,"value":636},"为什么 Systematic Debugging 不适合 Plan Mode？",{"type":20,"tag":200,"props":638,"children":639},{},[640,642,647],{"type":26,"value":641},"Plan Mode 的核心约束是",{"type":20,"tag":80,"props":643,"children":644},{},[645],{"type":26,"value":646},"只读",{"type":26,"value":648},"，而 Systematic Debugging 强制要求的动作包括：",{"type":20,"tag":380,"props":650,"children":651},{},[652,665,670,683],{"type":20,"tag":384,"props":653,"children":654},{},[655,657,663],{"type":26,"value":656},"添加 ",{"type":20,"tag":89,"props":658,"children":660},{"className":659},[],[661],{"type":26,"value":662},"console.log",{"type":26,"value":664}," \u002F 诊断日志",{"type":20,"tag":384,"props":666,"children":667},{},[668],{"type":26,"value":669},"运行测试用例",{"type":20,"tag":384,"props":671,"children":672},{},[673,675,681],{"type":26,"value":674},"执行 ",{"type":20,"tag":89,"props":676,"children":678},{"className":677},[],[679],{"type":26,"value":680},"git bisect",{"type":26,"value":682}," 等诊断命令",{"type":20,"tag":384,"props":684,"children":685},{},[686],{"type":26,"value":687},"创建最小复现示例",{"type":20,"tag":200,"props":689,"children":690},{},[691],{"type":26,"value":692},"这些操作在 Plan Mode 下完全被禁止。调试和规划是不同性质的活动：",{"type":20,"tag":380,"props":694,"children":695},{},[696,706],{"type":20,"tag":384,"props":697,"children":698},{},[699,704],{"type":20,"tag":80,"props":700,"children":701},{},[702],{"type":26,"value":703},"规划",{"type":26,"value":705},"：在看清楚之前，不动手",{"type":20,"tag":384,"props":707,"children":708},{},[709,714],{"type":20,"tag":80,"props":710,"children":711},{},[712],{"type":26,"value":713},"调试",{"type":26,"value":715},"：在动手过程中，才能看清楚",{"type":20,"tag":224,"props":717,"children":719},{"id":718},"为什么-phase-4-可以谨慎使用-accept-edits",[720],{"type":26,"value":721},"为什么 Phase 4 可以谨慎使用 Accept Edits？",{"type":20,"tag":200,"props":723,"children":724},{},[725],{"type":26,"value":726},"当调试进入 Phase 4 时，根因已经完全明确：",{"type":20,"tag":380,"props":728,"children":729},{},[730,735,740],{"type":20,"tag":384,"props":731,"children":732},{},[733],{"type":26,"value":734},"你知道要改什么",{"type":20,"tag":384,"props":736,"children":737},{},[738],{"type":26,"value":739},"你知道怎么改",{"type":20,"tag":384,"props":741,"children":742},{},[743],{"type":26,"value":744},"你有测试用例验证",{"type":20,"tag":200,"props":746,"children":747},{},[748,750,755],{"type":26,"value":749},"此时 Accept Edits Mode 可以加速修复过程。但前提是",{"type":20,"tag":80,"props":751,"children":752},{},[753],{"type":26,"value":754},"根因已确认",{"type":26,"value":756},"，否则风险极大。",{"type":20,"tag":214,"props":758,"children":759},{},[],{"type":20,"tag":28,"props":761,"children":763},{"id":762},"四快速决策指南",[764],{"type":26,"value":765},"四、快速决策指南",{"type":20,"tag":224,"props":767,"children":769},{"id":768},"按场景选择",[770],{"type":26,"value":768},{"type":20,"tag":200,"props":772,"children":773},{},[774],{"type":26,"value":26},{"type":20,"tag":776,"props":777,"children":781},"pre",{"className":778,"code":780,"language":26},[779],"language-text","开始任务\n    │\n    ├─ 需求模糊，需要探索和讨论？\n    │   └─ 默认模式 (? for shortcuts)\n    │       例：Brainstorming、需求分析、Systematic Debugging Phase 1-3\n    │\n    ├─ 任务明确，但希望保留控制权？\n    │   └─ 默认模式（AI 提出改动需你确认）\n    │       例：常规编码、代码审查、学习新代码库\n    │\n    ├─ 信任 AI，追求效率最大化？\n    │   └─ Accept Edits On (⏵⏵)\n    │       例：批量重构、脚手架生成、熟悉的领域\n    │\n    ├─ 只读分析，不想有任何风险？\n    │   └─ Plan Mode (⏸)\n    │       例：架构评审、安全审计、生成迁移计划\n    │\n    └─ 想要平衡，让 AI 自己判断？\n        └─ Auto Mode (⏵⏵)\n            例：日常开发，AI 判断简单改动直接做，复杂改动先请示\n",[782],{"type":20,"tag":89,"props":783,"children":785},{"__ignoreMap":784},"",[786],{"type":26,"value":780},{"type":20,"tag":224,"props":788,"children":790},{"id":789},"按方法论选择",[791],{"type":26,"value":789},{"type":20,"tag":35,"props":793,"children":794},{},[795,821],{"type":20,"tag":39,"props":796,"children":797},{},[798],{"type":20,"tag":43,"props":799,"children":800},{},[801,806,811,816],{"type":20,"tag":47,"props":802,"children":803},{"align":49},[804],{"type":26,"value":805},"方法论",{"type":20,"tag":47,"props":807,"children":808},{"align":49},[809],{"type":26,"value":810},"首选模式",{"type":20,"tag":47,"props":812,"children":813},{"align":49},[814],{"type":26,"value":815},"次选模式",{"type":20,"tag":47,"props":817,"children":818},{"align":49},[819],{"type":26,"value":820},"禁用模式",{"type":20,"tag":69,"props":822,"children":823},{},[824,857],{"type":20,"tag":43,"props":825,"children":826},{},[827,835,848,853],{"type":20,"tag":76,"props":828,"children":829},{"align":49},[830],{"type":20,"tag":80,"props":831,"children":832},{},[833],{"type":26,"value":834},"Brainstorming",{"type":20,"tag":76,"props":836,"children":837},{"align":49},[838,840,846],{"type":26,"value":839},"Default (",{"type":20,"tag":89,"props":841,"children":843},{"className":842},[],[844],{"type":26,"value":845},"?",{"type":26,"value":847},")",{"type":20,"tag":76,"props":849,"children":850},{"align":49},[851],{"type":26,"value":852},"Auto",{"type":20,"tag":76,"props":854,"children":855},{"align":49},[856],{"type":26,"value":350},{"type":20,"tag":43,"props":858,"children":859},{},[860,868,878,882],{"type":20,"tag":76,"props":861,"children":862},{"align":49},[863],{"type":20,"tag":80,"props":864,"children":865},{},[866],{"type":26,"value":867},"Systematic Debugging",{"type":20,"tag":76,"props":869,"children":870},{"align":49},[871,872,877],{"type":26,"value":839},{"type":20,"tag":89,"props":873,"children":875},{"className":874},[],[876],{"type":26,"value":845},{"type":26,"value":847},{"type":20,"tag":76,"props":879,"children":880},{"align":49},[881],{"type":26,"value":852},{"type":20,"tag":76,"props":883,"children":884},{"align":49},[885],{"type":26,"value":145},{"type":20,"tag":214,"props":887,"children":888},{},[],{"type":20,"tag":28,"props":890,"children":892},{"id":891},"五核心原则总结",[893],{"type":26,"value":894},"五、核心原则总结",{"type":20,"tag":483,"props":896,"children":897},{},[898,933,959,980,1001],{"type":20,"tag":384,"props":899,"children":900},{},[901,906],{"type":20,"tag":80,"props":902,"children":903},{},[904],{"type":26,"value":905},"方法论 vs 执行模式是两个维度",{"type":20,"tag":380,"props":907,"children":908},{},[909,921],{"type":20,"tag":384,"props":910,"children":911},{},[912,914,919],{"type":26,"value":913},"Brainstorming 和 Systematic Debugging 是",{"type":20,"tag":80,"props":915,"children":916},{},[917],{"type":26,"value":918},"思维框架",{"type":26,"value":920},"（how to think）",{"type":20,"tag":384,"props":922,"children":923},{},[924,926,931],{"type":26,"value":925},"Default\u002FPlan\u002FAuto\u002FAccept Edits 是",{"type":20,"tag":80,"props":927,"children":928},{},[929],{"type":26,"value":930},"操作权限模式",{"type":26,"value":932},"（what AI can do）",{"type":20,"tag":384,"props":934,"children":935},{},[936,941],{"type":20,"tag":80,"props":937,"children":938},{},[939],{"type":26,"value":940},"默认模式是最安全、最通用的起点",{"type":20,"tag":380,"props":942,"children":943},{},[944,949,954],{"type":20,"tag":384,"props":945,"children":946},{},[947],{"type":26,"value":948},"探索性工作：默认模式",{"type":20,"tag":384,"props":950,"children":951},{},[952],{"type":26,"value":953},"诊断性工作：默认模式",{"type":20,"tag":384,"props":955,"children":956},{},[957],{"type":26,"value":958},"不确定用什么模式：默认模式",{"type":20,"tag":384,"props":960,"children":961},{},[962,967],{"type":20,"tag":80,"props":963,"children":964},{},[965],{"type":26,"value":966},"Plan Mode 只适合“纯规划”场景",{"type":20,"tag":380,"props":968,"children":969},{},[970,975],{"type":20,"tag":384,"props":971,"children":972},{},[973],{"type":26,"value":974},"架构评审、迁移计划、风险评估",{"type":20,"tag":384,"props":976,"children":977},{},[978],{"type":26,"value":979},"任何需要“动手”的工作（包括加日志、运行测试）都不适合",{"type":20,"tag":384,"props":981,"children":982},{},[983,988],{"type":20,"tag":80,"props":984,"children":985},{},[986],{"type":26,"value":987},"Auto Mode 是熟练用户的效率之选",{"type":20,"tag":380,"props":989,"children":990},{},[991,996],{"type":20,"tag":384,"props":992,"children":993},{},[994],{"type":26,"value":995},"AI 会根据任务复杂度自动判断是否需要确认",{"type":20,"tag":384,"props":997,"children":998},{},[999],{"type":26,"value":1000},"探索性对话会自动保持谨慎，简单任务会直接执行",{"type":20,"tag":384,"props":1002,"children":1003},{},[1004,1009],{"type":20,"tag":80,"props":1005,"children":1006},{},[1007],{"type":26,"value":1008},"Accept Edits Mode 需要充分信任",{"type":20,"tag":380,"props":1010,"children":1011},{},[1012,1017],{"type":20,"tag":384,"props":1013,"children":1014},{},[1015],{"type":26,"value":1016},"仅适合根因明确、方案清晰、风险可控的场景",{"type":20,"tag":384,"props":1018,"children":1019},{},[1020],{"type":26,"value":1021},"绝不要在调试早期或需求模糊时使用",{"type":20,"tag":214,"props":1023,"children":1024},{},[],{"type":20,"tag":28,"props":1026,"children":1028},{"id":1027},"六实际操作示例",[1029],{"type":26,"value":1030},"六、实际操作示例",{"type":20,"tag":224,"props":1032,"children":1034},{"id":1033},"示例-1brainstorming-新功能",[1035],{"type":26,"value":1036},"示例 1：Brainstorming 新功能",{"type":20,"tag":200,"props":1038,"children":1039},{},[1040],{"type":26,"value":1041},"bash",{"type":20,"tag":776,"props":1043,"children":1046},{"className":1044,"code":1045,"language":26},[779],"$ claude\n# 左下角显示: ? for shortcuts\n\n> 我想给电商网站加一个“猜你喜欢”功能，帮我 brainstorm 一下\n# AI 会通过提问引导你思考：数据来源、算法选择、展示位置、冷启动问题等\n",[1047],{"type":20,"tag":89,"props":1048,"children":1049},{"__ignoreMap":784},[1050],{"type":26,"value":1045},{"type":20,"tag":224,"props":1052,"children":1054},{"id":1053},"示例-2systematic-debugging-完整流程",[1055],{"type":26,"value":1056},"示例 2：Systematic Debugging 完整流程",{"type":20,"tag":200,"props":1058,"children":1059},{},[1060],{"type":26,"value":1041},{"type":20,"tag":776,"props":1062,"children":1065},{"className":1063,"code":1064,"language":26},[779],"$ claude\n# 左下角显示: ? for shortcuts\n\n> 运行 npm run build 报错 TypeError: Cannot read properties of undefined...\n# AI 自动激活 Systematic Debugging 技能，按 Phase 1→2→3→4 执行\n\n# Phase 4 时可临时切换提高效率\nShift+Tab   # 切换到 Auto Mode 或 Accept Edits\n",[1066],{"type":20,"tag":89,"props":1067,"children":1068},{"__ignoreMap":784},[1069],{"type":26,"value":1064},{"type":20,"tag":224,"props":1071,"children":1073},{"id":1072},"示例-3需要只读评审时切换到-plan-mode",[1074],{"type":26,"value":1075},"示例 3：需要只读评审时切换到 Plan Mode",{"type":20,"tag":200,"props":1077,"children":1078},{},[1079],{"type":26,"value":1041},{"type":20,"tag":776,"props":1081,"children":1084},{"className":1082,"code":1083,"language":26},[779],"# 调试到 Phase 3，发现需要重构核心模块\nShift+Tab   # 切换到 ⏸ plan mode on\n\n> 帮我生成一个 ProductList 组件的重构计划，先不要改代码\n# AI 生成只读计划，风险评估，依赖分析\n\nShift+Tab   # 切回默认模式开始执行\n",[1085],{"type":20,"tag":89,"props":1086,"children":1087},{"__ignoreMap":784},[1088],{"type":26,"value":1083},{"type":20,"tag":214,"props":1090,"children":1091},{},[],{"type":20,"tag":28,"props":1093,"children":1095},{"id":1094},"七常见误区",[1096],{"type":26,"value":1097},"七、常见误区",{"type":20,"tag":35,"props":1099,"children":1100},{},[1101,1117],{"type":20,"tag":39,"props":1102,"children":1103},{},[1104],{"type":20,"tag":43,"props":1105,"children":1106},{},[1107,1112],{"type":20,"tag":47,"props":1108,"children":1109},{"align":49},[1110],{"type":26,"value":1111},"误区",{"type":20,"tag":47,"props":1113,"children":1114},{"align":49},[1115],{"type":26,"value":1116},"正确理解",{"type":20,"tag":69,"props":1118,"children":1119},{},[1120,1133,1146,1159],{"type":20,"tag":43,"props":1121,"children":1122},{},[1123,1128],{"type":20,"tag":76,"props":1124,"children":1125},{"align":49},[1126],{"type":26,"value":1127},"“Brainstorming 应该在 Plan Mode 下做”",{"type":20,"tag":76,"props":1129,"children":1130},{"align":49},[1131],{"type":26,"value":1132},"❌ Plan Mode 是只读规划，不能执行探索性对话所需的快速原型验证",{"type":20,"tag":43,"props":1134,"children":1135},{},[1136,1141],{"type":20,"tag":76,"props":1137,"children":1138},{"align":49},[1139],{"type":26,"value":1140},"“调试时用 Plan Mode 更安全”",{"type":20,"tag":76,"props":1142,"children":1143},{"align":49},[1144],{"type":26,"value":1145},"❌ 调试需要加日志、跑测试、执行命令，Plan Mode 的只读约束反而阻碍调试",{"type":20,"tag":43,"props":1147,"children":1148},{},[1149,1154],{"type":20,"tag":76,"props":1150,"children":1151},{"align":49},[1152],{"type":26,"value":1153},"“Auto Mode 会自动选择最优模式”",{"type":20,"tag":76,"props":1155,"children":1156},{"align":49},[1157],{"type":26,"value":1158},"⚠️ Auto Mode 只在“是否确认”上做判断，不会自动切换四种模式",{"type":20,"tag":43,"props":1160,"children":1161},{},[1162,1167],{"type":20,"tag":76,"props":1163,"children":1164},{"align":49},[1165],{"type":26,"value":1166},"“Accept Edits 适用于所有编码任务”",{"type":20,"tag":76,"props":1168,"children":1169},{"align":49},[1170],{"type":26,"value":1171},"❌ 仅适合根因明确、风险可控的场景，调试早期绝对禁用",{"type":20,"tag":214,"props":1173,"children":1174},{},[],1787799115492]