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