[{"data":1,"prerenderedAt":4295},["ShallowReactive",2],{"article-/topics/ai/ai-agent-plan-drift-replanning-triggers":3,"related-ai":854,"content-query-sPDEl3fIrl":3621},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":12,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":22,"_type":848,"_id":849,"_source":850,"_file":851,"_stem":852,"_extension":853},"/topics/ai/ai-agent-plan-drift-replanning-triggers","ai",false,"","AI agent Plan Drift 检测与再规划触发：什么时候继续执行，什么时候必须停下重做计划","AI agent 的计划在真实环境里会持续漂移。本文讲清 drift signal、继续执行阈值、局部再规划与整链重算触发，避免系统拿旧计划硬闯新现实。","2026-05-10","HTMLPAGE 团队",[13,14,15,16],"AI agent","plan drift","replanning","工程实践","/images/articles/ai-agent-plan-drift-replanning-triggers-featured.jpg","project planning adjustment whiteboard laptop",15505438,"https://www.pexels.com/photo/laptop-on-conference-table-15505438/",20,{"type":23,"children":24,"toc":834},"root",[25,33,38,75,82,169,174,180,185,210,215,221,226,239,252,257,266,271,277,282,356,361,367,372,395,400,409,414,419,428,433,439,444,457,462,467,546,551,557,562,662,667,673,678,683,689,788,793,798,803],{"type":26,"tag":27,"props":28,"children":29},"element","p",{},[30],{"type":31,"value":32},"text","很多 AI agent 系统在生成计划那一刻看起来都很聪明，真正的问题出在后面：任务还没执行完，世界已经变了。用户改目标、依赖返回空结果、证据过期、权限范围调整、人工审批意见改变，这些都会让原计划逐步失效。",{"type":26,"tag":27,"props":34,"children":35},{},[36],{"type":31,"value":37},"如果系统没有 drift 检测和再规划触发，最常见的结果不是彻底失败，而是拿着一份已经不适用的旧计划继续往下做，最后把本来可以及时收口的问题变成更大返工。",{"type":26,"tag":27,"props":39,"children":40},{},[41,43,50,52,58,59,65,67,73],{"type":31,"value":42},"建议先结合 ",{"type":26,"tag":44,"props":45,"children":47},"a",{"href":46},"/topics/ai/ai-agent-state-machine-design-guide",[48],{"type":31,"value":49},"AI Agent 状态机设计指南",{"type":31,"value":51},"、",{"type":26,"tag":44,"props":53,"children":55},{"href":54},"/topics/ai/ai-agent-checkpoint-resume-recovery",[56],{"type":31,"value":57},"AI agent Checkpoint 与断点恢复",{"type":31,"value":51},{"type":26,"tag":44,"props":60,"children":62},{"href":61},"/topics/ai/ai-agent-artifact-design-intermediate-output",[63],{"type":31,"value":64},"AI agent Artifact 设计",{"type":31,"value":66}," 和 ",{"type":26,"tag":44,"props":68,"children":70},{"href":69},"/topics/ai/ai-agent-evidence-provenance-trust-scoring",[71],{"type":31,"value":72},"AI agent 证据来源与可信度分层",{"type":31,"value":74}," 一起看。",{"type":26,"tag":76,"props":77,"children":79},"h2",{"id":78},"先给结论发现-drift-后先分三类不要一律重做计划",[80],{"type":31,"value":81},"先给结论：发现 drift 后先分三类，不要一律重做计划",{"type":26,"tag":83,"props":84,"children":85},"table",{},[86,110],{"type":26,"tag":87,"props":88,"children":89},"thead",{},[90],{"type":26,"tag":91,"props":92,"children":93},"tr",{},[94,100,105],{"type":26,"tag":95,"props":96,"children":97},"th",{},[98],{"type":31,"value":99},"漂移类型",{"type":26,"tag":95,"props":101,"children":102},{},[103],{"type":31,"value":104},"典型例子",{"type":26,"tag":95,"props":106,"children":107},{},[108],{"type":31,"value":109},"推荐动作",{"type":26,"tag":111,"props":112,"children":113},"tbody",{},[114,133,151],{"type":26,"tag":91,"props":115,"children":116},{},[117,123,128],{"type":26,"tag":118,"props":119,"children":120},"td",{},[121],{"type":31,"value":122},"轻微 drift",{"type":26,"tag":118,"props":124,"children":125},{},[126],{"type":31,"value":127},"某条 evidence 失效，但主目标不变",{"type":26,"tag":118,"props":129,"children":130},{},[131],{"type":31,"value":132},"局部替换证据",{"type":26,"tag":91,"props":134,"children":135},{},[136,141,146],{"type":26,"tag":118,"props":137,"children":138},{},[139],{"type":31,"value":140},"结构 drift",{"type":26,"tag":118,"props":142,"children":143},{},[144],{"type":31,"value":145},"某个关键步骤不再可行",{"type":26,"tag":118,"props":147,"children":148},{},[149],{"type":31,"value":150},"局部再规划",{"type":26,"tag":91,"props":152,"children":153},{},[154,159,164],{"type":26,"tag":118,"props":155,"children":156},{},[157],{"type":31,"value":158},"目标 drift",{"type":26,"tag":118,"props":160,"children":161},{},[162],{"type":31,"value":163},"用户目标或业务约束已变",{"type":26,"tag":118,"props":165,"children":166},{},[167],{"type":31,"value":168},"整链重做计划",{"type":26,"tag":27,"props":170,"children":171},{},[172],{"type":31,"value":173},"只要系统把所有 drift 都当成“重新规划一下”，计划成本会失控；反过来如果从不重规划，旧计划又会持续污染执行链。",{"type":26,"tag":76,"props":175,"children":177},{"id":176},"一先定义哪些信号属于-drift而不是普通噪音",[178],{"type":31,"value":179},"一、先定义哪些信号属于 drift，而不是普通噪音",{"type":26,"tag":27,"props":181,"children":182},{},[183],{"type":31,"value":184},"更有用的 drift signal 通常包括：",{"type":26,"tag":186,"props":187,"children":188},"ul",{},[189,195,200,205],{"type":26,"tag":190,"props":191,"children":192},"li",{},[193],{"type":31,"value":194},"关键 evidence 过期或冲突",{"type":26,"tag":190,"props":196,"children":197},{},[198],{"type":31,"value":199},"某一步工具结果和原计划前提不一致",{"type":26,"tag":190,"props":201,"children":202},{},[203],{"type":31,"value":204},"用户明确修改目标或约束",{"type":26,"tag":190,"props":206,"children":207},{},[208],{"type":31,"value":209},"权限、预算、deadline 明显变化",{"type":26,"tag":27,"props":211,"children":212},{},[213],{"type":31,"value":214},"而不是所有小误差都算 drift。否则系统会频繁重规划，执行效率比人工还差。",{"type":26,"tag":76,"props":216,"children":218},{"id":217},"二再规划触发最好显式记录原因不要只跳回-plan",[219],{"type":31,"value":220},"二、再规划触发最好显式记录原因，不要只跳回 PLAN",{"type":26,"tag":27,"props":222,"children":223},{},[224],{"type":31,"value":225},"更稳的做法，是把 replan request 写成结构化事件：",{"type":26,"tag":227,"props":228,"children":233},"pre",{"className":229,"code":231,"language":232,"meta":7},[230],"language-json","{\n  \"runId\": \"run_123\",\n  \"currentPlanVersion\": 3,\n  \"trigger\": \"evidence_conflict\",\n  \"scope\": \"partial\",\n  \"affectedSteps\": [\"validate_vendor_policy\"]\n}\n","json",[234],{"type":26,"tag":235,"props":236,"children":237},"code",{"__ignoreMap":7},[238],{"type":31,"value":231},{"type":26,"tag":27,"props":240,"children":241},{},[242,244,250],{"type":31,"value":243},"这样系统和人工都能知道：为什么重规划、重规划打算影响哪一段，而不是只看到状态突然回到 ",{"type":26,"tag":235,"props":245,"children":247},{"className":246},[],[248],{"type":31,"value":249},"PLAN",{"type":31,"value":251},"。",{"type":26,"tag":27,"props":253,"children":254},{},[255],{"type":31,"value":256},"如果要让再规划可复盘，这份 request 最好还带信号强度和预期动作：",{"type":26,"tag":227,"props":258,"children":261},{"className":259,"code":260,"language":232,"meta":7},[230],"{\n  \"signalStrength\": \"hard\",\n  \"continueAllowed\": false,\n  \"replanBudgetMs\": 4000,\n  \"requiredOutcome\": \"new_plan_version\"\n}\n",[262],{"type":26,"tag":235,"props":263,"children":264},{"__ignoreMap":7},[265],{"type":31,"value":260},{"type":26,"tag":27,"props":267,"children":268},{},[269],{"type":31,"value":270},"这样系统不是只会说“该 replan 了”，而是明确说明为什么当前链路不能继续，以及这次再规划允许消耗多少额外预算。",{"type":26,"tag":76,"props":272,"children":274},{"id":273},"三局部再规划比整链重算更常见但必须先知道影响范围",[275],{"type":31,"value":276},"三、局部再规划比整链重算更常见，但必须先知道影响范围",{"type":26,"tag":27,"props":278,"children":279},{},[280],{"type":31,"value":281},"一个简单但有效的判断法是：",{"type":26,"tag":83,"props":283,"children":284},{},[285,301],{"type":26,"tag":87,"props":286,"children":287},{},[288],{"type":26,"tag":91,"props":289,"children":290},{},[291,296],{"type":26,"tag":95,"props":292,"children":293},{},[294],{"type":31,"value":295},"问题",{"type":26,"tag":95,"props":297,"children":298},{},[299],{"type":31,"value":300},"如果答案是“是”",{"type":26,"tag":111,"props":302,"children":303},{},[304,317,330,343],{"type":26,"tag":91,"props":305,"children":306},{},[307,312],{"type":26,"tag":118,"props":308,"children":309},{},[310],{"type":31,"value":311},"原目标变了吗",{"type":26,"tag":118,"props":313,"children":314},{},[315],{"type":31,"value":316},"倾向整链重做",{"type":26,"tag":91,"props":318,"children":319},{},[320,325],{"type":26,"tag":118,"props":321,"children":322},{},[323],{"type":31,"value":324},"只是某个前提失效了吗",{"type":26,"tag":118,"props":326,"children":327},{},[328],{"type":31,"value":329},"倾向局部再规划",{"type":26,"tag":91,"props":331,"children":332},{},[333,338],{"type":26,"tag":118,"props":334,"children":335},{},[336],{"type":31,"value":337},"已完成步骤还能复用吗",{"type":26,"tag":118,"props":339,"children":340},{},[341],{"type":31,"value":342},"尽量保留已有 artifact",{"type":26,"tag":91,"props":344,"children":345},{},[346,351],{"type":26,"tag":118,"props":347,"children":348},{},[349],{"type":31,"value":350},"副作用已经发生了吗",{"type":26,"tag":118,"props":352,"children":353},{},[354],{"type":31,"value":355},"不能简单回滚重来",{"type":26,"tag":27,"props":357,"children":358},{},[359],{"type":31,"value":360},"这也是为什么 drift 判断一定要和 artifact、ledger 一起看，而不是只靠当前 prompt 内容。",{"type":26,"tag":76,"props":362,"children":364},{"id":363},"四计划版本要显式化否则再规划后很难复盘",[365],{"type":31,"value":366},"四、计划版本要显式化，否则再规划后很难复盘",{"type":26,"tag":27,"props":368,"children":369},{},[370],{"type":31,"value":371},"如果系统会多次调整计划，就应该明确记录：",{"type":26,"tag":186,"props":373,"children":374},{},[375,380,385,390],{"type":26,"tag":190,"props":376,"children":377},{},[378],{"type":31,"value":379},"plan version",{"type":26,"tag":190,"props":381,"children":382},{},[383],{"type":31,"value":384},"replan trigger",{"type":26,"tag":190,"props":386,"children":387},{},[388],{"type":31,"value":389},"replaced steps",{"type":26,"tag":190,"props":391,"children":392},{},[393],{"type":31,"value":394},"still valid artifacts",{"type":26,"tag":27,"props":396,"children":397},{},[398],{"type":31,"value":399},"例如：",{"type":26,"tag":227,"props":401,"children":404},{"className":402,"code":403,"language":232,"meta":7},[230],"{\n  \"planVersion\": 4,\n  \"supersedes\": 3,\n  \"reason\": \"deadline_budget_changed\",\n  \"retainedArtifacts\": [\"evidence_011\", \"draft_004\"]\n}\n",[405],{"type":26,"tag":235,"props":406,"children":407},{"__ignoreMap":7},[408],{"type":31,"value":403},{"type":26,"tag":27,"props":410,"children":411},{},[412],{"type":31,"value":413},"没有 plan version，团队后面只会知道“系统改过计划”，却不知道到底改了几次、每次为什么改。",{"type":26,"tag":27,"props":415,"children":416},{},[417],{"type":31,"value":418},"在工程上，新的计划版本最好还带一份 plan diff，明确哪些东西保留、哪些东西被替换：",{"type":26,"tag":227,"props":420,"children":423},{"className":421,"code":422,"language":232,"meta":7},[230],"{\n  \"planDiff\": {\n    \"replacedSteps\": [\"vendor_lookup\"],\n    \"retainedSteps\": [\"policy_validate\"],\n    \"retainedArtifacts\": [\"evidence_011\"]\n  }\n}\n",[424],{"type":26,"tag":235,"props":425,"children":426},{"__ignoreMap":7},[427],{"type":31,"value":422},{"type":26,"tag":27,"props":429,"children":430},{},[431],{"type":31,"value":432},"这会让 replan 之后的执行者不必重新猜“旧链路里还有哪些东西能继续用”。",{"type":26,"tag":76,"props":434,"children":436},{"id":435},"五drift-检测也要防止系统过度敏感",[437],{"type":31,"value":438},"五、drift 检测也要防止系统过度敏感",{"type":26,"tag":27,"props":440,"children":441},{},[442],{"type":31,"value":443},"另一类常见问题是：系统太容易触发 replan，最后每走一步都在回到 PLAN。避免这一点的关键通常有两个：",{"type":26,"tag":186,"props":445,"children":446},{},[447,452],{"type":26,"tag":190,"props":448,"children":449},{},[450],{"type":31,"value":451},"先定义硬触发信号和软触发信号",{"type":26,"tag":190,"props":453,"children":454},{},[455],{"type":31,"value":456},"对软触发信号设置阈值，例如连续两次证据不一致才重规划",{"type":26,"tag":27,"props":458,"children":459},{},[460],{"type":31,"value":461},"系统不是越敏感越好，而是越能稳定判断“现在真的有必要改路”越好。",{"type":26,"tag":27,"props":463,"children":464},{},[465],{"type":31,"value":466},"一个更实用的分层通常长这样：",{"type":26,"tag":83,"props":468,"children":469},{},[470,490],{"type":26,"tag":87,"props":471,"children":472},{},[473],{"type":26,"tag":91,"props":474,"children":475},{},[476,481,486],{"type":26,"tag":95,"props":477,"children":478},{},[479],{"type":31,"value":480},"触发级别",{"type":26,"tag":95,"props":482,"children":483},{},[484],{"type":31,"value":485},"典型信号",{"type":26,"tag":95,"props":487,"children":488},{},[489],{"type":31,"value":109},{"type":26,"tag":111,"props":491,"children":492},{},[493,511,528],{"type":26,"tag":91,"props":494,"children":495},{},[496,501,506],{"type":26,"tag":118,"props":497,"children":498},{},[499],{"type":31,"value":500},"hard trigger",{"type":26,"tag":118,"props":502,"children":503},{},[504],{"type":31,"value":505},"目标改变、权限失效、副作用冲突",{"type":26,"tag":118,"props":507,"children":508},{},[509],{"type":31,"value":510},"立即停止旧计划",{"type":26,"tag":91,"props":512,"children":513},{},[514,519,524],{"type":26,"tag":118,"props":515,"children":516},{},[517],{"type":31,"value":518},"medium trigger",{"type":26,"tag":118,"props":520,"children":521},{},[522],{"type":31,"value":523},"关键证据冲突、关键步骤失败",{"type":26,"tag":118,"props":525,"children":526},{},[527],{"type":31,"value":150},{"type":26,"tag":91,"props":529,"children":530},{},[531,536,541],{"type":26,"tag":118,"props":532,"children":533},{},[534],{"type":31,"value":535},"soft trigger",{"type":26,"tag":118,"props":537,"children":538},{},[539],{"type":31,"value":540},"非关键证据波动、轻微预算变化",{"type":26,"tag":118,"props":542,"children":543},{},[544],{"type":31,"value":545},"继续观察或阈值累计",{"type":26,"tag":27,"props":547,"children":548},{},[549],{"type":31,"value":550},"只有把这层写清楚，系统才不会因为一点小波动就进入 replan loop。",{"type":26,"tag":76,"props":552,"children":554},{"id":553},"六上线后要看-drift-对-accepted-run-的真实影响",[555],{"type":31,"value":556},"六、上线后要看 drift 对 accepted run 的真实影响",{"type":26,"tag":27,"props":558,"children":559},{},[560],{"type":31,"value":561},"建议至少记录：",{"type":26,"tag":83,"props":563,"children":564},{},[565,581],{"type":26,"tag":87,"props":566,"children":567},{},[568],{"type":26,"tag":91,"props":569,"children":570},{},[571,576],{"type":26,"tag":95,"props":572,"children":573},{},[574],{"type":31,"value":575},"指标",{"type":26,"tag":95,"props":577,"children":578},{},[579],{"type":31,"value":580},"用途",{"type":26,"tag":111,"props":582,"children":583},{},[584,597,610,623,636,649],{"type":26,"tag":91,"props":585,"children":586},{},[587,592],{"type":26,"tag":118,"props":588,"children":589},{},[590],{"type":31,"value":591},"replan trigger rate",{"type":26,"tag":118,"props":593,"children":594},{},[595],{"type":31,"value":596},"看系统是否经常遇到计划漂移",{"type":26,"tag":91,"props":598,"children":599},{},[600,605],{"type":26,"tag":118,"props":601,"children":602},{},[603],{"type":31,"value":604},"partial vs full replan ratio",{"type":26,"tag":118,"props":606,"children":607},{},[608],{"type":31,"value":609},"看计划粒度是否合理",{"type":26,"tag":91,"props":611,"children":612},{},[613,618],{"type":26,"tag":118,"props":614,"children":615},{},[616],{"type":31,"value":617},"accepted run after replan",{"type":26,"tag":118,"props":619,"children":620},{},[621],{"type":31,"value":622},"看重规划是否真的挽回结果",{"type":26,"tag":91,"props":624,"children":625},{},[626,631],{"type":26,"tag":118,"props":627,"children":628},{},[629],{"type":31,"value":630},"artifact reuse after replan",{"type":26,"tag":118,"props":632,"children":633},{},[634],{"type":31,"value":635},"看再规划是否有效复用了已有产物",{"type":26,"tag":91,"props":637,"children":638},{},[639,644],{"type":26,"tag":118,"props":640,"children":641},{},[642],{"type":31,"value":643},"replan loop count",{"type":26,"tag":118,"props":645,"children":646},{},[647],{"type":31,"value":648},"看系统是否在短时间内反复重规划",{"type":26,"tag":91,"props":650,"children":651},{},[652,657],{"type":26,"tag":118,"props":653,"children":654},{},[655],{"type":31,"value":656},"false-positive drift rate",{"type":26,"tag":118,"props":658,"children":659},{},[660],{"type":31,"value":661},"看系统是否过度敏感",{"type":26,"tag":27,"props":663,"children":664},{},[665],{"type":31,"value":666},"如果 replan rate 很高，但 accepted run 没提高，说明 drift 检测可能只是引入了额外复杂度。",{"type":26,"tag":76,"props":668,"children":670},{"id":669},"七失败案例用户目标已经改了agent-还在执行旧计划",[671],{"type":31,"value":672},"七、失败案例：用户目标已经改了，Agent 还在执行旧计划",{"type":26,"tag":27,"props":674,"children":675},{},[676],{"type":31,"value":677},"某个内容 agent 先生成“官网首页方案”，用户随后补充要求改成“招聘页 + 表单收集”。系统虽然记录了新消息，但原计划没有被判为目标 drift，后续继续基于旧计划生成首页模块，最后整条链都要返工。",{"type":26,"tag":27,"props":679,"children":680},{},[681],{"type":31,"value":682},"修复后，团队把“目标字段改变”和“输出类型改变”列为硬触发信号，只要命中就停止旧计划并重建 plan version，返工量明显下降。",{"type":26,"tag":76,"props":684,"children":686},{"id":685},"八plan-drift-与再规划-checklist",[687],{"type":31,"value":688},"八、Plan Drift 与再规划 Checklist",{"type":26,"tag":186,"props":690,"children":693},{"className":691},[692],"contains-task-list",[694,707,716,725,734,743,752,761,770,779],{"type":26,"tag":190,"props":695,"children":698},{"className":696},[697],"task-list-item",[699,705],{"type":26,"tag":700,"props":701,"children":704},"input",{"disabled":702,"type":703},true,"checkbox",[],{"type":31,"value":706}," 是否定义了明确的 drift signal，而不是所有误差都算漂移",{"type":26,"tag":190,"props":708,"children":710},{"className":709},[697],[711,714],{"type":26,"tag":700,"props":712,"children":713},{"disabled":702,"type":703},[],{"type":31,"value":715}," 再规划触发是否被结构化记录，而不是简单回到 PLAN",{"type":26,"tag":190,"props":717,"children":719},{"className":718},[697],[720,723],{"type":26,"tag":700,"props":721,"children":722},{"disabled":702,"type":703},[],{"type":31,"value":724}," 是否区分 hard / medium / soft trigger 级别",{"type":26,"tag":190,"props":726,"children":728},{"className":727},[697],[729,732],{"type":26,"tag":700,"props":730,"children":731},{"disabled":702,"type":703},[],{"type":31,"value":733}," 是否区分局部再规划和整链重做",{"type":26,"tag":190,"props":735,"children":737},{"className":736},[697],[738,741],{"type":26,"tag":700,"props":739,"children":740},{"disabled":702,"type":703},[],{"type":31,"value":742}," 计划版本是否显式可追溯",{"type":26,"tag":190,"props":744,"children":746},{"className":745},[697],[747,750],{"type":26,"tag":700,"props":748,"children":749},{"disabled":702,"type":703},[],{"type":31,"value":751}," 新计划是否带 supersedes、planDiff 和 retainedArtifacts",{"type":26,"tag":190,"props":753,"children":755},{"className":754},[697],[756,759],{"type":26,"tag":700,"props":757,"children":758},{"disabled":702,"type":703},[],{"type":31,"value":760}," 是否保留可复用 artifact，而不是每次都从零开始",{"type":26,"tag":190,"props":762,"children":764},{"className":763},[697],[765,768],{"type":26,"tag":700,"props":766,"children":767},{"disabled":702,"type":703},[],{"type":31,"value":769}," replan 是否有独立预算，避免无限重算",{"type":26,"tag":190,"props":771,"children":773},{"className":772},[697],[774,777],{"type":26,"tag":700,"props":775,"children":776},{"disabled":702,"type":703},[],{"type":31,"value":778}," 是否为软触发信号设置阈值，避免过度敏感",{"type":26,"tag":190,"props":780,"children":782},{"className":781},[697],[783,786],{"type":26,"tag":700,"props":784,"children":785},{"disabled":702,"type":703},[],{"type":31,"value":787}," 是否监控 replan 后 accepted run 的真实改善",{"type":26,"tag":76,"props":789,"children":791},{"id":790},"结语",[792],{"type":31,"value":790},{"type":26,"tag":27,"props":794,"children":795},{},[796],{"type":31,"value":797},"AI agent 的计划不是一份生成后永远有效的文档，而是一条会随着证据、约束和外部状态持续漂移的执行协议。真正成熟的系统，不是从不重规划，而是知道什么时候该继续、什么时候该局部修补、什么时候必须果断停下重来。",{"type":26,"tag":27,"props":799,"children":800},{},[801],{"type":31,"value":802},"延伸阅读：",{"type":26,"tag":186,"props":804,"children":805},{},[806,813,820,827],{"type":26,"tag":190,"props":807,"children":808},{},[809],{"type":26,"tag":44,"props":810,"children":811},{"href":46},[812],{"type":31,"value":49},{"type":26,"tag":190,"props":814,"children":815},{},[816],{"type":26,"tag":44,"props":817,"children":818},{"href":54},[819],{"type":31,"value":57},{"type":26,"tag":190,"props":821,"children":822},{},[823],{"type":26,"tag":44,"props":824,"children":825},{"href":61},[826],{"type":31,"value":64},{"type":26,"tag":190,"props":828,"children":829},{},[830],{"type":26,"tag":44,"props":831,"children":832},{"href":69},[833],{"type":31,"value":72},{"title":7,"searchDepth":835,"depth":835,"links":836},3,[837,839,840,841,842,843,844,845,846,847],{"id":78,"depth":838,"text":81},2,{"id":176,"depth":838,"text":179},{"id":217,"depth":838,"text":220},{"id":273,"depth":838,"text":276},{"id":363,"depth":838,"text":366},{"id":435,"depth":838,"text":438},{"id":553,"depth":838,"text":556},{"id":669,"depth":838,"text":672},{"id":685,"depth":838,"text":688},{"id":790,"depth":838,"text":790},"markdown","content:topics:ai:ai-agent-plan-drift-replanning-triggers.md","content","topics/ai/ai-agent-plan-drift-replanning-triggers.md","topics/ai/ai-agent-plan-drift-replanning-triggers","md",[855,2009,2959],{"_path":856,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":857,"description":858,"date":859,"topic":5,"author":11,"tags":860,"image":866,"imageAlt":867,"pexelsPhotoId":868,"pexelsUrl":869,"readingTime":870,"body":871,"_type":848,"_id":2006,"_source":850,"_file":2007,"_stem":2008,"_extension":853},"/topics/ai/cursor-keyboard-shortcuts-cheatsheet","Cursor 快捷键速查表（macOS/Windows）：从“会用”到“能提效”的 10 个工作流","把 Cursor 常用快捷键按任务分组（查代码、改代码、多文件、对话、审查与回滚），给出可直接照抄的工作流与最小回归清单，避免“快捷键背了也没变快”。","2026-03-02",[861,862,863,864,865],"Cursor","快捷键","AI IDE","VS Code","开发效率","/images/topics/ai/cursor-keyboard-shortcuts-cheatsheet.jpg","彩色机械键盘与鼠标的工作台面",34563105,"https://www.pexels.com/photo/colorful-mechanical-keyboard-and-mouse-setup-34563105/",12,{"type":23,"children":872,"toc":1980},[873,878,896,901,930,935,971,975,981,986,1019,1024,1047,1050,1056,1061,1279,1288,1291,1297,1304,1323,1331,1352,1357,1363,1378,1409,1414,1427,1433,1452,1470,1478,1483,1489,1494,1515,1523,1529,1534,1557,1562,1568,1581,1587,1605,1623,1629,1640,1658,1664,1675,1681,1686,1729,1732,1738,1746,1799,1802,1808,1814,1819,1824,1847,1864,1869,1894,1897,1903,1909,1914,1920,1925,1931,1936,1939,1945],{"type":26,"tag":27,"props":874,"children":875},{},[876],{"type":31,"value":877},"如果你在搜“Cursor 快捷键”，你大概率不是想背一张表，而是想解决这类问题：",{"type":26,"tag":186,"props":879,"children":880},{},[881,886,891],{"type":26,"tag":190,"props":882,"children":883},{},[884],{"type":31,"value":885},"为什么我用了 AI，还是很慢？（对话来回太多、改动不可控）",{"type":26,"tag":190,"props":887,"children":888},{},[889],{"type":31,"value":890},"为什么它“看起来懂了”，却改错文件/改出回归？（上下文与范围没锁住）",{"type":26,"tag":190,"props":892,"children":893},{},[894],{"type":31,"value":895},"多文件改动怎么做得安全？（验收、回滚、最小回归集）",{"type":26,"tag":27,"props":897,"children":898},{},[899],{"type":31,"value":900},"这篇文章给你两份东西：",{"type":26,"tag":902,"props":903,"children":904},"ol",{},[905,918],{"type":26,"tag":190,"props":906,"children":907},{},[908,910,916],{"type":31,"value":909},"一张",{"type":26,"tag":911,"props":912,"children":913},"strong",{},[914],{"type":31,"value":915},"按任务分组",{"type":31,"value":917},"的快捷键表（不是按功能堆在一起）",{"type":26,"tag":190,"props":919,"children":920},{},[921,923,928],{"type":31,"value":922},"一套“从需求到落地”的",{"type":26,"tag":911,"props":924,"children":925},{},[926],{"type":31,"value":927},"最小闭环工作流",{"type":31,"value":929},"（每一步都有快捷键）",{"type":26,"tag":27,"props":931,"children":932},{},[933],{"type":31,"value":934},"想看系统玩法：",{"type":26,"tag":186,"props":936,"children":937},{},[938,949,960],{"type":26,"tag":190,"props":939,"children":940},{},[941,943],{"type":31,"value":942},"入门教程看：",{"type":26,"tag":44,"props":944,"children":946},{"href":945},"/topics/ai/cursor-tutorial",[947],{"type":31,"value":948},"Cursor 使用教程（2026）",{"type":26,"tag":190,"props":950,"children":951},{},[952,954],{"type":31,"value":953},"进阶玩法看：",{"type":26,"tag":44,"props":955,"children":957},{"href":956},"/topics/ai/cursor-editor-guide",[958],{"type":31,"value":959},"Cursor 编辑器深度玩法",{"type":26,"tag":190,"props":961,"children":962},{},[963,965],{"type":31,"value":964},"规则与忽略看：",{"type":26,"tag":44,"props":966,"children":968},{"href":967},"/topics/ai/cursor-rules-cursorrules",[969],{"type":31,"value":970},"Cursor Rules 与 .cursorrules",{"type":26,"tag":972,"props":973,"children":974},"hr",{},[],{"type":26,"tag":76,"props":976,"children":978},{"id":977},"先给结论提效不是按得快而是闭环更短",[979],{"type":31,"value":980},"先给结论：提效不是“按得快”，而是“闭环更短”",{"type":26,"tag":27,"props":982,"children":983},{},[984],{"type":31,"value":985},"你可以把 Cursor 的快捷键理解为 3 条流水线：",{"type":26,"tag":186,"props":987,"children":988},{},[989,999,1009],{"type":26,"tag":190,"props":990,"children":991},{},[992,997],{"type":26,"tag":911,"props":993,"children":994},{},[995],{"type":31,"value":996},"改一小段",{"type":31,"value":998},"（内联编辑）：把改动限制在一个函数/一段样式",{"type":26,"tag":190,"props":1000,"children":1001},{},[1002,1007],{"type":26,"tag":911,"props":1003,"children":1004},{},[1005],{"type":31,"value":1006},"改一组文件",{"type":31,"value":1008},"（Composer）：把改动限制在一组明确文件，并要求输出 diff + 验收点",{"type":26,"tag":190,"props":1010,"children":1011},{},[1012,1017],{"type":26,"tag":911,"props":1013,"children":1014},{},[1015],{"type":31,"value":1016},"聊清楚再动手",{"type":31,"value":1018},"（侧边对话）：先对齐目标、范围、验收、回滚",{"type":26,"tag":27,"props":1020,"children":1021},{},[1022],{"type":31,"value":1023},"当你觉得“它乱改/改太大”时，往往不是快捷键没记住，而是缺了两件事：",{"type":26,"tag":186,"props":1025,"children":1026},{},[1027,1037],{"type":26,"tag":190,"props":1028,"children":1029},{},[1030,1032],{"type":31,"value":1031},"没有在动手前锁定",{"type":26,"tag":911,"props":1033,"children":1034},{},[1035],{"type":31,"value":1036},"范围",{"type":26,"tag":190,"props":1038,"children":1039},{},[1040,1042],{"type":31,"value":1041},"没有在接受改动前准备",{"type":26,"tag":911,"props":1043,"children":1044},{},[1045],{"type":31,"value":1046},"验收/回滚",{"type":26,"tag":972,"props":1048,"children":1049},{},[],{"type":26,"tag":76,"props":1051,"children":1053},{"id":1052},"快捷键速查表按任务分组",[1054],{"type":31,"value":1055},"快捷键速查表（按任务分组）",{"type":26,"tag":27,"props":1057,"children":1058},{},[1059],{"type":31,"value":1060},"说明：下表按“你正在做什么”组织，而不是按“功能名字”组织。不同版本快捷键可能略有差异，但核心逻辑一致。",{"type":26,"tag":83,"props":1062,"children":1063},{},[1064,1090],{"type":26,"tag":87,"props":1065,"children":1066},{},[1067],{"type":26,"tag":91,"props":1068,"children":1069},{},[1070,1075,1080,1085],{"type":26,"tag":95,"props":1071,"children":1072},{},[1073],{"type":31,"value":1074},"任务",{"type":26,"tag":95,"props":1076,"children":1077},{},[1078],{"type":31,"value":1079},"macOS",{"type":26,"tag":95,"props":1081,"children":1082},{},[1083],{"type":31,"value":1084},"Windows",{"type":26,"tag":95,"props":1086,"children":1087},{},[1088],{"type":31,"value":1089},"你该在什么时候用",{"type":26,"tag":111,"props":1091,"children":1092},{},[1093,1124,1155,1186,1217,1248],{"type":26,"tag":91,"props":1094,"children":1095},{},[1096,1101,1110,1119],{"type":26,"tag":118,"props":1097,"children":1098},{},[1099],{"type":31,"value":1100},"改一小段（最安全）",{"type":26,"tag":118,"props":1102,"children":1103},{},[1104],{"type":26,"tag":235,"props":1105,"children":1107},{"className":1106},[],[1108],{"type":31,"value":1109},"Cmd + K",{"type":26,"tag":118,"props":1111,"children":1112},{},[1113],{"type":26,"tag":235,"props":1114,"children":1116},{"className":1115},[],[1117],{"type":31,"value":1118},"Ctrl + K",{"type":26,"tag":118,"props":1120,"children":1121},{},[1122],{"type":31,"value":1123},"只想改一个函数/一段 CSS，不想动别的",{"type":26,"tag":91,"props":1125,"children":1126},{},[1127,1132,1141,1150],{"type":26,"tag":118,"props":1128,"children":1129},{},[1130],{"type":31,"value":1131},"打开 AI 对话（先对齐再动手）",{"type":26,"tag":118,"props":1133,"children":1134},{},[1135],{"type":26,"tag":235,"props":1136,"children":1138},{"className":1137},[],[1139],{"type":31,"value":1140},"Cmd + L",{"type":26,"tag":118,"props":1142,"children":1143},{},[1144],{"type":26,"tag":235,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":31,"value":1149},"Ctrl + L",{"type":26,"tag":118,"props":1151,"children":1152},{},[1153],{"type":31,"value":1154},"需要澄清目标、制定步骤、给验收点",{"type":26,"tag":91,"props":1156,"children":1157},{},[1158,1163,1172,1181],{"type":26,"tag":118,"props":1159,"children":1160},{},[1161],{"type":31,"value":1162},"多文件编辑（有组织地改一组文件）",{"type":26,"tag":118,"props":1164,"children":1165},{},[1166],{"type":26,"tag":235,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":31,"value":1171},"Cmd + I",{"type":26,"tag":118,"props":1173,"children":1174},{},[1175],{"type":26,"tag":235,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":31,"value":1180},"Ctrl + I",{"type":26,"tag":118,"props":1182,"children":1183},{},[1184],{"type":31,"value":1185},"改动涉及多个文件：组件+样式+测试",{"type":26,"tag":91,"props":1187,"children":1188},{},[1189,1194,1203,1212],{"type":26,"tag":118,"props":1190,"children":1191},{},[1192],{"type":31,"value":1193},"把选中代码加入对话上下文",{"type":26,"tag":118,"props":1195,"children":1196},{},[1197],{"type":26,"tag":235,"props":1198,"children":1200},{"className":1199},[],[1201],{"type":31,"value":1202},"Cmd + Shift + L",{"type":26,"tag":118,"props":1204,"children":1205},{},[1206],{"type":26,"tag":235,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":31,"value":1211},"Ctrl + Shift + L",{"type":26,"tag":118,"props":1213,"children":1214},{},[1215],{"type":31,"value":1216},"让 AI 只看你选的片段（降低噪音）",{"type":26,"tag":91,"props":1218,"children":1219},{},[1220,1225,1234,1243],{"type":26,"tag":118,"props":1221,"children":1222},{},[1223],{"type":31,"value":1224},"接受当前建议",{"type":26,"tag":118,"props":1226,"children":1227},{},[1228],{"type":26,"tag":235,"props":1229,"children":1231},{"className":1230},[],[1232],{"type":31,"value":1233},"Cmd + Y",{"type":26,"tag":118,"props":1235,"children":1236},{},[1237],{"type":26,"tag":235,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":31,"value":1242},"Ctrl + Y",{"type":26,"tag":118,"props":1244,"children":1245},{},[1246],{"type":31,"value":1247},"你已经准备好验收/回滚，并确认改动范围",{"type":26,"tag":91,"props":1249,"children":1250},{},[1251,1256,1265,1274],{"type":26,"tag":118,"props":1252,"children":1253},{},[1254],{"type":31,"value":1255},"拒绝当前建议",{"type":26,"tag":118,"props":1257,"children":1258},{},[1259],{"type":26,"tag":235,"props":1260,"children":1262},{"className":1261},[],[1263],{"type":31,"value":1264},"Cmd + N",{"type":26,"tag":118,"props":1266,"children":1267},{},[1268],{"type":26,"tag":235,"props":1269,"children":1271},{"className":1270},[],[1272],{"type":31,"value":1273},"Ctrl + N",{"type":26,"tag":118,"props":1275,"children":1276},{},[1277],{"type":31,"value":1278},"改得太大、改错方向，立刻收手",{"type":26,"tag":1280,"props":1281,"children":1282},"blockquote",{},[1283],{"type":26,"tag":27,"props":1284,"children":1285},{},[1286],{"type":31,"value":1287},"小技巧：把“改一小段”当默认路径。只有当你能清晰写出“会改哪几类文件、怎么验收”时再进入多文件。",{"type":26,"tag":972,"props":1289,"children":1290},{},[],{"type":26,"tag":76,"props":1292,"children":1294},{"id":1293},"_10-个可直接照抄的提效工作流每个都能闭环",[1295],{"type":31,"value":1296},"10 个可直接照抄的提效工作流（每个都能闭环）",{"type":26,"tag":1298,"props":1299,"children":1301},"h3",{"id":1300},"工作流-1需求计划小步改新手最稳",[1302],{"type":31,"value":1303},"工作流 1：需求→计划→小步改（新手最稳）",{"type":26,"tag":902,"props":1305,"children":1306},{},[1307,1318],{"type":26,"tag":190,"props":1308,"children":1309},{},[1310,1316],{"type":26,"tag":235,"props":1311,"children":1313},{"className":1312},[],[1314],{"type":31,"value":1315},"Cmd/Ctrl + L",{"type":31,"value":1317}," 打开对话",{"type":26,"tag":190,"props":1319,"children":1320},{},[1321],{"type":31,"value":1322},"先发这段（可复制）：",{"type":26,"tag":1280,"props":1324,"children":1325},{},[1326],{"type":26,"tag":27,"props":1327,"children":1328},{},[1329],{"type":31,"value":1330},"目标：……\n范围：只修改以下文件/模块：……\n非目标：……（明确不做）\n验收：……（可测试/可手动检查）\n输出格式：先给计划，再逐步执行；每一步写出 diff 摘要。",{"type":26,"tag":902,"props":1332,"children":1333},{"start":835},[1334,1339],{"type":26,"tag":190,"props":1335,"children":1336},{},[1337],{"type":31,"value":1338},"让 AI 先给“计划（3~6 步）”，你确认后再执行",{"type":26,"tag":190,"props":1340,"children":1341},{},[1342,1344,1350],{"type":31,"value":1343},"任何一步涉及改代码：优先回到编辑区，选中片段用 ",{"type":26,"tag":235,"props":1345,"children":1347},{"className":1346},[],[1348],{"type":31,"value":1349},"Cmd/Ctrl + K",{"type":31,"value":1351}," 小步改",{"type":26,"tag":27,"props":1353,"children":1354},{},[1355],{"type":31,"value":1356},"为什么有效：你把“想法”变成了“可执行约束”，这就是 GEO（面向 AI/模型的可理解结构）。",{"type":26,"tag":1298,"props":1358,"children":1360},{"id":1359},"工作流-2只改一个函数高频低风险",[1361],{"type":31,"value":1362},"工作流 2：只改一个函数（高频、低风险）",{"type":26,"tag":186,"props":1364,"children":1365},{},[1366],{"type":26,"tag":190,"props":1367,"children":1368},{},[1369,1371,1376],{"type":31,"value":1370},"选中函数 → ",{"type":26,"tag":235,"props":1372,"children":1374},{"className":1373},[],[1375],{"type":31,"value":1349},{"type":31,"value":1377}," → 输入指令：",{"type":26,"tag":1280,"props":1379,"children":1380},{},[1381,1386],{"type":26,"tag":27,"props":1382,"children":1383},{},[1384],{"type":31,"value":1385},"把这段改成更可读：",{"type":26,"tag":186,"props":1387,"children":1388},{},[1389,1394,1399,1404],{"type":26,"tag":190,"props":1390,"children":1391},{},[1392],{"type":31,"value":1393},"用 async/await",{"type":26,"tag":190,"props":1395,"children":1396},{},[1397],{"type":31,"value":1398},"错误处理不要吞掉",{"type":26,"tag":190,"props":1400,"children":1401},{},[1402],{"type":31,"value":1403},"添加类型（若可推断）",{"type":26,"tag":190,"props":1405,"children":1406},{},[1407],{"type":31,"value":1408},"不要改函数签名",{"type":26,"tag":27,"props":1410,"children":1411},{},[1412],{"type":31,"value":1413},"验收方式（强制）：",{"type":26,"tag":186,"props":1415,"children":1416},{},[1417,1422],{"type":26,"tag":190,"props":1418,"children":1419},{},[1420],{"type":31,"value":1421},"输出前后函数行为一致（输入/输出）",{"type":26,"tag":190,"props":1423,"children":1424},{},[1425],{"type":31,"value":1426},"失败分支有可观测日志（不要悄悄 return null）",{"type":26,"tag":1298,"props":1428,"children":1430},{"id":1429},"工作流-3多文件改动先定文件清单",[1431],{"type":31,"value":1432},"工作流 3：多文件改动（先定“文件清单”）",{"type":26,"tag":902,"props":1434,"children":1435},{},[1436,1447],{"type":26,"tag":190,"props":1437,"children":1438},{},[1439,1445],{"type":26,"tag":235,"props":1440,"children":1442},{"className":1441},[],[1443],{"type":31,"value":1444},"Cmd/Ctrl + I",{"type":31,"value":1446}," 进入多文件",{"type":26,"tag":190,"props":1448,"children":1449},{},[1450],{"type":31,"value":1451},"先让 AI 输出：",{"type":26,"tag":186,"props":1453,"children":1454},{},[1455,1460,1465],{"type":26,"tag":190,"props":1456,"children":1457},{},[1458],{"type":31,"value":1459},"预计会改哪些文件（最多 5 个）",{"type":26,"tag":190,"props":1461,"children":1462},{},[1463],{"type":31,"value":1464},"每个文件改什么",{"type":26,"tag":190,"props":1466,"children":1467},{},[1468],{"type":31,"value":1469},"每一步怎么验收",{"type":26,"tag":902,"props":1471,"children":1472},{"start":835},[1473],{"type":26,"tag":190,"props":1474,"children":1475},{},[1476],{"type":31,"value":1477},"你确认文件清单后再开始生成改动",{"type":26,"tag":27,"props":1479,"children":1480},{},[1481],{"type":31,"value":1482},"关键点：多文件最容易翻车的是“它把你没想到的文件也改了”。所以文件清单是第一道闸门。",{"type":26,"tag":1298,"props":1484,"children":1486},{"id":1485},"工作流-4把上下文噪音砍掉防跑偏",[1487],{"type":31,"value":1488},"工作流 4：把“上下文噪音”砍掉（防跑偏）",{"type":26,"tag":27,"props":1490,"children":1491},{},[1492],{"type":31,"value":1493},"当你怀疑它在胡说/乱改时：",{"type":26,"tag":186,"props":1495,"children":1496},{},[1497,1510],{"type":26,"tag":190,"props":1498,"children":1499},{},[1500,1502,1508],{"type":31,"value":1501},"只选择关键代码片段 → ",{"type":26,"tag":235,"props":1503,"children":1505},{"className":1504},[],[1506],{"type":31,"value":1507},"Cmd/Ctrl + Shift + L",{"type":31,"value":1509}," 加入对话",{"type":26,"tag":190,"props":1511,"children":1512},{},[1513],{"type":31,"value":1514},"然后在对话里要求：",{"type":26,"tag":1280,"props":1516,"children":1517},{},[1518],{"type":26,"tag":27,"props":1519,"children":1520},{},[1521],{"type":31,"value":1522},"只基于我提供的代码片段回答，不要假设其它文件存在。",{"type":26,"tag":1298,"props":1524,"children":1526},{"id":1525},"工作流-5生成变更说明让-code-review-变快",[1527],{"type":31,"value":1528},"工作流 5：生成变更说明（让 code review 变快）",{"type":26,"tag":27,"props":1530,"children":1531},{},[1532],{"type":31,"value":1533},"改完后在对话里让它输出：",{"type":26,"tag":186,"props":1535,"children":1536},{},[1537,1542,1547,1552],{"type":26,"tag":190,"props":1538,"children":1539},{},[1540],{"type":31,"value":1541},"改动摘要（3~7 条）",{"type":26,"tag":190,"props":1543,"children":1544},{},[1545],{"type":31,"value":1546},"风险点（依赖/边界条件）",{"type":26,"tag":190,"props":1548,"children":1549},{},[1550],{"type":31,"value":1551},"回滚方式",{"type":26,"tag":190,"props":1553,"children":1554},{},[1555],{"type":31,"value":1556},"验收步骤",{"type":26,"tag":27,"props":1558,"children":1559},{},[1560],{"type":31,"value":1561},"这套结构能直接贴进 PR 描述。",{"type":26,"tag":1298,"props":1563,"children":1565},{"id":1564},"工作流-6写最小回归集不写回归-等事故",[1566],{"type":31,"value":1567},"工作流 6：写“最小回归集”（不写回归 = 等事故）",{"type":26,"tag":27,"props":1569,"children":1570},{},[1571,1573,1579],{"type":31,"value":1572},"每次改动都至少做 10 条最小回归（见下文清单）。你可以把它写在 ",{"type":26,"tag":235,"props":1574,"children":1576},{"className":1575},[],[1577],{"type":31,"value":1578},"README",{"type":31,"value":1580}," 或团队 wiki。",{"type":26,"tag":1298,"props":1582,"children":1584},{"id":1583},"工作流-7把接受建议变成最后一步",[1585],{"type":31,"value":1586},"工作流 7：把“接受建议”变成最后一步",{"type":26,"tag":27,"props":1588,"children":1589},{},[1590,1596,1598,1603],{"type":26,"tag":235,"props":1591,"children":1593},{"className":1592},[],[1594],{"type":31,"value":1595},"Cmd/Ctrl + Y",{"type":31,"value":1597}," 应该是",{"type":26,"tag":911,"props":1599,"children":1600},{},[1601],{"type":31,"value":1602},"最后一步",{"type":31,"value":1604},"：",{"type":26,"tag":186,"props":1606,"children":1607},{},[1608,1613,1618],{"type":26,"tag":190,"props":1609,"children":1610},{},[1611],{"type":31,"value":1612},"你已经看过 diff",{"type":26,"tag":190,"props":1614,"children":1615},{},[1616],{"type":31,"value":1617},"你能说清楚“怎么验收”",{"type":26,"tag":190,"props":1619,"children":1620},{},[1621],{"type":31,"value":1622},"你知道“怎么回滚”",{"type":26,"tag":1298,"props":1624,"children":1626},{"id":1625},"工作流-8拒绝建议不是失败是风控动作",[1627],{"type":31,"value":1628},"工作流 8：拒绝建议不是失败，是风控动作",{"type":26,"tag":27,"props":1630,"children":1631},{},[1632,1638],{"type":26,"tag":235,"props":1633,"children":1635},{"className":1634},[],[1636],{"type":31,"value":1637},"Cmd/Ctrl + N",{"type":31,"value":1639}," 的使用时机：",{"type":26,"tag":186,"props":1641,"children":1642},{},[1643,1648,1653],{"type":26,"tag":190,"props":1644,"children":1645},{},[1646],{"type":31,"value":1647},"它开始改你没提过的东西（范围漂移）",{"type":26,"tag":190,"props":1649,"children":1650},{},[1651],{"type":31,"value":1652},"它改了 10 个文件但你只想改 1 个",{"type":26,"tag":190,"props":1654,"children":1655},{},[1656],{"type":31,"value":1657},"它为了“更优雅”引入新依赖/新抽象",{"type":26,"tag":1298,"props":1659,"children":1661},{"id":1660},"工作流-9重复任务做成模板提示词不是一次性",[1662],{"type":31,"value":1663},"工作流 9：重复任务做成模板（提示词不是一次性）",{"type":26,"tag":27,"props":1665,"children":1666},{},[1667,1669,1673],{"type":31,"value":1668},"把高频任务（比如“写组件+样式+验收”）固化成模板，放进 Rules（见：",{"type":26,"tag":44,"props":1670,"children":1671},{"href":967},[1672],{"type":31,"value":970},{"type":31,"value":1674},"）。",{"type":26,"tag":1298,"props":1676,"children":1678},{"id":1677},"工作流-10把快捷键表做成你自己的任务表",[1679],{"type":31,"value":1680},"工作流 10：把“快捷键表”做成你自己的任务表",{"type":26,"tag":27,"props":1682,"children":1683},{},[1684],{"type":31,"value":1685},"你不需要记住所有快捷键，只需要记住：",{"type":26,"tag":186,"props":1687,"children":1688},{},[1689,1699,1709,1719],{"type":26,"tag":190,"props":1690,"children":1691},{},[1692,1694],{"type":31,"value":1693},"小步改：",{"type":26,"tag":235,"props":1695,"children":1697},{"className":1696},[],[1698],{"type":31,"value":1349},{"type":26,"tag":190,"props":1700,"children":1701},{},[1702,1704],{"type":31,"value":1703},"先对齐：",{"type":26,"tag":235,"props":1705,"children":1707},{"className":1706},[],[1708],{"type":31,"value":1315},{"type":26,"tag":190,"props":1710,"children":1711},{},[1712,1714],{"type":31,"value":1713},"多文件：",{"type":26,"tag":235,"props":1715,"children":1717},{"className":1716},[],[1718],{"type":31,"value":1444},{"type":26,"tag":190,"props":1720,"children":1721},{},[1722,1724],{"type":31,"value":1723},"上下文聚焦：",{"type":26,"tag":235,"props":1725,"children":1727},{"className":1726},[],[1728],{"type":31,"value":1507},{"type":26,"tag":972,"props":1730,"children":1731},{},[],{"type":26,"tag":76,"props":1733,"children":1735},{"id":1734},"必交付物-1最小回归任务清单10-条通用",[1736],{"type":31,"value":1737},"必交付物 1：最小回归任务清单（10 条，通用）",{"type":26,"tag":1280,"props":1739,"children":1740},{},[1741],{"type":26,"tag":27,"props":1742,"children":1743},{},[1744],{"type":31,"value":1745},"这份清单的意义：让每次 AI 改动都能“被验证”。否则你只是把不可控变成了更快的不可控。",{"type":26,"tag":902,"props":1747,"children":1748},{},[1749,1754,1759,1764,1769,1774,1779,1784,1789,1794],{"type":26,"tag":190,"props":1750,"children":1751},{},[1752],{"type":31,"value":1753},"关键路径能跑通（手动点击/请求一次）",{"type":26,"tag":190,"props":1755,"children":1756},{},[1757],{"type":31,"value":1758},"错误路径能触发（模拟一次失败输入）",{"type":26,"tag":190,"props":1760,"children":1761},{},[1762],{"type":31,"value":1763},"控制台无新增错误（至少关注 1 次真实操作）",{"type":26,"tag":190,"props":1765,"children":1766},{},[1767],{"type":31,"value":1768},"关键 UI 未错位（移动端/桌面端各看一眼）",{"type":26,"tag":190,"props":1770,"children":1771},{},[1772],{"type":31,"value":1773},"刷新后状态正确（尤其是表单/列表）",{"type":26,"tag":190,"props":1775,"children":1776},{},[1777],{"type":31,"value":1778},"路由跳转没断（从入口到目标页）",{"type":26,"tag":190,"props":1780,"children":1781},{},[1782],{"type":31,"value":1783},"相关接口未改变契约（字段名/类型）",{"type":26,"tag":190,"props":1785,"children":1786},{},[1787],{"type":31,"value":1788},"性能没有明显退化（首屏、交互卡顿）",{"type":26,"tag":190,"props":1790,"children":1791},{},[1792],{"type":31,"value":1793},"回滚方案可执行（知道回滚哪几个文件/commit）",{"type":26,"tag":190,"props":1795,"children":1796},{},[1797],{"type":31,"value":1798},"写下“这次改动解决了什么、风险是什么”（可贴 PR）",{"type":26,"tag":972,"props":1800,"children":1801},{},[],{"type":26,"tag":76,"props":1803,"children":1805},{"id":1804},"必交付物-2失败案例复盘真实会发生",[1806],{"type":31,"value":1807},"必交付物 2：失败案例复盘（真实会发生）",{"type":26,"tag":1298,"props":1809,"children":1811},{"id":1810},"现象快捷键用得很熟但交付还是慢",[1812],{"type":31,"value":1813},"现象：快捷键用得很熟，但交付还是慢",{"type":26,"tag":27,"props":1815,"children":1816},{},[1817],{"type":31,"value":1818},"典型原因：你把 Cursor 当成“更聪明的搜索框”，不断对话，直到它给出你想要的答案。",{"type":26,"tag":27,"props":1820,"children":1821},{},[1822],{"type":31,"value":1823},"复现路径：",{"type":26,"tag":186,"props":1825,"children":1826},{},[1827,1832,1837,1842],{"type":26,"tag":190,"props":1828,"children":1829},{},[1830],{"type":31,"value":1831},"你直接说“把页面做得更好看、更高级”",{"type":26,"tag":190,"props":1833,"children":1834},{},[1835],{"type":31,"value":1836},"AI 开始大改样式、抽象组件、甚至引入新依赖",{"type":26,"tag":190,"props":1838,"children":1839},{},[1840],{"type":31,"value":1841},"你为了省事按了“接受建议”",{"type":26,"tag":190,"props":1843,"children":1844},{},[1845],{"type":31,"value":1846},"最后发现：设计没统一、移动端崩、甚至埋了性能问题",{"type":26,"tag":27,"props":1848,"children":1849},{},[1850,1852,1856,1858,1863],{"type":31,"value":1851},"根因：缺少",{"type":26,"tag":911,"props":1853,"children":1854},{},[1855],{"type":31,"value":1036},{"type":31,"value":1857},"与",{"type":26,"tag":911,"props":1859,"children":1860},{},[1861],{"type":31,"value":1862},"验收",{"type":31,"value":251},{"type":26,"tag":27,"props":1865,"children":1866},{},[1867],{"type":31,"value":1868},"修复方式（可照抄）：",{"type":26,"tag":186,"props":1870,"children":1871},{},[1872,1877,1889],{"type":26,"tag":190,"props":1873,"children":1874},{},[1875],{"type":31,"value":1876},"把需求拆成 3 个可验证目标：例如“按钮样式统一”“首屏 CTA 更明显”“移动端间距不挤”",{"type":26,"tag":190,"props":1878,"children":1879},{},[1880,1882,1887],{"type":31,"value":1881},"每个目标只用 ",{"type":26,"tag":235,"props":1883,"children":1885},{"className":1884},[],[1886],{"type":31,"value":1349},{"type":31,"value":1888}," 改一个局部",{"type":26,"tag":190,"props":1890,"children":1891},{},[1892],{"type":31,"value":1893},"每次接受建议前跑一遍“最小回归集”",{"type":26,"tag":972,"props":1895,"children":1896},{},[],{"type":26,"tag":76,"props":1898,"children":1900},{"id":1899},"faq高频问题",[1901],{"type":31,"value":1902},"FAQ（高频问题）",{"type":26,"tag":1298,"props":1904,"children":1906},{"id":1905},"q1我应该先记快捷键还是先学工作流",[1907],{"type":31,"value":1908},"Q1：我应该先记快捷键还是先学工作流？",{"type":26,"tag":27,"props":1910,"children":1911},{},[1912],{"type":31,"value":1913},"先学工作流。快捷键只是把工作流的步骤变短。",{"type":26,"tag":1298,"props":1915,"children":1917},{"id":1916},"q2为什么我一用多文件就容易翻车",[1918],{"type":31,"value":1919},"Q2：为什么我一用多文件就容易翻车？",{"type":26,"tag":27,"props":1921,"children":1922},{},[1923],{"type":31,"value":1924},"因为多文件意味着范围更大、依赖更多、验收更难。先锁定“文件清单 + 每步验收”，再让它动手。",{"type":26,"tag":1298,"props":1926,"children":1928},{"id":1927},"q3有没有万能提示词",[1929],{"type":31,"value":1930},"Q3：有没有“万能提示词”？",{"type":26,"tag":27,"props":1932,"children":1933},{},[1934],{"type":31,"value":1935},"没有，但有“万能结构”：目标、范围、非目标、验收、输出格式。",{"type":26,"tag":972,"props":1937,"children":1938},{},[],{"type":26,"tag":76,"props":1940,"children":1942},{"id":1941},"延伸阅读建议按顺序",[1943],{"type":31,"value":1944},"延伸阅读（建议按顺序）",{"type":26,"tag":186,"props":1946,"children":1947},{},[1948,1955,1962,1969],{"type":26,"tag":190,"props":1949,"children":1950},{},[1951],{"type":26,"tag":44,"props":1952,"children":1953},{"href":945},[1954],{"type":31,"value":948},{"type":26,"tag":190,"props":1956,"children":1957},{},[1958],{"type":26,"tag":44,"props":1959,"children":1960},{"href":956},[1961],{"type":31,"value":959},{"type":26,"tag":190,"props":1963,"children":1964},{},[1965],{"type":26,"tag":44,"props":1966,"children":1967},{"href":967},[1968],{"type":31,"value":970},{"type":26,"tag":190,"props":1970,"children":1971},{},[1972,1974],{"type":31,"value":1973},"如果你更关心“网页制作落地”：看这篇 ",{"type":26,"tag":44,"props":1975,"children":1977},{"href":1976},"/topics/practical-tips/htmlpage-quick-landing-page",[1978],{"type":31,"value":1979},"3 分钟用 HTMLPAGE 做落地页",{"title":7,"searchDepth":835,"depth":835,"links":1981},[1982,1983,1984,1996,1997,2000,2005],{"id":977,"depth":838,"text":980},{"id":1052,"depth":838,"text":1055},{"id":1293,"depth":838,"text":1296,"children":1985},[1986,1987,1988,1989,1990,1991,1992,1993,1994,1995],{"id":1300,"depth":835,"text":1303},{"id":1359,"depth":835,"text":1362},{"id":1429,"depth":835,"text":1432},{"id":1485,"depth":835,"text":1488},{"id":1525,"depth":835,"text":1528},{"id":1564,"depth":835,"text":1567},{"id":1583,"depth":835,"text":1586},{"id":1625,"depth":835,"text":1628},{"id":1660,"depth":835,"text":1663},{"id":1677,"depth":835,"text":1680},{"id":1734,"depth":838,"text":1737},{"id":1804,"depth":838,"text":1807,"children":1998},[1999],{"id":1810,"depth":835,"text":1813},{"id":1899,"depth":838,"text":1902,"children":2001},[2002,2003,2004],{"id":1905,"depth":835,"text":1908},{"id":1916,"depth":835,"text":1919},{"id":1927,"depth":835,"text":1930},{"id":1941,"depth":838,"text":1944},"content:topics:ai:cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet",{"_path":2010,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2011,"description":2012,"date":2013,"topic":5,"author":11,"tags":2014,"image":2018,"imageAlt":2019,"pexelsPhotoId":2020,"pexelsUrl":2021,"readingTime":2022,"body":2023,"_type":848,"_id":2956,"_source":850,"_file":2957,"_stem":2958,"_extension":853},"/topics/ai/cursor-vs-copilot-vscode-workflow","Cursor vs GitHub Copilot vs VS Code：怎么选、怎么搭配、怎么把风险关在笼子里","用“任务类型×风险×验收成本”的选择矩阵解释 Cursor/Copilot/VS Code 的差异，并给出一套可落地的协作工作流（范围闸门、最小回归集、回滚策略）。","2026-03-01",[861,2015,864,2016,2017],"GitHub Copilot","AI 编程","工作流","/images/topics/ai/cursor-vs-copilot-vscode-workflow.jpg","团队在电脑前进行协作讨论",1181371,"https://www.pexels.com/photo/man-wearing-blue-dress-shirt-1181371/",15,{"type":23,"children":2024,"toc":2934},[2025,2030,2035,2053,2058,2076,2079,2085,2090,2121,2126,2129,2135,2143,2347,2355,2368,2371,2377,2383,2396,2401,2414,2420,2425,2458,2464,2469,2487,2490,2496,2501,2507,2512,2545,2551,2564,2569,2582,2588,2600,2606,2611,2624,2629,2632,2638,2643,2764,2767,2773,2783,2792,2810,2819,2827,2836,2854,2857,2863,2869,2874,2880,2885,2888,2893],{"type":26,"tag":27,"props":2026,"children":2027},{},[2028],{"type":31,"value":2029},"“Cursor 和 Copilot 到底有什么区别？”",{"type":26,"tag":27,"props":2031,"children":2032},{},[2033],{"type":31,"value":2034},"这个问题问得越早越好，因为你一旦把工具选错，后面所有痛苦都不是“提示词不够好”，而是：",{"type":26,"tag":186,"props":2036,"children":2037},{},[2038,2043,2048],{"type":26,"tag":190,"props":2039,"children":2040},{},[2041],{"type":31,"value":2042},"改动不可控（范围漂移、改错文件）",{"type":26,"tag":190,"props":2044,"children":2045},{},[2046],{"type":31,"value":2047},"验收成本爆炸（不知道要测什么）",{"type":26,"tag":190,"props":2049,"children":2050},{},[2051],{"type":31,"value":2052},"团队协作崩盘（没有闸门、没有回滚）",{"type":26,"tag":27,"props":2054,"children":2055},{},[2056],{"type":31,"value":2057},"这篇文章用一张选择矩阵 + 一套可执行工作流，帮你做到两件事：",{"type":26,"tag":902,"props":2059,"children":2060},{},[2061,2066],{"type":26,"tag":190,"props":2062,"children":2063},{},[2064],{"type":31,"value":2065},"知道什么时候用 Cursor、什么时候用 Copilot、什么时候“纯 VS Code 更快”",{"type":26,"tag":190,"props":2067,"children":2068},{},[2069,2071],{"type":31,"value":2070},"就算用 AI，也能把风险关在笼子里：",{"type":26,"tag":911,"props":2072,"children":2073},{},[2074],{"type":31,"value":2075},"可审查、可验证、可回滚",{"type":26,"tag":972,"props":2077,"children":2078},{},[],{"type":26,"tag":76,"props":2080,"children":2082},{"id":2081},"结论先说三者不是互斥而是分工",[2083],{"type":31,"value":2084},"结论先说：三者不是互斥，而是分工",{"type":26,"tag":27,"props":2086,"children":2087},{},[2088],{"type":31,"value":2089},"你可以把它们看成三层能力：",{"type":26,"tag":186,"props":2091,"children":2092},{},[2093,2102,2112],{"type":26,"tag":190,"props":2094,"children":2095},{},[2096,2100],{"type":26,"tag":911,"props":2097,"children":2098},{},[2099],{"type":31,"value":864},{"type":31,"value":2101},"：编辑器与生态（调试、插件、任务、终端、语言服务）",{"type":26,"tag":190,"props":2103,"children":2104},{},[2105,2110],{"type":26,"tag":911,"props":2106,"children":2107},{},[2108],{"type":31,"value":2109},"Copilot",{"type":31,"value":2111},"：代码补全与局部建议（“我正在写这一行/这一段”）",{"type":26,"tag":190,"props":2113,"children":2114},{},[2115,2119],{"type":26,"tag":911,"props":2116,"children":2117},{},[2118],{"type":31,"value":861},{"type":31,"value":2120},"：以项目为单位的 AI 协作（对话、索引、多文件编辑、规则）",{"type":26,"tag":27,"props":2122,"children":2123},{},[2124],{"type":31,"value":2125},"最常见的误区是：把“局部补全能力”当作“能做架构与多文件落地”。",{"type":26,"tag":972,"props":2127,"children":2128},{},[],{"type":26,"tag":76,"props":2130,"children":2132},{"id":2131},"选择矩阵按任务类型选工具不是按偏好",[2133],{"type":31,"value":2134},"选择矩阵：按任务类型选工具（不是按偏好）",{"type":26,"tag":1280,"props":2136,"children":2137},{},[2138],{"type":26,"tag":27,"props":2139,"children":2140},{},[2141],{"type":31,"value":2142},"你只要把自己的任务放进表格，就能得到推荐路径。",{"type":26,"tag":83,"props":2144,"children":2145},{},[2146,2178],{"type":26,"tag":87,"props":2147,"children":2148},{},[2149],{"type":26,"tag":91,"props":2150,"children":2151},{},[2152,2157,2163,2168,2173],{"type":26,"tag":95,"props":2153,"children":2154},{},[2155],{"type":31,"value":2156},"任务类型",{"type":26,"tag":95,"props":2158,"children":2160},{"align":2159},"right",[2161],{"type":31,"value":2162},"风险",{"type":26,"tag":95,"props":2164,"children":2165},{"align":2159},[2166],{"type":31,"value":2167},"验收成本",{"type":26,"tag":95,"props":2169,"children":2170},{},[2171],{"type":31,"value":2172},"更推荐",{"type":26,"tag":95,"props":2174,"children":2175},{},[2176],{"type":31,"value":2177},"为什么",{"type":26,"tag":111,"props":2179,"children":2180},{},[2181,2208,2241,2267,2294,2321],{"type":26,"tag":91,"props":2182,"children":2183},{},[2184,2189,2194,2198,2203],{"type":26,"tag":118,"props":2185,"children":2186},{},[2187],{"type":31,"value":2188},"写一段代码/补一个 if",{"type":26,"tag":118,"props":2190,"children":2191},{"align":2159},[2192],{"type":31,"value":2193},"低",{"type":26,"tag":118,"props":2195,"children":2196},{"align":2159},[2197],{"type":31,"value":2193},{"type":26,"tag":118,"props":2199,"children":2200},{},[2201],{"type":31,"value":2202},"Copilot / Cursor 内联编辑",{"type":26,"tag":118,"props":2204,"children":2205},{},[2206],{"type":31,"value":2207},"局部建议足够，成本最低",{"type":26,"tag":91,"props":2209,"children":2210},{},[2211,2216,2221,2225,2236],{"type":26,"tag":118,"props":2212,"children":2213},{},[2214],{"type":31,"value":2215},"重构一个函数",{"type":26,"tag":118,"props":2217,"children":2218},{"align":2159},[2219],{"type":31,"value":2220},"中",{"type":26,"tag":118,"props":2222,"children":2223},{"align":2159},[2224],{"type":31,"value":2220},{"type":26,"tag":118,"props":2226,"children":2227},{},[2228,2230],{"type":31,"value":2229},"Cursor ",{"type":26,"tag":235,"props":2231,"children":2233},{"className":2232},[],[2234],{"type":31,"value":2235},"内联编辑",{"type":26,"tag":118,"props":2237,"children":2238},{},[2239],{"type":31,"value":2240},"需要解释、需要约束输出",{"type":26,"tag":91,"props":2242,"children":2243},{},[2244,2249,2253,2257,2262],{"type":26,"tag":118,"props":2245,"children":2246},{},[2247],{"type":31,"value":2248},"改一个组件 + 样式",{"type":26,"tag":118,"props":2250,"children":2251},{"align":2159},[2252],{"type":31,"value":2220},{"type":26,"tag":118,"props":2254,"children":2255},{"align":2159},[2256],{"type":31,"value":2220},{"type":26,"tag":118,"props":2258,"children":2259},{},[2260],{"type":31,"value":2261},"Cursor（小范围多文件）",{"type":26,"tag":118,"props":2263,"children":2264},{},[2265],{"type":31,"value":2266},"需要同时改模板与样式",{"type":26,"tag":91,"props":2268,"children":2269},{},[2270,2275,2280,2284,2289],{"type":26,"tag":118,"props":2271,"children":2272},{},[2273],{"type":31,"value":2274},"改 3~5 个文件（组件+api+测试）",{"type":26,"tag":118,"props":2276,"children":2277},{"align":2159},[2278],{"type":31,"value":2279},"高",{"type":26,"tag":118,"props":2281,"children":2282},{"align":2159},[2283],{"type":31,"value":2279},{"type":26,"tag":118,"props":2285,"children":2286},{},[2287],{"type":31,"value":2288},"Cursor Composer + 闸门",{"type":26,"tag":118,"props":2290,"children":2291},{},[2292],{"type":31,"value":2293},"需要计划、验收、回滚",{"type":26,"tag":91,"props":2295,"children":2296},{},[2297,2302,2307,2311,2316],{"type":26,"tag":118,"props":2298,"children":2299},{},[2300],{"type":31,"value":2301},"重写一段架构/引入新依赖",{"type":26,"tag":118,"props":2303,"children":2304},{"align":2159},[2305],{"type":31,"value":2306},"很高",{"type":26,"tag":118,"props":2308,"children":2309},{"align":2159},[2310],{"type":31,"value":2306},{"type":26,"tag":118,"props":2312,"children":2313},{},[2314],{"type":31,"value":2315},"先人脑设计 + VS Code 实现",{"type":26,"tag":118,"props":2317,"children":2318},{},[2319],{"type":31,"value":2320},"AI 易发散，最好先设计再执行",{"type":26,"tag":91,"props":2322,"children":2323},{},[2324,2329,2333,2337,2342],{"type":26,"tag":118,"props":2325,"children":2326},{},[2327],{"type":31,"value":2328},"排查线上问题/性能抖动",{"type":26,"tag":118,"props":2330,"children":2331},{"align":2159},[2332],{"type":31,"value":2279},{"type":26,"tag":118,"props":2334,"children":2335},{"align":2159},[2336],{"type":31,"value":2306},{"type":26,"tag":118,"props":2338,"children":2339},{},[2340],{"type":31,"value":2341},"VS Code + 工具链优先，AI 辅助归纳",{"type":26,"tag":118,"props":2343,"children":2344},{},[2345],{"type":31,"value":2346},"需要证据，不要“猜”",{"type":26,"tag":27,"props":2348,"children":2349},{},[2350],{"type":26,"tag":911,"props":2351,"children":2352},{},[2353],{"type":31,"value":2354},"一句话规则：",{"type":26,"tag":186,"props":2356,"children":2357},{},[2358,2363],{"type":26,"tag":190,"props":2359,"children":2360},{},[2361],{"type":31,"value":2362},"当你的改动可以用“10 条最小回归集”覆盖时，用 Cursor。",{"type":26,"tag":190,"props":2364,"children":2365},{},[2366],{"type":31,"value":2367},"当你的改动无法验证时，先别让 AI 动手。",{"type":26,"tag":972,"props":2369,"children":2370},{},[],{"type":26,"tag":76,"props":2372,"children":2374},{"id":2373},"差异拆解到底差在哪里",[2375],{"type":31,"value":2376},"差异拆解：到底差在哪里？",{"type":26,"tag":1298,"props":2378,"children":2380},{"id":2379},"_1-上下文来源补全-vs-项目索引",[2381],{"type":31,"value":2382},"1) 上下文来源：补全 vs 项目索引",{"type":26,"tag":186,"props":2384,"children":2385},{},[2386,2391],{"type":26,"tag":190,"props":2387,"children":2388},{},[2389],{"type":31,"value":2390},"Copilot 更擅长：你正在写的这几行、当前文件的局部上下文",{"type":26,"tag":190,"props":2392,"children":2393},{},[2394],{"type":31,"value":2395},"Cursor 更擅长：项目级索引 + 多文件关联理解",{"type":26,"tag":27,"props":2397,"children":2398},{},[2399],{"type":31,"value":2400},"因此：",{"type":26,"tag":186,"props":2402,"children":2403},{},[2404,2409],{"type":26,"tag":190,"props":2405,"children":2406},{},[2407],{"type":31,"value":2408},"写代码片段：Copilot 速度更快",{"type":26,"tag":190,"props":2410,"children":2411},{},[2412],{"type":31,"value":2413},"改一坨工程：Cursor 更有胜算（但更需要闸门）",{"type":26,"tag":1298,"props":2415,"children":2417},{"id":2416},"_2-交互方式你能不能控制范围",[2418],{"type":31,"value":2419},"2) 交互方式：你能不能控制范围",{"type":26,"tag":27,"props":2421,"children":2422},{},[2423],{"type":31,"value":2424},"范围控制的三个层级：",{"type":26,"tag":902,"props":2426,"children":2427},{},[2428,2438,2448],{"type":26,"tag":190,"props":2429,"children":2430},{},[2431,2433],{"type":31,"value":2432},"内联编辑（选中一段）→ ",{"type":26,"tag":911,"props":2434,"children":2435},{},[2436],{"type":31,"value":2437},"最强范围控制",{"type":26,"tag":190,"props":2439,"children":2440},{},[2441,2443],{"type":31,"value":2442},"Composer 多文件（先列文件清单）→ ",{"type":26,"tag":911,"props":2444,"children":2445},{},[2446],{"type":31,"value":2447},"可控但要闸门",{"type":26,"tag":190,"props":2449,"children":2450},{},[2451,2453],{"type":31,"value":2452},"大对话（泛目标）→ ",{"type":26,"tag":911,"props":2454,"children":2455},{},[2456],{"type":31,"value":2457},"最容易跑偏",{"type":26,"tag":1298,"props":2459,"children":2461},{"id":2460},"_3-输出形态建议-vs-可审查的变更",[2462],{"type":31,"value":2463},"3) 输出形态：建议 vs 可审查的变更",{"type":26,"tag":27,"props":2465,"children":2466},{},[2467],{"type":31,"value":2468},"最好的 AI 输出不是“给我一段代码”，而是：",{"type":26,"tag":186,"props":2470,"children":2471},{},[2472,2477,2482],{"type":26,"tag":190,"props":2473,"children":2474},{},[2475],{"type":31,"value":2476},"改动摘要（做了什么）",{"type":26,"tag":190,"props":2478,"children":2479},{},[2480],{"type":31,"value":2481},"diff 级别的可审查变更",{"type":26,"tag":190,"props":2483,"children":2484},{},[2485],{"type":31,"value":2486},"验收步骤与回滚方案",{"type":26,"tag":972,"props":2488,"children":2489},{},[],{"type":26,"tag":76,"props":2491,"children":2493},{"id":2492},"一套可落地的团队工作流把风险关住",[2494],{"type":31,"value":2495},"一套可落地的团队工作流（把风险关住）",{"type":26,"tag":27,"props":2497,"children":2498},{},[2499],{"type":31,"value":2500},"下面这套流程，你可以直接写进团队规范：",{"type":26,"tag":1298,"props":2502,"children":2504},{"id":2503},"step-1先写任务单geo-友好结构",[2505],{"type":31,"value":2506},"Step 1：先写任务单（GEO 友好结构）",{"type":26,"tag":27,"props":2508,"children":2509},{},[2510],{"type":31,"value":2511},"模板：",{"type":26,"tag":186,"props":2513,"children":2514},{},[2515,2520,2525,2530,2535,2540],{"type":26,"tag":190,"props":2516,"children":2517},{},[2518],{"type":31,"value":2519},"目标：……",{"type":26,"tag":190,"props":2521,"children":2522},{},[2523],{"type":31,"value":2524},"背景：……",{"type":26,"tag":190,"props":2526,"children":2527},{},[2528],{"type":31,"value":2529},"范围：只改这些文件/模块：……",{"type":26,"tag":190,"props":2531,"children":2532},{},[2533],{"type":31,"value":2534},"非目标：不做哪些事情：……",{"type":26,"tag":190,"props":2536,"children":2537},{},[2538],{"type":31,"value":2539},"验收：如何判断完成（可测试/可观察）：……",{"type":26,"tag":190,"props":2541,"children":2542},{},[2543],{"type":31,"value":2544},"回滚：如果失败怎么撤回：……",{"type":26,"tag":1298,"props":2546,"children":2548},{"id":2547},"step-2用范围闸门限制-ai",[2549],{"type":31,"value":2550},"Step 2：用“范围闸门”限制 AI",{"type":26,"tag":186,"props":2552,"children":2553},{},[2554,2559],{"type":26,"tag":190,"props":2555,"children":2556},{},[2557],{"type":31,"value":2558},"单文件改动：优先 Cursor 内联编辑",{"type":26,"tag":190,"props":2560,"children":2561},{},[2562],{"type":31,"value":2563},"多文件改动：必须先让 AI 输出“文件清单（≤5）+ 每步验收”",{"type":26,"tag":27,"props":2565,"children":2566},{},[2567],{"type":31,"value":2568},"如果 AI 输出的文件清单超过 5 个：",{"type":26,"tag":186,"props":2570,"children":2571},{},[2572,2577],{"type":26,"tag":190,"props":2573,"children":2574},{},[2575],{"type":31,"value":2576},"不是它太强，是任务太大",{"type":26,"tag":190,"props":2578,"children":2579},{},[2580],{"type":31,"value":2581},"你需要拆任务，而不是继续推进",{"type":26,"tag":1298,"props":2583,"children":2585},{"id":2584},"step-3最小回归集10-条",[2586],{"type":31,"value":2587},"Step 3：最小回归集（10 条）",{"type":26,"tag":27,"props":2589,"children":2590},{},[2591,2593,2598],{"type":31,"value":2592},"每次接受改动前必须跑（可参考：",{"type":26,"tag":44,"props":2594,"children":2595},{"href":856},[2596],{"type":31,"value":2597},"Cursor 快捷键速查表",{"type":31,"value":2599}," 里的清单）。",{"type":26,"tag":1298,"props":2601,"children":2603},{"id":2602},"step-4回滚策略不用等事故才想",[2604],{"type":31,"value":2605},"Step 4：回滚策略（不用等事故才想）",{"type":26,"tag":27,"props":2607,"children":2608},{},[2609],{"type":31,"value":2610},"回滚最常见的两条路：",{"type":26,"tag":186,"props":2612,"children":2613},{},[2614,2619],{"type":26,"tag":190,"props":2615,"children":2616},{},[2617],{"type":31,"value":2618},"git 回滚 commit",{"type":26,"tag":190,"props":2620,"children":2621},{},[2622],{"type":31,"value":2623},"对关键文件保留前版本（至少能快速恢复）",{"type":26,"tag":27,"props":2625,"children":2626},{},[2627],{"type":31,"value":2628},"你需要做到：任何一轮 AI 改动都能在 5 分钟内撤回。",{"type":26,"tag":972,"props":2630,"children":2631},{},[],{"type":26,"tag":76,"props":2633,"children":2635},{"id":2634},"必交付物对比矩阵可复制",[2636],{"type":31,"value":2637},"必交付物：对比矩阵（可复制）",{"type":26,"tag":27,"props":2639,"children":2640},{},[2641],{"type":31,"value":2642},"下面这张表可以直接贴到你的团队 wiki：",{"type":26,"tag":83,"props":2644,"children":2645},{},[2646,2669],{"type":26,"tag":87,"props":2647,"children":2648},{},[2649],{"type":26,"tag":91,"props":2650,"children":2651},{},[2652,2657,2661,2665],{"type":26,"tag":95,"props":2653,"children":2654},{},[2655],{"type":31,"value":2656},"维度",{"type":26,"tag":95,"props":2658,"children":2659},{},[2660],{"type":31,"value":864},{"type":26,"tag":95,"props":2662,"children":2663},{},[2664],{"type":31,"value":2109},{"type":26,"tag":95,"props":2666,"children":2667},{},[2668],{"type":31,"value":861},{"type":26,"tag":111,"props":2670,"children":2671},{},[2672,2695,2718,2741],{"type":26,"tag":91,"props":2673,"children":2674},{},[2675,2680,2685,2690],{"type":26,"tag":118,"props":2676,"children":2677},{},[2678],{"type":31,"value":2679},"强项",{"type":26,"tag":118,"props":2681,"children":2682},{},[2683],{"type":31,"value":2684},"工具链、调试、生态",{"type":26,"tag":118,"props":2686,"children":2687},{},[2688],{"type":31,"value":2689},"补全与局部建议",{"type":26,"tag":118,"props":2691,"children":2692},{},[2693],{"type":31,"value":2694},"项目上下文、多文件落地",{"type":26,"tag":91,"props":2696,"children":2697},{},[2698,2703,2708,2713],{"type":26,"tag":118,"props":2699,"children":2700},{},[2701],{"type":31,"value":2702},"适合任务",{"type":26,"tag":118,"props":2704,"children":2705},{},[2706],{"type":31,"value":2707},"排查、调试、验证",{"type":26,"tag":118,"props":2709,"children":2710},{},[2711],{"type":31,"value":2712},"写一段、补一段",{"type":26,"tag":118,"props":2714,"children":2715},{},[2716],{"type":31,"value":2717},"改一段、改一组文件",{"type":26,"tag":91,"props":2719,"children":2720},{},[2721,2726,2731,2736],{"type":26,"tag":118,"props":2722,"children":2723},{},[2724],{"type":31,"value":2725},"最大风险",{"type":26,"tag":118,"props":2727,"children":2728},{},[2729],{"type":31,"value":2730},"无",{"type":26,"tag":118,"props":2732,"children":2733},{},[2734],{"type":31,"value":2735},"过度依赖建议",{"type":26,"tag":118,"props":2737,"children":2738},{},[2739],{"type":31,"value":2740},"范围漂移、多文件回归",{"type":26,"tag":91,"props":2742,"children":2743},{},[2744,2749,2754,2759],{"type":26,"tag":118,"props":2745,"children":2746},{},[2747],{"type":31,"value":2748},"必须搭配",{"type":26,"tag":118,"props":2750,"children":2751},{},[2752],{"type":31,"value":2753},"规范与检查",{"type":26,"tag":118,"props":2755,"children":2756},{},[2757],{"type":31,"value":2758},"代码评审",{"type":26,"tag":118,"props":2760,"children":2761},{},[2762],{"type":31,"value":2763},"闸门 + 最小回归集",{"type":26,"tag":972,"props":2765,"children":2766},{},[],{"type":26,"tag":76,"props":2768,"children":2770},{"id":2769},"失败案例多文件看似成功实际埋雷",[2771],{"type":31,"value":2772},"失败案例：多文件“看似成功”，实际埋雷",{"type":26,"tag":27,"props":2774,"children":2775},{},[2776,2781],{"type":26,"tag":911,"props":2777,"children":2778},{},[2779],{"type":31,"value":2780},"现象",{"type":31,"value":2782},"：AI 说“我已经把所有地方都改了”，你也接受了，结果上线后 404 或样式错位。",{"type":26,"tag":27,"props":2784,"children":2785},{},[2786,2791],{"type":26,"tag":911,"props":2787,"children":2788},{},[2789],{"type":31,"value":2790},"复现条件",{"type":31,"value":1604},{"type":26,"tag":186,"props":2793,"children":2794},{},[2795,2800,2805],{"type":26,"tag":190,"props":2796,"children":2797},{},[2798],{"type":31,"value":2799},"你给了一个大目标（例如“把所有按钮统一成主题色”）",{"type":26,"tag":190,"props":2801,"children":2802},{},[2803],{"type":31,"value":2804},"它改了组件、样式、甚至主题配置",{"type":26,"tag":190,"props":2806,"children":2807},{},[2808],{"type":31,"value":2809},"你没有按页面模块走一遍，直接合并",{"type":26,"tag":27,"props":2811,"children":2812},{},[2813,2818],{"type":26,"tag":911,"props":2814,"children":2815},{},[2816],{"type":31,"value":2817},"根因",{"type":31,"value":1604},{"type":26,"tag":186,"props":2820,"children":2821},{},[2822],{"type":26,"tag":190,"props":2823,"children":2824},{},[2825],{"type":31,"value":2826},"改动范围大，但验收仍按“小改动”的方式做（只看一处）",{"type":26,"tag":27,"props":2828,"children":2829},{},[2830,2835],{"type":26,"tag":911,"props":2831,"children":2832},{},[2833],{"type":31,"value":2834},"修复",{"type":31,"value":1604},{"type":26,"tag":186,"props":2837,"children":2838},{},[2839,2844,2849],{"type":26,"tag":190,"props":2840,"children":2841},{},[2842],{"type":31,"value":2843},"强制把任务拆成“模块级目标”：Hero、Feature、Pricing、Form",{"type":26,"tag":190,"props":2845,"children":2846},{},[2847],{"type":31,"value":2848},"每个模块改完就验收一次",{"type":26,"tag":190,"props":2850,"children":2851},{},[2852],{"type":31,"value":2853},"验收通过再进入下一个模块",{"type":26,"tag":972,"props":2855,"children":2856},{},[],{"type":26,"tag":76,"props":2858,"children":2860},{"id":2859},"faq",[2861],{"type":31,"value":2862},"FAQ",{"type":26,"tag":1298,"props":2864,"children":2866},{"id":2865},"q1我已经用了-cursor为什么还要用-copilot",[2867],{"type":31,"value":2868},"Q1：我已经用了 Cursor，为什么还要用 Copilot？",{"type":26,"tag":27,"props":2870,"children":2871},{},[2872],{"type":31,"value":2873},"因为“补全”这种高频低风险任务，Copilot 的交互成本更低；Cursor 更适合需要解释与约束的改动。",{"type":26,"tag":1298,"props":2875,"children":2877},{"id":2876},"q2什么时候应该完全不用-ai",[2878],{"type":31,"value":2879},"Q2：什么时候应该完全不用 AI？",{"type":26,"tag":27,"props":2881,"children":2882},{},[2883],{"type":31,"value":2884},"当你无法定义验收标准时。比如“更高级”“更好看”这种目标，先做信息结构与设计规则，再让 AI 帮你落地局部。",{"type":26,"tag":972,"props":2886,"children":2887},{},[],{"type":26,"tag":76,"props":2889,"children":2891},{"id":2890},"延伸阅读",[2892],{"type":31,"value":2890},{"type":26,"tag":186,"props":2894,"children":2895},{},[2896,2905,2914,2923],{"type":26,"tag":190,"props":2897,"children":2898},{},[2899,2901],{"type":31,"value":2900},"Cursor 入门：",{"type":26,"tag":44,"props":2902,"children":2903},{"href":945},[2904],{"type":31,"value":948},{"type":26,"tag":190,"props":2906,"children":2907},{},[2908,2910],{"type":31,"value":2909},"Cursor 进阶：",{"type":26,"tag":44,"props":2911,"children":2912},{"href":956},[2913],{"type":31,"value":959},{"type":26,"tag":190,"props":2915,"children":2916},{},[2917,2919],{"type":31,"value":2918},"规则配置：",{"type":26,"tag":44,"props":2920,"children":2921},{"href":967},[2922],{"type":31,"value":970},{"type":26,"tag":190,"props":2924,"children":2925},{},[2926,2928],{"type":31,"value":2927},"Copilot 实战：",{"type":26,"tag":44,"props":2929,"children":2931},{"href":2930},"/topics/ai/github-copilot-tips",[2932],{"type":31,"value":2933},"GitHub Copilot 实用技巧",{"title":7,"searchDepth":835,"depth":835,"links":2935},[2936,2937,2938,2943,2949,2950,2951,2955],{"id":2081,"depth":838,"text":2084},{"id":2131,"depth":838,"text":2134},{"id":2373,"depth":838,"text":2376,"children":2939},[2940,2941,2942],{"id":2379,"depth":835,"text":2382},{"id":2416,"depth":835,"text":2419},{"id":2460,"depth":835,"text":2463},{"id":2492,"depth":838,"text":2495,"children":2944},[2945,2946,2947,2948],{"id":2503,"depth":835,"text":2506},{"id":2547,"depth":835,"text":2550},{"id":2584,"depth":835,"text":2587},{"id":2602,"depth":835,"text":2605},{"id":2634,"depth":838,"text":2637},{"id":2769,"depth":838,"text":2772},{"id":2859,"depth":838,"text":2862,"children":2952},[2953,2954],{"id":2865,"depth":835,"text":2868},{"id":2876,"depth":835,"text":2879},{"id":2890,"depth":838,"text":2890},"content:topics:ai:cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow",{"_path":2960,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2961,"description":2962,"date":2963,"topic":5,"author":11,"tags":2964,"image":2969,"featured":702,"readingTime":2022,"body":2970,"_type":848,"_id":3618,"_source":850,"_file":3619,"_stem":3620,"_extension":853},"/topics/ai/ai-debugging-troubleshooting-guide","AI 辅助调试与问题排查：让 AI 成为你的调试搭档","深入探讨如何利用 AI 工具提升调试效率，包括错误信息分析、日志解读、性能问题定位、复杂 bug 排查等实战场景，构建 AI 驱动的调试工作流。","2026-01-18",[2965,2966,2967,865,2968],"AI 调试","问题排查","Debug","错误处理","/images/topics/ai/ai-debugging-guide.jpg",{"type":23,"children":2971,"toc":3589},[2972,2978,2984,2989,2994,2999,3005,3011,3016,3024,3052,3060,3083,3089,3099,3108,3116,3124,3157,3165,3195,3208,3216,3221,3229,3237,3248,3254,3262,3273,3281,3290,3296,3302,3307,3316,3322,3327,3336,3342,3348,3357,3363,3372,3378,3389,3395,3401,3410,3416,3425,3431,3437,3445,3451,3460,3468,3476,3479,3485,3490,3509,3521,3524,3530,3535,3544,3549,3552,3558,3563,3581],{"type":26,"tag":76,"props":2973,"children":2975},{"id":2974},"ai-辅助调试与问题排查",[2976],{"type":31,"value":2977},"AI 辅助调试与问题排查",{"type":26,"tag":76,"props":2979,"children":2981},{"id":2980},"引言调试的痛与-ai-的解药",[2982],{"type":31,"value":2983},"引言：调试的痛与 AI 的解药",{"type":26,"tag":27,"props":2985,"children":2986},{},[2987],{"type":31,"value":2988},"调试是每个程序员的日常，也是最消耗时间和精力的工作之一。我们都有过这样的经历：盯着一个莫名其妙的错误信息，翻遍 Stack Overflow，尝试各种方案，几个小时后才发现是一个愚蠢的拼写错误。",{"type":26,"tag":27,"props":2990,"children":2991},{},[2992],{"type":31,"value":2993},"AI 工具的出现，正在改变调试的方式。不是替代你的思考，而是加速你的分析过程——帮你快速理解错误、缩小排查范围、验证假设。",{"type":26,"tag":27,"props":2995,"children":2996},{},[2997],{"type":31,"value":2998},"这篇文章分享我在实际项目中使用 AI 辅助调试的经验和方法论。",{"type":26,"tag":76,"props":3000,"children":3002},{"id":3001},"第一部分建立-ai-调试的思维模型",[3003],{"type":31,"value":3004},"第一部分：建立 AI 调试的思维模型",{"type":26,"tag":1298,"props":3006,"children":3008},{"id":3007},"_11-ai-在调试中的角色",[3009],{"type":31,"value":3010},"1.1 AI 在调试中的角色",{"type":26,"tag":27,"props":3012,"children":3013},{},[3014],{"type":31,"value":3015},"把 AI 想象成一个经验丰富但不了解你项目的高级工程师。它：",{"type":26,"tag":27,"props":3017,"children":3018},{},[3019],{"type":26,"tag":911,"props":3020,"children":3021},{},[3022],{"type":31,"value":3023},"擅长的事情：",{"type":26,"tag":186,"props":3025,"children":3026},{},[3027,3032,3037,3042,3047],{"type":26,"tag":190,"props":3028,"children":3029},{},[3030],{"type":31,"value":3031},"解读错误信息的含义",{"type":26,"tag":190,"props":3033,"children":3034},{},[3035],{"type":31,"value":3036},"提供可能的原因列表",{"type":26,"tag":190,"props":3038,"children":3039},{},[3040],{"type":31,"value":3041},"给出排查方向建议",{"type":26,"tag":190,"props":3043,"children":3044},{},[3045],{"type":31,"value":3046},"解释复杂的技术概念",{"type":26,"tag":190,"props":3048,"children":3049},{},[3050],{"type":31,"value":3051},"生成调试代码片段",{"type":26,"tag":27,"props":3053,"children":3054},{},[3055],{"type":26,"tag":911,"props":3056,"children":3057},{},[3058],{"type":31,"value":3059},"不擅长的事情：",{"type":26,"tag":186,"props":3061,"children":3062},{},[3063,3068,3073,3078],{"type":26,"tag":190,"props":3064,"children":3065},{},[3066],{"type":31,"value":3067},"了解你的业务逻辑",{"type":26,"tag":190,"props":3069,"children":3070},{},[3071],{"type":31,"value":3072},"知道你的代码历史",{"type":26,"tag":190,"props":3074,"children":3075},{},[3076],{"type":31,"value":3077},"理解项目特定的约定",{"type":26,"tag":190,"props":3079,"children":3080},{},[3081],{"type":31,"value":3082},"做出架构级判断",{"type":26,"tag":1298,"props":3084,"children":3086},{"id":3085},"_12-有效提问的结构",[3087],{"type":31,"value":3088},"1.2 有效提问的结构",{"type":26,"tag":227,"props":3090,"children":3094},{"code":3091,"language":848,"meta":7,"className":3092},"## 高效的调试提问模板\n\n**问题描述**\n[简洁描述遇到的问题]\n\n**错误信息**\n",[3093],"language-markdown",[3095],{"type":26,"tag":235,"props":3096,"children":3097},{"__ignoreMap":7},[3098],{"type":31,"value":3091},{"type":26,"tag":27,"props":3100,"children":3101},{},[3102],{"type":26,"tag":3103,"props":3104,"children":3105},"span",{},[3106],{"type":31,"value":3107},"完整的错误信息，不要截断",{"type":26,"tag":227,"props":3109,"children":3111},{"code":3110},"\n**相关代码**\n```javascript\n[精简但完整的相关代码]\n",[3112],{"type":26,"tag":235,"props":3113,"children":3114},{"__ignoreMap":7},[3115],{"type":31,"value":3110},{"type":26,"tag":27,"props":3117,"children":3118},{},[3119],{"type":26,"tag":911,"props":3120,"children":3121},{},[3122],{"type":31,"value":3123},"环境信息",{"type":26,"tag":186,"props":3125,"children":3126},{},[3127,3137,3147],{"type":26,"tag":190,"props":3128,"children":3129},{},[3130,3132],{"type":31,"value":3131},"运行环境：",{"type":26,"tag":3103,"props":3133,"children":3134},{},[3135],{"type":31,"value":3136},"Node 版本/浏览器版本",{"type":26,"tag":190,"props":3138,"children":3139},{},[3140,3142],{"type":31,"value":3141},"框架版本：",{"type":26,"tag":3103,"props":3143,"children":3144},{},[3145],{"type":31,"value":3146},"相关框架版本",{"type":26,"tag":190,"props":3148,"children":3149},{},[3150,3152],{"type":31,"value":3151},"操作系统：",{"type":26,"tag":3103,"props":3153,"children":3154},{},[3155],{"type":31,"value":3156},"如果相关",{"type":26,"tag":27,"props":3158,"children":3159},{},[3160],{"type":26,"tag":911,"props":3161,"children":3162},{},[3163],{"type":31,"value":3164},"已尝试的方案",{"type":26,"tag":186,"props":3166,"children":3167},{},[3168,3182],{"type":26,"tag":190,"props":3169,"children":3170},{},[3171,3176,3177],{"type":26,"tag":3103,"props":3172,"children":3173},{},[3174],{"type":31,"value":3175},"方案1",{"type":31,"value":1604},{"type":26,"tag":3103,"props":3178,"children":3179},{},[3180],{"type":31,"value":3181},"结果",{"type":26,"tag":190,"props":3183,"children":3184},{},[3185,3190,3191],{"type":26,"tag":3103,"props":3186,"children":3187},{},[3188],{"type":31,"value":3189},"方案2",{"type":31,"value":1604},{"type":26,"tag":3103,"props":3192,"children":3193},{},[3194],{"type":31,"value":3181},{"type":26,"tag":27,"props":3196,"children":3197},{},[3198,3203],{"type":26,"tag":911,"props":3199,"children":3200},{},[3201],{"type":31,"value":3202},"期望的结果",{"type":26,"tag":3103,"props":3204,"children":3205},{},[3206],{"type":31,"value":3207},"描述期望的行为",{"type":26,"tag":227,"props":3209,"children":3211},{"code":3210},"\n### 1.3 分级调试策略\n\n",[3212],{"type":26,"tag":235,"props":3213,"children":3214},{"__ignoreMap":7},[3215],{"type":31,"value":3210},{"type":26,"tag":27,"props":3217,"children":3218},{},[3219],{"type":31,"value":3220},"┌───────────────────────────────────────────────────────────┐\n│                    AI 辅助调试决策树                        │\n├───────────────────────────────────────────────────────────┤\n│                                                           │\n│  Level 1：简单错误（5分钟内解决）                           │\n│  ├── 语法错误、拼写错误                                    │\n│  ├── 方法：直接复制错误信息给 AI                           │\n│  └── 工具：Copilot Chat / ChatGPT                        │\n│                                                           │\n│  Level 2：中等复杂度（30分钟内解决）                        │\n│  ├── 类型错误、逻辑错误、API 使用错误                      │\n│  ├── 方法：提供错误信息 + 相关代码 + 上下文                 │\n│  └── 工具：Cursor Chat / Claude                          │\n│                                                           │\n│  Level 3：复杂问题（需要深入分析）                          │\n│  ├── 竞态条件、内存泄漏、性能问题                          │\n│  ├── 方法：详细描述场景 + 提供多个文件 + 讨论               │\n│  └── 工具：Cursor Composer / 专门的 AI 会话                │\n│                                                           │\n│  Level 4：架构级问题                                       │\n│  ├── 设计缺陷、技术债务                                    │\n│  ├── 方法：AI 辅助分析 + 人工判断                          │\n│  └── 工具：与团队讨论 + AI 作为顾问                        │\n│                                                           │\n└───────────────────────────────────────────────────────────┘",{"type":26,"tag":227,"props":3222,"children":3224},{"code":3223},"\n## 第二部分：错误信息分析\n\n### 2.1 前端错误分析\n\n**场景 1：React 错误边界触发**\n\n```typescript\n// 错误信息：\n// Error: Hydration failed because the initial UI does not match \n// what was rendered on the server.\n\n// 提问方式：\n/**\n * 我在 Next.js 14 App Router 项目中遇到这个错误：\n * \n * Error: Hydration failed because the initial UI does not match \n * what was rendered on the server.\n * \n * 相关代码：\n */\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState(false);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n\n// AI 会分析出：\n// 1. 服务端渲染时 localStorage 不可用，默认 false\n// 2. 客户端 hydration 时可能是 true\n// 3. 导致服务端和客户端渲染结果不一致\n\n// AI 建议的解决方案：\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState\u003Cboolean | null>(null);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  // 初始状态显示加载中，避免 hydration 不匹配\n  if (isLoggedIn === null) {\n    return \u003Cdiv>加载中...\u003C/div>;\n  }\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n",[3225],{"type":26,"tag":235,"props":3226,"children":3227},{"__ignoreMap":7},[3228],{"type":31,"value":3223},{"type":26,"tag":27,"props":3230,"children":3231},{},[3232],{"type":26,"tag":911,"props":3233,"children":3234},{},[3235],{"type":31,"value":3236},"场景 2：Vue 响应式警告",{"type":26,"tag":227,"props":3238,"children":3243},{"code":3239,"language":3240,"meta":7,"className":3241},"// 警告信息：\n// [Vue warn]: Property \"xxx\" was accessed during render but is not \n// defined on instance.\n\n// 提问方式：\n/**\n * Vue 3 项目中出现这个警告：\n * [Vue warn]: Property \"userInfo\" was accessed during render \n * but is not defined on instance.\n * \n * 组件代码：\n */\n\u003Ctemplate>\n  \u003Cdiv>{{ userInfo.name }}\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo } = await useFetch('/api/user');\n\u003C/script>\n\n// AI 分析：\n// 1. useFetch 是异步的，初始渲染时 userInfo 可能是 undefined\n// 2. 直接访问 userInfo.name 会报错\n\n// AI 建议：\n\u003Ctemplate>\n  \u003Cdiv v-if=\"userInfo\">{{ userInfo.name }}\u003C/div>\n  \u003Cdiv v-else>加载中...\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo, pending } = await useFetch('/api/user');\n\u003C/script>\n","typescript",[3242],"language-typescript",[3244],{"type":26,"tag":235,"props":3245,"children":3246},{"__ignoreMap":7},[3247],{"type":31,"value":3239},{"type":26,"tag":1298,"props":3249,"children":3251},{"id":3250},"_22-后端错误分析",[3252],{"type":31,"value":3253},"2.2 后端错误分析",{"type":26,"tag":27,"props":3255,"children":3256},{},[3257],{"type":26,"tag":911,"props":3258,"children":3259},{},[3260],{"type":31,"value":3261},"场景 1：Node.js 内存问题",{"type":26,"tag":227,"props":3263,"children":3268},{"code":3264,"language":3265,"meta":7,"className":3266},"// 错误信息：\n// FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n// JavaScript heap out of memory\n\n// 提问方式（包含上下文）：\n/**\n * Node.js 服务运行几小时后崩溃，错误信息：\n * FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n * JavaScript heap out of memory\n * \n * 服务功能：处理 CSV 文件上传，每次约 100MB\n * \n * 处理代码：\n */\nasync function processCSV(filePath) {\n  const content = fs.readFileSync(filePath, 'utf-8');\n  const rows = content.split('\\n');\n  const results = [];\n  \n  for (const row of rows) {\n    const processed = await processRow(row);\n    results.push(processed);\n  }\n  \n  return results;\n}\n\n// AI 分析会指出：\n// 1. 一次性读取整个文件到内存\n// 2. 所有处理结果累积在 results 数组\n// 3. 建议使用流式处理\n\n// AI 提供的优化方案：\nconst { createReadStream } = require('fs');\nconst { createInterface } = require('readline');\n\nasync function processCSVStream(filePath, onRow) {\n  const fileStream = createReadStream(filePath);\n  const rl = createInterface({\n    input: fileStream,\n    crlfDelay: Infinity\n  });\n  \n  let count = 0;\n  for await (const line of rl) {\n    await onRow(line);\n    count++;\n    \n    // 每处理 1000 行，给 GC 机会运行\n    if (count % 1000 === 0) {\n      await new Promise(r => setImmediate(r));\n    }\n  }\n}\n","javascript",[3267],"language-javascript",[3269],{"type":26,"tag":235,"props":3270,"children":3271},{"__ignoreMap":7},[3272],{"type":31,"value":3264},{"type":26,"tag":27,"props":3274,"children":3275},{},[3276],{"type":26,"tag":911,"props":3277,"children":3278},{},[3279],{"type":31,"value":3280},"场景 2：数据库连接问题",{"type":26,"tag":227,"props":3282,"children":3285},{"code":3283,"language":3240,"meta":7,"className":3284},"// 错误信息：\n// Error: Connection pool exhausted - \n// max connections (10) already in use\n\n// 提问方式：\n/**\n * PostgreSQL 连接池耗尽错误，高并发时出现：\n * Error: Connection pool exhausted\n * \n * 当前配置：\n * - max connections: 10\n * - 并发请求: 约 100/秒\n * \n * 数据库调用代码：\n */\nasync function getUserData(userId: string) {\n  const client = await pool.connect();\n  try {\n    const user = await client.query('SELECT * FROM users WHERE id = $1', [userId]);\n    const orders = await client.query('SELECT * FROM orders WHERE user_id = $1', [userId]);\n    const payments = await client.query('SELECT * FROM payments WHERE user_id = $1', [userId]);\n    return { user: user.rows[0], orders: orders.rows, payments: payments.rows };\n  } finally {\n    client.release();\n  }\n}\n\n// AI 会分析出多个可能原因并给出综合方案\n",[3242],[3286],{"type":26,"tag":235,"props":3287,"children":3288},{"__ignoreMap":7},[3289],{"type":31,"value":3283},{"type":26,"tag":76,"props":3291,"children":3293},{"id":3292},"第三部分日志分析与问题定位",[3294],{"type":31,"value":3295},"第三部分：日志分析与问题定位",{"type":26,"tag":1298,"props":3297,"children":3299},{"id":3298},"_31-结构化日志分析",[3300],{"type":31,"value":3301},"3.1 结构化日志分析",{"type":26,"tag":27,"props":3303,"children":3304},{},[3305],{"type":31,"value":3306},"当面对大量日志时，让 AI 帮你快速定位问题：",{"type":26,"tag":227,"props":3308,"children":3311},{"code":3309,"language":3265,"meta":7,"className":3310},"// 提问示例：\n/**\n * 分析以下日志，找出导致请求失败的原因：\n * \n * 日志片段：\n */\nconst logs = `\n2024-01-15 10:23:45.123 INFO  [req-abc123] 收到请求 POST /api/order\n2024-01-15 10:23:45.125 DEBUG [req-abc123] 用户认证通过 userId=u001\n2024-01-15 10:23:45.130 DEBUG [req-abc123] 开始库存检查 productId=p001\n2024-01-15 10:23:45.145 DEBUG [req-abc123] 库存检查通过 available=50\n2024-01-15 10:23:45.150 DEBUG [req-abc123] 开始创建订单\n2024-01-15 10:23:45.200 DEBUG [req-abc123] 数据库连接获取成功\n2024-01-15 10:23:45.250 ERROR [req-abc123] 订单创建失败 error=\"deadlock detected\"\n2024-01-15 10:23:45.251 WARN  [req-abc123] 事务回滚\n2024-01-15 10:23:45.255 INFO  [req-abc123] 响应 500 耗时 132ms\n`;\n\n// AI 分析结果会包括：\n// 1. 问题定位：数据库死锁\n// 2. 可能原因：并发订单创建导致锁竞争\n// 3. 排查建议：检查事务隔离级别、锁顺序\n",[3267],[3312],{"type":26,"tag":235,"props":3313,"children":3314},{"__ignoreMap":7},[3315],{"type":31,"value":3309},{"type":26,"tag":1298,"props":3317,"children":3319},{"id":3318},"_32-创建调试日志",[3320],{"type":31,"value":3321},"3.2 创建调试日志",{"type":26,"tag":27,"props":3323,"children":3324},{},[3325],{"type":31,"value":3326},"让 AI 帮你生成调试用的日志代码：",{"type":26,"tag":227,"props":3328,"children":3331},{"code":3329,"language":3240,"meta":7,"className":3330},"// 请求：\n// \"为这个函数添加详细的调试日志，包括入参、关键步骤、耗时和结果\"\n\n// 原代码：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const inventory = await checkInventory(order.items);\n  const payment = await processPayment(order.userId, order.total);\n  const result = await createOrder(order, payment.transactionId);\n  return result;\n}\n\n// AI 生成的带日志版本：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const requestId = generateRequestId();\n  const startTime = performance.now();\n  \n  logger.info({\n    requestId,\n    event: 'order_processing_start',\n    orderId: order.id,\n    userId: order.userId,\n    itemCount: order.items.length,\n    total: order.total\n  });\n  \n  try {\n    // 库存检查\n    const inventoryStart = performance.now();\n    const inventory = await checkInventory(order.items);\n    logger.debug({\n      requestId,\n      event: 'inventory_check_complete',\n      duration: performance.now() - inventoryStart,\n      available: inventory.allAvailable\n    });\n    \n    // 支付处理\n    const paymentStart = performance.now();\n    const payment = await processPayment(order.userId, order.total);\n    logger.debug({\n      requestId,\n      event: 'payment_complete',\n      duration: performance.now() - paymentStart,\n      transactionId: payment.transactionId\n    });\n    \n    // 创建订单\n    const createStart = performance.now();\n    const result = await createOrder(order, payment.transactionId);\n    logger.debug({\n      requestId,\n      event: 'order_created',\n      duration: performance.now() - createStart,\n      resultOrderId: result.orderId\n    });\n    \n    logger.info({\n      requestId,\n      event: 'order_processing_complete',\n      duration: performance.now() - startTime,\n      success: true\n    });\n    \n    return result;\n  } catch (error) {\n    logger.error({\n      requestId,\n      event: 'order_processing_failed',\n      duration: performance.now() - startTime,\n      error: error.message,\n      stack: error.stack\n    });\n    throw error;\n  }\n}\n",[3242],[3332],{"type":26,"tag":235,"props":3333,"children":3334},{"__ignoreMap":7},[3335],{"type":31,"value":3329},{"type":26,"tag":76,"props":3337,"children":3339},{"id":3338},"第四部分性能问题排查",[3340],{"type":31,"value":3341},"第四部分：性能问题排查",{"type":26,"tag":1298,"props":3343,"children":3345},{"id":3344},"_41-前端性能分析",[3346],{"type":31,"value":3347},"4.1 前端性能分析",{"type":26,"tag":227,"props":3349,"children":3352},{"code":3350,"language":3240,"meta":7,"className":3351},"// 场景：页面加载慢，需要分析原因\n\n// 提问方式：\n/**\n * 页面首屏加载需要 5 秒，以下是 Performance API 数据，\n * 请分析性能瓶颈：\n */\nconst performanceData = {\n  // Navigation Timing\n  dns: 50,           // DNS 查询\n  tcp: 100,          // TCP 连接\n  ttfb: 800,         // 首字节时间\n  download: 200,     // 文档下载\n  domParsing: 300,   // DOM 解析\n  domContentLoaded: 1500,\n  load: 5000,\n  \n  // Resource Timing (主要资源)\n  resources: [\n    { name: 'main.js', size: '2.5MB', duration: 1200 },\n    { name: 'vendor.js', size: '1.8MB', duration: 900 },\n    { name: 'styles.css', size: '500KB', duration: 300 },\n    { name: 'hero-image.jpg', size: '3MB', duration: 1500 },\n  ],\n  \n  // Long Tasks\n  longTasks: [\n    { startTime: 1600, duration: 800, name: 'script-evaluation' },\n    { startTime: 2500, duration: 400, name: 'layout' }\n  ]\n};\n\n// AI 会分析出：\n// 1. JS bundle 过大（4.3MB），需要代码分割\n// 2. 图片未优化（3MB 的 hero 图片）\n// 3. 存在长任务阻塞主线程\n// 并给出具体优化建议\n",[3242],[3353],{"type":26,"tag":235,"props":3354,"children":3355},{"__ignoreMap":7},[3356],{"type":31,"value":3350},{"type":26,"tag":1298,"props":3358,"children":3360},{"id":3359},"_42-内存泄漏排查",[3361],{"type":31,"value":3362},"4.2 内存泄漏排查",{"type":26,"tag":227,"props":3364,"children":3367},{"code":3365,"language":3240,"meta":7,"className":3366},"// 场景：应用运行一段时间后变卡\n\n// 提问方式：\n/**\n * React 应用运行一段时间后内存持续增长，以下是 Heap Snapshot 对比：\n * \n * 初始状态：50MB\n * 运行 1 小时后：150MB\n * 运行 2 小时后：280MB\n * \n * Retained objects 增长最快的：\n * - (closure) - 增长 50MB\n * - HTMLDivElement - 增长 30MB\n * - Array - 增长 20MB\n * \n * 可疑代码：\n */\nfunction DataDashboard() {\n  const [data, setData] = useState([]);\n  const chartRef = useRef(null);\n  \n  useEffect(() => {\n    // 每秒刷新数据\n    const interval = setInterval(async () => {\n      const newData = await fetchLatestData();\n      setData(prev => [...prev, ...newData]);  // 数据不断累积\n    }, 1000);\n    \n    // 初始化图表\n    const chart = new Chart(chartRef.current, {\n      // 配置...\n    });\n    \n    // 没有 cleanup！\n  }, []);\n  \n  return \u003Ccanvas ref={chartRef} />;\n}\n\n// AI 会指出：\n// 1. interval 没有清理\n// 2. Chart 实例没有销毁\n// 3. data 无限增长\n// 并提供修复代码\n",[3242],[3368],{"type":26,"tag":235,"props":3369,"children":3370},{"__ignoreMap":7},[3371],{"type":31,"value":3365},{"type":26,"tag":1298,"props":3373,"children":3375},{"id":3374},"_43-数据库查询优化",[3376],{"type":31,"value":3377},"4.3 数据库查询优化",{"type":26,"tag":227,"props":3379,"children":3384},{"code":3380,"language":3381,"meta":7,"className":3382},"-- 场景：查询很慢，让 AI 分析执行计划\n\n-- 提问方式：\n-- 以下查询在数据量大时很慢（orders 表 1000 万行），\n-- 执行计划如下，请分析并优化：\n\nEXPLAIN ANALYZE\nSELECT o.*, u.name, u.email\nFROM orders o\nJOIN users u ON o.user_id = u.id\nWHERE o.status = 'pending'\n  AND o.created_at > '2024-01-01'\nORDER BY o.created_at DESC\nLIMIT 20;\n\n-- 执行计划：\n/*\nSort  (cost=156847.23..157847.23 rows=400000 width=250)\n  Sort Key: o.created_at DESC\n  ->  Hash Join  (cost=1500.00..89847.23 rows=400000 width=250)\n        Hash Cond: (o.user_id = u.id)\n        ->  Seq Scan on orders o  (cost=0.00..85000.00 rows=400000)\n              Filter: ((status = 'pending') AND (created_at > '2024-01-01'))\n        ->  Hash  (cost=1000.00..1000.00 rows=50000 width=100)\n              ->  Seq Scan on users u  (cost=0.00..1000.00 rows=50000)\nPlanning Time: 0.5 ms\nExecution Time: 3500 ms\n*/\n\n-- AI 会分析出问题并建议：\n-- 1. orders 表全表扫描 - 需要复合索引\n-- 2. 建议创建索引：\nCREATE INDEX idx_orders_status_created ON orders(status, created_at DESC);\n\n-- 3. 如果 status 选择性不高，考虑部分索引：\nCREATE INDEX idx_orders_pending ON orders(created_at DESC) \nWHERE status = 'pending';\n","sql",[3383],"language-sql",[3385],{"type":26,"tag":235,"props":3386,"children":3387},{"__ignoreMap":7},[3388],{"type":31,"value":3380},{"type":26,"tag":76,"props":3390,"children":3392},{"id":3391},"第五部分复杂-bug-排查",[3393],{"type":31,"value":3394},"第五部分：复杂 Bug 排查",{"type":26,"tag":1298,"props":3396,"children":3398},{"id":3397},"_51-竞态条件",[3399],{"type":31,"value":3400},"5.1 竞态条件",{"type":26,"tag":227,"props":3402,"children":3405},{"code":3403,"language":3240,"meta":7,"className":3404},"// 场景：偶发的数据不一致问题\n\n// 提问方式：\n/**\n * 用户反馈偶尔看到错误的账户余额，但刷新后正常。\n * 怀疑是竞态条件，以下是相关代码：\n */\nasync function updateBalance(userId: string, amount: number) {\n  // 读取当前余额\n  const user = await db.users.findOne({ id: userId });\n  const newBalance = user.balance + amount;\n  \n  // 更新余额\n  await db.users.update({ id: userId }, { balance: newBalance });\n  \n  // 记录交易\n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: newBalance,\n    createdAt: new Date()\n  });\n  \n  return newBalance;\n}\n\n// 并发调用场景：\n// 用户同时发起两笔交易：+100 和 -50\n// 期望结果：原余额 1000 → 1050\n// 实际可能：原余额 1000 → 1100 或 950\n\n// AI 会分析竞态条件并提供解决方案：\nasync function updateBalanceAtomic(userId: string, amount: number) {\n  // 方案 1：使用数据库原子操作\n  const result = await db.users.findOneAndUpdate(\n    { id: userId },\n    { $inc: { balance: amount } },\n    { returnDocument: 'after' }\n  );\n  \n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: result.balance,\n    createdAt: new Date()\n  });\n  \n  return result.balance;\n}\n\n// 方案 2：使用乐观锁\nasync function updateBalanceOptimistic(userId: string, amount: number) {\n  const maxRetries = 3;\n  \n  for (let i = 0; i \u003C maxRetries; i++) {\n    const user = await db.users.findOne({ id: userId });\n    const newBalance = user.balance + amount;\n    \n    const updated = await db.users.updateOne(\n      { id: userId, version: user.version },\n      { balance: newBalance, version: user.version + 1 }\n    );\n    \n    if (updated.modifiedCount === 1) {\n      await db.transactions.create({...});\n      return newBalance;\n    }\n    \n    // 版本冲突，重试\n    await sleep(10 * (i + 1));\n  }\n  \n  throw new Error('Update failed after retries');\n}\n",[3242],[3406],{"type":26,"tag":235,"props":3407,"children":3408},{"__ignoreMap":7},[3409],{"type":31,"value":3403},{"type":26,"tag":1298,"props":3411,"children":3413},{"id":3412},"_52-分布式系统问题",[3414],{"type":31,"value":3415},"5.2 分布式系统问题",{"type":26,"tag":227,"props":3417,"children":3420},{"code":3418,"language":3240,"meta":7,"className":3419},"// 场景：微服务间的数据不一致\n\n// 提问方式：\n/**\n * 订单服务和库存服务偶尔出现数据不一致：\n * - 订单显示已创建\n * - 库存未扣减\n * \n * 当前流程：\n */\n// Order Service\nasync function createOrder(orderData) {\n  // 1. 调用库存服务扣减库存\n  await inventoryService.deduct(orderData.items);\n  \n  // 2. 创建订单\n  const order = await orderRepository.create(orderData);\n  \n  // 3. 发送订单创建事件\n  await eventBus.publish('order.created', order);\n  \n  return order;\n}\n\n// 问题分析：如果步骤 2 或 3 失败，库存已经扣减但订单未创建\n\n// AI 会建议使用 Saga 模式或事务发件箱模式\n",[3242],[3421],{"type":26,"tag":235,"props":3422,"children":3423},{"__ignoreMap":7},[3424],{"type":31,"value":3418},{"type":26,"tag":76,"props":3426,"children":3428},{"id":3427},"第六部分ai-调试工作流",[3429],{"type":31,"value":3430},"第六部分：AI 调试工作流",{"type":26,"tag":1298,"props":3432,"children":3434},{"id":3433},"_61-我的调试流程",[3435],{"type":31,"value":3436},"6.1 我的调试流程",{"type":26,"tag":227,"props":3438,"children":3440},{"code":3439},"┌────────────────────────────────────────────────────────────┐\n│                    AI 辅助调试工作流                         │\n├────────────────────────────────────────────────────────────┤\n│                                                            │\n│  Step 1: 问题收集                                          │\n│  ├── 复制完整错误信息                                       │\n│  ├── 截图相关日志                                          │\n│  └── 记录复现步骤                                          │\n│                                                            │\n│  Step 2: 快速分析                                          │\n│  ├── 将错误信息发给 AI                                      │\n│  ├── 获取可能原因列表                                       │\n│  └── 评估哪些最可能                                         │\n│                                                            │\n│  Step 3: 深入调查                                          │\n│  ├── 根据 AI 建议添加日志/断点                              │\n│  ├── 收集更多信息                                          │\n│  └── 再次询问 AI（带新信息）                                │\n│                                                            │\n│  Step 4: 验证修复                                          │\n│  ├── AI 生成修复代码                                        │\n│  ├── 人工审查确认                                          │\n│  └── 测试验证                                               │\n│                                                            │\n│  Step 5: 预防措施                                          │\n│  ├── AI 建议类似问题的预防方法                              │\n│  ├── 添加相关测试用例                                       │\n│  └── 更新文档/知识库                                        │\n│                                                            │\n└────────────────────────────────────────────────────────────┘\n",[3441],{"type":26,"tag":235,"props":3442,"children":3443},{"__ignoreMap":7},[3444],{"type":31,"value":3439},{"type":26,"tag":1298,"props":3446,"children":3448},{"id":3447},"_62-调试对话模板",[3449],{"type":31,"value":3450},"6.2 调试对话模板",{"type":26,"tag":227,"props":3452,"children":3455},{"code":3453,"language":848,"meta":7,"className":3454},"## 第一轮：问题描述\n\n我遇到了一个问题：[简述问题]\n\n错误信息：\n",[3093],[3456],{"type":26,"tag":235,"props":3457,"children":3458},{"__ignoreMap":7},[3459],{"type":31,"value":3453},{"type":26,"tag":27,"props":3461,"children":3462},{},[3463],{"type":26,"tag":3103,"props":3464,"children":3465},{},[3466],{"type":31,"value":3467},"粘贴完整错误",{"type":26,"tag":227,"props":3469,"children":3471},{"code":3470},"\n相关代码：\n```javascript\n[粘贴代码]\n",[3472],{"type":26,"tag":235,"props":3473,"children":3474},{"__ignoreMap":7},[3475],{"type":31,"value":3470},{"type":26,"tag":972,"props":3477,"children":3478},{},[],{"type":26,"tag":76,"props":3480,"children":3482},{"id":3481},"第二轮补充信息",[3483],{"type":31,"value":3484},"第二轮：补充信息",{"type":26,"tag":27,"props":3486,"children":3487},{},[3488],{"type":31,"value":3489},"根据你的建议，我添加了日志，发现：",{"type":26,"tag":186,"props":3491,"children":3492},{},[3493,3501],{"type":26,"tag":190,"props":3494,"children":3495},{},[3496],{"type":26,"tag":3103,"props":3497,"children":3498},{},[3499],{"type":31,"value":3500},"发现 1",{"type":26,"tag":190,"props":3502,"children":3503},{},[3504],{"type":26,"tag":3103,"props":3505,"children":3506},{},[3507],{"type":31,"value":3508},"发现 2",{"type":26,"tag":27,"props":3510,"children":3511},{},[3512,3514,3519],{"type":31,"value":3513},"这是否说明问题出在 ",{"type":26,"tag":3103,"props":3515,"children":3516},{},[3517],{"type":31,"value":3518},"你的猜测",{"type":31,"value":3520},"？",{"type":26,"tag":972,"props":3522,"children":3523},{},[],{"type":26,"tag":76,"props":3525,"children":3527},{"id":3526},"第三轮确认修复",[3528],{"type":31,"value":3529},"第三轮：确认修复",{"type":26,"tag":27,"props":3531,"children":3532},{},[3533],{"type":31,"value":3534},"我按照你的建议修改了代码：",{"type":26,"tag":227,"props":3536,"children":3539},{"code":3537,"language":3265,"meta":7,"className":3538},"[粘贴修改后的代码]\n",[3267],[3540],{"type":26,"tag":235,"props":3541,"children":3542},{"__ignoreMap":7},[3543],{"type":31,"value":3537},{"type":26,"tag":27,"props":3545,"children":3546},{},[3547],{"type":31,"value":3548},"请确认这个修复是否正确，以及是否有其他潜在问题。",{"type":26,"tag":972,"props":3550,"children":3551},{},[],{"type":26,"tag":76,"props":3553,"children":3555},{"id":3554},"第四轮预防",[3556],{"type":31,"value":3557},"第四轮：预防",{"type":26,"tag":27,"props":3559,"children":3560},{},[3561],{"type":31,"value":3562},"这个问题已解决。请建议：",{"type":26,"tag":902,"props":3564,"children":3565},{},[3566,3571,3576],{"type":26,"tag":190,"props":3567,"children":3568},{},[3569],{"type":31,"value":3570},"如何防止类似问题再次发生？",{"type":26,"tag":190,"props":3572,"children":3573},{},[3574],{"type":31,"value":3575},"应该添加什么测试用例？",{"type":26,"tag":190,"props":3577,"children":3578},{},[3579],{"type":31,"value":3580},"有什么最佳实践可以参考？",{"type":26,"tag":227,"props":3582,"children":3584},{"code":3583},"\n## 结语：AI 是放大器，不是替代品\n\nAI 调试工具能够显著加速问题排查过程，但它不能替代你的思考。最有价值的能力组合是：\n\n- **你的领域知识** + **AI 的广博见识**\n- **你对项目的理解** + **AI 的分析能力**\n- **你的判断力** + **AI 的执行速度**\n\n调试的本质是假设-验证的循环。AI 帮你更快地生成假设、更高效地验证假设，但做出最终判断的还是你。\n\n学会与 AI 高效协作调试，不是依赖 AI 给你答案，而是让 AI 帮你更快地找到自己的答案。\n\n---\n\n## 参考资源\n\n- [Chrome DevTools 官方文档](https://developer.chrome.com/docs/devtools)\n- [Node.js 调试指南](https://nodejs.org/en/docs/guides/debugging-getting-started)\n- [React DevTools 使用指南](https://react.dev/learn/react-developer-tools)\n",[3585],{"type":26,"tag":235,"props":3586,"children":3587},{"__ignoreMap":7},[3588],{"type":31,"value":3583},{"title":7,"searchDepth":835,"depth":835,"links":3590},[3591,3592,3593,3598,3602,3607,3611,3615,3616,3617],{"id":2974,"depth":838,"text":2977},{"id":2980,"depth":838,"text":2983},{"id":3001,"depth":838,"text":3004,"children":3594},[3595,3596,3597],{"id":3007,"depth":835,"text":3010},{"id":3085,"depth":835,"text":3088},{"id":3250,"depth":835,"text":3253},{"id":3292,"depth":838,"text":3295,"children":3599},[3600,3601],{"id":3298,"depth":835,"text":3301},{"id":3318,"depth":835,"text":3321},{"id":3338,"depth":838,"text":3341,"children":3603},[3604,3605,3606],{"id":3344,"depth":835,"text":3347},{"id":3359,"depth":835,"text":3362},{"id":3374,"depth":835,"text":3377},{"id":3391,"depth":838,"text":3394,"children":3608},[3609,3610],{"id":3397,"depth":835,"text":3400},{"id":3412,"depth":835,"text":3415},{"id":3427,"depth":838,"text":3430,"children":3612},[3613,3614],{"id":3433,"depth":835,"text":3436},{"id":3447,"depth":835,"text":3450},{"id":3481,"depth":838,"text":3484},{"id":3526,"depth":838,"text":3529},{"id":3554,"depth":838,"text":3557},"content:topics:ai:ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":3622,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":3623,"_type":848,"_id":849,"_source":850,"_file":851,"_stem":852,"_extension":853},[13,14,15,16],{"type":23,"children":3624,"toc":4283},[3625,3629,3633,3657,3661,3730,3734,3738,3742,3761,3765,3769,3773,3781,3791,3795,3803,3807,3811,3815,3879,3883,3887,3891,3910,3914,3922,3926,3930,3938,3942,3946,3950,3961,3965,3969,4038,4042,4046,4050,4136,4140,4144,4148,4152,4156,4240,4244,4248,4252],{"type":26,"tag":27,"props":3626,"children":3627},{},[3628],{"type":31,"value":32},{"type":26,"tag":27,"props":3630,"children":3631},{},[3632],{"type":31,"value":37},{"type":26,"tag":27,"props":3634,"children":3635},{},[3636,3637,3641,3642,3646,3647,3651,3652,3656],{"type":31,"value":42},{"type":26,"tag":44,"props":3638,"children":3639},{"href":46},[3640],{"type":31,"value":49},{"type":31,"value":51},{"type":26,"tag":44,"props":3643,"children":3644},{"href":54},[3645],{"type":31,"value":57},{"type":31,"value":51},{"type":26,"tag":44,"props":3648,"children":3649},{"href":61},[3650],{"type":31,"value":64},{"type":31,"value":66},{"type":26,"tag":44,"props":3653,"children":3654},{"href":69},[3655],{"type":31,"value":72},{"type":31,"value":74},{"type":26,"tag":76,"props":3658,"children":3659},{"id":78},[3660],{"type":31,"value":81},{"type":26,"tag":83,"props":3662,"children":3663},{},[3664,3682],{"type":26,"tag":87,"props":3665,"children":3666},{},[3667],{"type":26,"tag":91,"props":3668,"children":3669},{},[3670,3674,3678],{"type":26,"tag":95,"props":3671,"children":3672},{},[3673],{"type":31,"value":99},{"type":26,"tag":95,"props":3675,"children":3676},{},[3677],{"type":31,"value":104},{"type":26,"tag":95,"props":3679,"children":3680},{},[3681],{"type":31,"value":109},{"type":26,"tag":111,"props":3683,"children":3684},{},[3685,3700,3715],{"type":26,"tag":91,"props":3686,"children":3687},{},[3688,3692,3696],{"type":26,"tag":118,"props":3689,"children":3690},{},[3691],{"type":31,"value":122},{"type":26,"tag":118,"props":3693,"children":3694},{},[3695],{"type":31,"value":127},{"type":26,"tag":118,"props":3697,"children":3698},{},[3699],{"type":31,"value":132},{"type":26,"tag":91,"props":3701,"children":3702},{},[3703,3707,3711],{"type":26,"tag":118,"props":3704,"children":3705},{},[3706],{"type":31,"value":140},{"type":26,"tag":118,"props":3708,"children":3709},{},[3710],{"type":31,"value":145},{"type":26,"tag":118,"props":3712,"children":3713},{},[3714],{"type":31,"value":150},{"type":26,"tag":91,"props":3716,"children":3717},{},[3718,3722,3726],{"type":26,"tag":118,"props":3719,"children":3720},{},[3721],{"type":31,"value":158},{"type":26,"tag":118,"props":3723,"children":3724},{},[3725],{"type":31,"value":163},{"type":26,"tag":118,"props":3727,"children":3728},{},[3729],{"type":31,"value":168},{"type":26,"tag":27,"props":3731,"children":3732},{},[3733],{"type":31,"value":173},{"type":26,"tag":76,"props":3735,"children":3736},{"id":176},[3737],{"type":31,"value":179},{"type":26,"tag":27,"props":3739,"children":3740},{},[3741],{"type":31,"value":184},{"type":26,"tag":186,"props":3743,"children":3744},{},[3745,3749,3753,3757],{"type":26,"tag":190,"props":3746,"children":3747},{},[3748],{"type":31,"value":194},{"type":26,"tag":190,"props":3750,"children":3751},{},[3752],{"type":31,"value":199},{"type":26,"tag":190,"props":3754,"children":3755},{},[3756],{"type":31,"value":204},{"type":26,"tag":190,"props":3758,"children":3759},{},[3760],{"type":31,"value":209},{"type":26,"tag":27,"props":3762,"children":3763},{},[3764],{"type":31,"value":214},{"type":26,"tag":76,"props":3766,"children":3767},{"id":217},[3768],{"type":31,"value":220},{"type":26,"tag":27,"props":3770,"children":3771},{},[3772],{"type":31,"value":225},{"type":26,"tag":227,"props":3774,"children":3776},{"className":3775,"code":231,"language":232,"meta":7},[230],[3777],{"type":26,"tag":235,"props":3778,"children":3779},{"__ignoreMap":7},[3780],{"type":31,"value":231},{"type":26,"tag":27,"props":3782,"children":3783},{},[3784,3785,3790],{"type":31,"value":243},{"type":26,"tag":235,"props":3786,"children":3788},{"className":3787},[],[3789],{"type":31,"value":249},{"type":31,"value":251},{"type":26,"tag":27,"props":3792,"children":3793},{},[3794],{"type":31,"value":256},{"type":26,"tag":227,"props":3796,"children":3798},{"className":3797,"code":260,"language":232,"meta":7},[230],[3799],{"type":26,"tag":235,"props":3800,"children":3801},{"__ignoreMap":7},[3802],{"type":31,"value":260},{"type":26,"tag":27,"props":3804,"children":3805},{},[3806],{"type":31,"value":270},{"type":26,"tag":76,"props":3808,"children":3809},{"id":273},[3810],{"type":31,"value":276},{"type":26,"tag":27,"props":3812,"children":3813},{},[3814],{"type":31,"value":281},{"type":26,"tag":83,"props":3816,"children":3817},{},[3818,3832],{"type":26,"tag":87,"props":3819,"children":3820},{},[3821],{"type":26,"tag":91,"props":3822,"children":3823},{},[3824,3828],{"type":26,"tag":95,"props":3825,"children":3826},{},[3827],{"type":31,"value":295},{"type":26,"tag":95,"props":3829,"children":3830},{},[3831],{"type":31,"value":300},{"type":26,"tag":111,"props":3833,"children":3834},{},[3835,3846,3857,3868],{"type":26,"tag":91,"props":3836,"children":3837},{},[3838,3842],{"type":26,"tag":118,"props":3839,"children":3840},{},[3841],{"type":31,"value":311},{"type":26,"tag":118,"props":3843,"children":3844},{},[3845],{"type":31,"value":316},{"type":26,"tag":91,"props":3847,"children":3848},{},[3849,3853],{"type":26,"tag":118,"props":3850,"children":3851},{},[3852],{"type":31,"value":324},{"type":26,"tag":118,"props":3854,"children":3855},{},[3856],{"type":31,"value":329},{"type":26,"tag":91,"props":3858,"children":3859},{},[3860,3864],{"type":26,"tag":118,"props":3861,"children":3862},{},[3863],{"type":31,"value":337},{"type":26,"tag":118,"props":3865,"children":3866},{},[3867],{"type":31,"value":342},{"type":26,"tag":91,"props":3869,"children":3870},{},[3871,3875],{"type":26,"tag":118,"props":3872,"children":3873},{},[3874],{"type":31,"value":350},{"type":26,"tag":118,"props":3876,"children":3877},{},[3878],{"type":31,"value":355},{"type":26,"tag":27,"props":3880,"children":3881},{},[3882],{"type":31,"value":360},{"type":26,"tag":76,"props":3884,"children":3885},{"id":363},[3886],{"type":31,"value":366},{"type":26,"tag":27,"props":3888,"children":3889},{},[3890],{"type":31,"value":371},{"type":26,"tag":186,"props":3892,"children":3893},{},[3894,3898,3902,3906],{"type":26,"tag":190,"props":3895,"children":3896},{},[3897],{"type":31,"value":379},{"type":26,"tag":190,"props":3899,"children":3900},{},[3901],{"type":31,"value":384},{"type":26,"tag":190,"props":3903,"children":3904},{},[3905],{"type":31,"value":389},{"type":26,"tag":190,"props":3907,"children":3908},{},[3909],{"type":31,"value":394},{"type":26,"tag":27,"props":3911,"children":3912},{},[3913],{"type":31,"value":399},{"type":26,"tag":227,"props":3915,"children":3917},{"className":3916,"code":403,"language":232,"meta":7},[230],[3918],{"type":26,"tag":235,"props":3919,"children":3920},{"__ignoreMap":7},[3921],{"type":31,"value":403},{"type":26,"tag":27,"props":3923,"children":3924},{},[3925],{"type":31,"value":413},{"type":26,"tag":27,"props":3927,"children":3928},{},[3929],{"type":31,"value":418},{"type":26,"tag":227,"props":3931,"children":3933},{"className":3932,"code":422,"language":232,"meta":7},[230],[3934],{"type":26,"tag":235,"props":3935,"children":3936},{"__ignoreMap":7},[3937],{"type":31,"value":422},{"type":26,"tag":27,"props":3939,"children":3940},{},[3941],{"type":31,"value":432},{"type":26,"tag":76,"props":3943,"children":3944},{"id":435},[3945],{"type":31,"value":438},{"type":26,"tag":27,"props":3947,"children":3948},{},[3949],{"type":31,"value":443},{"type":26,"tag":186,"props":3951,"children":3952},{},[3953,3957],{"type":26,"tag":190,"props":3954,"children":3955},{},[3956],{"type":31,"value":451},{"type":26,"tag":190,"props":3958,"children":3959},{},[3960],{"type":31,"value":456},{"type":26,"tag":27,"props":3962,"children":3963},{},[3964],{"type":31,"value":461},{"type":26,"tag":27,"props":3966,"children":3967},{},[3968],{"type":31,"value":466},{"type":26,"tag":83,"props":3970,"children":3971},{},[3972,3990],{"type":26,"tag":87,"props":3973,"children":3974},{},[3975],{"type":26,"tag":91,"props":3976,"children":3977},{},[3978,3982,3986],{"type":26,"tag":95,"props":3979,"children":3980},{},[3981],{"type":31,"value":480},{"type":26,"tag":95,"props":3983,"children":3984},{},[3985],{"type":31,"value":485},{"type":26,"tag":95,"props":3987,"children":3988},{},[3989],{"type":31,"value":109},{"type":26,"tag":111,"props":3991,"children":3992},{},[3993,4008,4023],{"type":26,"tag":91,"props":3994,"children":3995},{},[3996,4000,4004],{"type":26,"tag":118,"props":3997,"children":3998},{},[3999],{"type":31,"value":500},{"type":26,"tag":118,"props":4001,"children":4002},{},[4003],{"type":31,"value":505},{"type":26,"tag":118,"props":4005,"children":4006},{},[4007],{"type":31,"value":510},{"type":26,"tag":91,"props":4009,"children":4010},{},[4011,4015,4019],{"type":26,"tag":118,"props":4012,"children":4013},{},[4014],{"type":31,"value":518},{"type":26,"tag":118,"props":4016,"children":4017},{},[4018],{"type":31,"value":523},{"type":26,"tag":118,"props":4020,"children":4021},{},[4022],{"type":31,"value":150},{"type":26,"tag":91,"props":4024,"children":4025},{},[4026,4030,4034],{"type":26,"tag":118,"props":4027,"children":4028},{},[4029],{"type":31,"value":535},{"type":26,"tag":118,"props":4031,"children":4032},{},[4033],{"type":31,"value":540},{"type":26,"tag":118,"props":4035,"children":4036},{},[4037],{"type":31,"value":545},{"type":26,"tag":27,"props":4039,"children":4040},{},[4041],{"type":31,"value":550},{"type":26,"tag":76,"props":4043,"children":4044},{"id":553},[4045],{"type":31,"value":556},{"type":26,"tag":27,"props":4047,"children":4048},{},[4049],{"type":31,"value":561},{"type":26,"tag":83,"props":4051,"children":4052},{},[4053,4067],{"type":26,"tag":87,"props":4054,"children":4055},{},[4056],{"type":26,"tag":91,"props":4057,"children":4058},{},[4059,4063],{"type":26,"tag":95,"props":4060,"children":4061},{},[4062],{"type":31,"value":575},{"type":26,"tag":95,"props":4064,"children":4065},{},[4066],{"type":31,"value":580},{"type":26,"tag":111,"props":4068,"children":4069},{},[4070,4081,4092,4103,4114,4125],{"type":26,"tag":91,"props":4071,"children":4072},{},[4073,4077],{"type":26,"tag":118,"props":4074,"children":4075},{},[4076],{"type":31,"value":591},{"type":26,"tag":118,"props":4078,"children":4079},{},[4080],{"type":31,"value":596},{"type":26,"tag":91,"props":4082,"children":4083},{},[4084,4088],{"type":26,"tag":118,"props":4085,"children":4086},{},[4087],{"type":31,"value":604},{"type":26,"tag":118,"props":4089,"children":4090},{},[4091],{"type":31,"value":609},{"type":26,"tag":91,"props":4093,"children":4094},{},[4095,4099],{"type":26,"tag":118,"props":4096,"children":4097},{},[4098],{"type":31,"value":617},{"type":26,"tag":118,"props":4100,"children":4101},{},[4102],{"type":31,"value":622},{"type":26,"tag":91,"props":4104,"children":4105},{},[4106,4110],{"type":26,"tag":118,"props":4107,"children":4108},{},[4109],{"type":31,"value":630},{"type":26,"tag":118,"props":4111,"children":4112},{},[4113],{"type":31,"value":635},{"type":26,"tag":91,"props":4115,"children":4116},{},[4117,4121],{"type":26,"tag":118,"props":4118,"children":4119},{},[4120],{"type":31,"value":643},{"type":26,"tag":118,"props":4122,"children":4123},{},[4124],{"type":31,"value":648},{"type":26,"tag":91,"props":4126,"children":4127},{},[4128,4132],{"type":26,"tag":118,"props":4129,"children":4130},{},[4131],{"type":31,"value":656},{"type":26,"tag":118,"props":4133,"children":4134},{},[4135],{"type":31,"value":661},{"type":26,"tag":27,"props":4137,"children":4138},{},[4139],{"type":31,"value":666},{"type":26,"tag":76,"props":4141,"children":4142},{"id":669},[4143],{"type":31,"value":672},{"type":26,"tag":27,"props":4145,"children":4146},{},[4147],{"type":31,"value":677},{"type":26,"tag":27,"props":4149,"children":4150},{},[4151],{"type":31,"value":682},{"type":26,"tag":76,"props":4153,"children":4154},{"id":685},[4155],{"type":31,"value":688},{"type":26,"tag":186,"props":4157,"children":4159},{"className":4158},[692],[4160,4168,4176,4184,4192,4200,4208,4216,4224,4232],{"type":26,"tag":190,"props":4161,"children":4163},{"className":4162},[697],[4164,4167],{"type":26,"tag":700,"props":4165,"children":4166},{"disabled":702,"type":703},[],{"type":31,"value":706},{"type":26,"tag":190,"props":4169,"children":4171},{"className":4170},[697],[4172,4175],{"type":26,"tag":700,"props":4173,"children":4174},{"disabled":702,"type":703},[],{"type":31,"value":715},{"type":26,"tag":190,"props":4177,"children":4179},{"className":4178},[697],[4180,4183],{"type":26,"tag":700,"props":4181,"children":4182},{"disabled":702,"type":703},[],{"type":31,"value":724},{"type":26,"tag":190,"props":4185,"children":4187},{"className":4186},[697],[4188,4191],{"type":26,"tag":700,"props":4189,"children":4190},{"disabled":702,"type":703},[],{"type":31,"value":733},{"type":26,"tag":190,"props":4193,"children":4195},{"className":4194},[697],[4196,4199],{"type":26,"tag":700,"props":4197,"children":4198},{"disabled":702,"type":703},[],{"type":31,"value":742},{"type":26,"tag":190,"props":4201,"children":4203},{"className":4202},[697],[4204,4207],{"type":26,"tag":700,"props":4205,"children":4206},{"disabled":702,"type":703},[],{"type":31,"value":751},{"type":26,"tag":190,"props":4209,"children":4211},{"className":4210},[697],[4212,4215],{"type":26,"tag":700,"props":4213,"children":4214},{"disabled":702,"type":703},[],{"type":31,"value":760},{"type":26,"tag":190,"props":4217,"children":4219},{"className":4218},[697],[4220,4223],{"type":26,"tag":700,"props":4221,"children":4222},{"disabled":702,"type":703},[],{"type":31,"value":769},{"type":26,"tag":190,"props":4225,"children":4227},{"className":4226},[697],[4228,4231],{"type":26,"tag":700,"props":4229,"children":4230},{"disabled":702,"type":703},[],{"type":31,"value":778},{"type":26,"tag":190,"props":4233,"children":4235},{"className":4234},[697],[4236,4239],{"type":26,"tag":700,"props":4237,"children":4238},{"disabled":702,"type":703},[],{"type":31,"value":787},{"type":26,"tag":76,"props":4241,"children":4242},{"id":790},[4243],{"type":31,"value":790},{"type":26,"tag":27,"props":4245,"children":4246},{},[4247],{"type":31,"value":797},{"type":26,"tag":27,"props":4249,"children":4250},{},[4251],{"type":31,"value":802},{"type":26,"tag":186,"props":4253,"children":4254},{},[4255,4262,4269,4276],{"type":26,"tag":190,"props":4256,"children":4257},{},[4258],{"type":26,"tag":44,"props":4259,"children":4260},{"href":46},[4261],{"type":31,"value":49},{"type":26,"tag":190,"props":4263,"children":4264},{},[4265],{"type":26,"tag":44,"props":4266,"children":4267},{"href":54},[4268],{"type":31,"value":57},{"type":26,"tag":190,"props":4270,"children":4271},{},[4272],{"type":26,"tag":44,"props":4273,"children":4274},{"href":61},[4275],{"type":31,"value":64},{"type":26,"tag":190,"props":4277,"children":4278},{},[4279],{"type":26,"tag":44,"props":4280,"children":4281},{"href":69},[4282],{"type":31,"value":72},{"title":7,"searchDepth":835,"depth":835,"links":4284},[4285,4286,4287,4288,4289,4290,4291,4292,4293,4294],{"id":78,"depth":838,"text":81},{"id":176,"depth":838,"text":179},{"id":217,"depth":838,"text":220},{"id":273,"depth":838,"text":276},{"id":363,"depth":838,"text":366},{"id":435,"depth":838,"text":438},{"id":553,"depth":838,"text":556},{"id":669,"depth":838,"text":672},{"id":685,"depth":838,"text":688},{"id":790,"depth":838,"text":790},1778574586171]