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