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