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