[{"data":1,"prerenderedAt":645},["ShallowReactive",2],{"content-query-akOrDmSRwy":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"lastUpdated":10,"body":11,"_type":639,"_id":640,"_source":641,"_file":642,"_stem":643,"_extension":644},"\u002Fparadigms\u002Fagentic-coding","paradigms",false,"","Agentic Coding 智能体编程","AI自主执行的工程化编程范式","2026-04-23",{"type":12,"children":13,"toc":625},"root",[14,23,29,48,53,62,66,71,76,168,171,177,308,311,317,322,357,360,364,387,390,395,418,421,427,432,475,480,483,488,493,537,540,546,554,559,569,574,582,592,595,600],{"type":15,"tag":16,"props":17,"children":19},"element","h1",{"id":18},"agentic-coding智能体编程",[20],{"type":21,"value":22},"text","Agentic Coding（智能体编程）",{"type":15,"tag":24,"props":25,"children":27},"h2",{"id":26},"定义与本质",[28],{"type":21,"value":26},{"type":15,"tag":30,"props":31,"children":32},"p",{},[33,39,41,46],{"type":15,"tag":34,"props":35,"children":36},"strong",{},[37],{"type":21,"value":38},"Agentic Coding",{"type":21,"value":40},"（智能体编程）是AI编程的高阶范式，其核心是",{"type":15,"tag":34,"props":42,"children":43},{},[44],{"type":21,"value":45},"将AI从\"被动响应的助手\"升级为\"主动执行的智能体\"",{"type":21,"value":47},"。",{"type":15,"tag":30,"props":49,"children":50},{},[51],{"type":21,"value":52},"AI能自主理解需求、拆解任务、调用工具、执行代码，并根据环境反馈（如测试结果、语法错误）完成闭环迭代。",{"type":15,"tag":54,"props":55,"children":56},"blockquote",{},[57],{"type":15,"tag":30,"props":58,"children":59},{},[60],{"type":21,"value":61},"\"AI不仅能生成代码，还能像人类工程师一样思考——例如'开发一个用户管理系统'，AI会先拆解为'数据库设计→后端接口→前端页面→测试用例'四个子任务，再逐一执行，最终输出完整的可运行项目。\"",{"type":15,"tag":63,"props":64,"children":65},"hr",{},[],{"type":15,"tag":24,"props":67,"children":69},{"id":68},"核心机制",[70],{"type":21,"value":68},{"type":15,"tag":30,"props":72,"children":73},{},[74],{"type":21,"value":75},"Agentic Coding的核心能力源于\"LLM大脑 + 规划能力 + 记忆机制 + 工具调用\"的四层架构：",{"type":15,"tag":77,"props":78,"children":79},"table",{},[80,99],{"type":15,"tag":81,"props":82,"children":83},"thead",{},[84],{"type":15,"tag":85,"props":86,"children":87},"tr",{},[88,94],{"type":15,"tag":89,"props":90,"children":91},"th",{},[92],{"type":21,"value":93},"组件",{"type":15,"tag":89,"props":95,"children":96},{},[97],{"type":21,"value":98},"功能描述",{"type":15,"tag":100,"props":101,"children":102},"tbody",{},[103,120,136,152],{"type":15,"tag":85,"props":104,"children":105},{},[106,115],{"type":15,"tag":107,"props":108,"children":109},"td",{},[110],{"type":15,"tag":34,"props":111,"children":112},{},[113],{"type":21,"value":114},"LLM大脑",{"type":15,"tag":107,"props":116,"children":117},{},[118],{"type":21,"value":119},"负责自然语言理解、逻辑推理与任务决策",{"type":15,"tag":85,"props":121,"children":122},{},[123,131],{"type":15,"tag":107,"props":124,"children":125},{},[126],{"type":15,"tag":34,"props":127,"children":128},{},[129],{"type":21,"value":130},"规划能力",{"type":15,"tag":107,"props":132,"children":133},{},[134],{"type":21,"value":135},"基于思维链(CoT)、思维树(ToT)算法，将复杂需求拆解为可执行的子任务",{"type":15,"tag":85,"props":137,"children":138},{},[139,147],{"type":15,"tag":107,"props":140,"children":141},{},[142],{"type":15,"tag":34,"props":143,"children":144},{},[145],{"type":21,"value":146},"记忆机制",{"type":15,"tag":107,"props":148,"children":149},{},[150],{"type":21,"value":151},"短期记忆（上下文窗口）+ 长期记忆（向量数据库），效率提升约40%",{"type":15,"tag":85,"props":153,"children":154},{},[155,163],{"type":15,"tag":107,"props":156,"children":157},{},[158],{"type":15,"tag":34,"props":159,"children":160},{},[161],{"type":21,"value":162},"工具调用",{"type":15,"tag":107,"props":164,"children":165},{},[166],{"type":21,"value":167},"支持调用IDE工具、终端命令、第三方API等外部资源",{"type":15,"tag":63,"props":169,"children":170},{},[],{"type":15,"tag":24,"props":172,"children":174},{"id":173},"与传统ai编程的差异",[175],{"type":21,"value":176},"与传统AI编程的差异",{"type":15,"tag":77,"props":178,"children":179},{},[180,200],{"type":15,"tag":81,"props":181,"children":182},{},[183],{"type":15,"tag":85,"props":184,"children":185},{},[186,191,196],{"type":15,"tag":89,"props":187,"children":188},{},[189],{"type":21,"value":190},"维度",{"type":15,"tag":89,"props":192,"children":193},{},[194],{"type":21,"value":195},"代码补全\u002F氛围编程",{"type":15,"tag":89,"props":197,"children":198},{},[199],{"type":21,"value":38},{"type":15,"tag":100,"props":201,"children":202},{},[203,224,245,266,287],{"type":15,"tag":85,"props":204,"children":205},{},[206,214,219],{"type":15,"tag":107,"props":207,"children":208},{},[209],{"type":15,"tag":34,"props":210,"children":211},{},[212],{"type":21,"value":213},"角色定位",{"type":15,"tag":107,"props":215,"children":216},{},[217],{"type":21,"value":218},"被动响应，需人类触发每一次生成",{"type":15,"tag":107,"props":220,"children":221},{},[222],{"type":21,"value":223},"主动的全流程执行者，可自主规划任务",{"type":15,"tag":85,"props":225,"children":226},{},[227,235,240],{"type":15,"tag":107,"props":228,"children":229},{},[230],{"type":15,"tag":34,"props":231,"children":232},{},[233],{"type":21,"value":234},"上下文范围",{"type":15,"tag":107,"props":236,"children":237},{},[238],{"type":21,"value":239},"单文件\u002F函数级",{"type":15,"tag":107,"props":241,"children":242},{},[243],{"type":21,"value":244},"项目级\u002F仓库级，可理解整个代码库的架构",{"type":15,"tag":85,"props":246,"children":247},{},[248,256,261],{"type":15,"tag":107,"props":249,"children":250},{},[251],{"type":15,"tag":34,"props":252,"children":253},{},[254],{"type":21,"value":255},"工具调用能力",{"type":15,"tag":107,"props":257,"children":258},{},[259],{"type":21,"value":260},"无或受限，仅能生成代码",{"type":15,"tag":107,"props":262,"children":263},{},[264],{"type":21,"value":265},"支持终端执行、测试运行、API调用等全工具链",{"type":15,"tag":85,"props":267,"children":268},{},[269,277,282],{"type":15,"tag":107,"props":270,"children":271},{},[272],{"type":15,"tag":34,"props":273,"children":274},{},[275],{"type":21,"value":276},"质量控制",{"type":15,"tag":107,"props":278,"children":279},{},[280],{"type":21,"value":281},"无内置校验，需人工完全负责",{"type":15,"tag":107,"props":283,"children":284},{},[285],{"type":21,"value":286},"结构化审查、多层级验证，错误修复成功率达85%以上",{"type":15,"tag":85,"props":288,"children":289},{},[290,298,303],{"type":15,"tag":107,"props":291,"children":292},{},[293],{"type":15,"tag":34,"props":294,"children":295},{},[296],{"type":21,"value":297},"适用场景",{"type":15,"tag":107,"props":299,"children":300},{},[301],{"type":21,"value":302},"日常编码、原型验证",{"type":15,"tag":107,"props":304,"children":305},{},[306],{"type":21,"value":307},"企业级功能开发、复杂系统重构、全项目交付",{"type":15,"tag":63,"props":309,"children":310},{},[],{"type":15,"tag":24,"props":312,"children":314},{"id":313},"与spec-coding的关系",[315],{"type":21,"value":316},"与Spec Coding的关系",{"type":15,"tag":30,"props":318,"children":319},{},[320],{"type":21,"value":321},"Spec Coding 和 Agentic Coding 互补而非替代：",{"type":15,"tag":323,"props":324,"children":325},"ul",{},[326,337,347],{"type":15,"tag":327,"props":328,"children":329},"li",{},[330,335],{"type":15,"tag":34,"props":331,"children":332},{},[333],{"type":21,"value":334},"Spec Coding 管\"做什么\"",{"type":21,"value":336},"：用规格定义需求和验收标准",{"type":15,"tag":327,"props":338,"children":339},{},[340,345],{"type":15,"tag":34,"props":341,"children":342},{},[343],{"type":21,"value":344},"Agentic Coding 管\"怎么做\"",{"type":21,"value":346},"：让AI自主规划和执行",{"type":15,"tag":327,"props":348,"children":349},{},[350,355],{"type":15,"tag":34,"props":351,"children":352},{},[353],{"type":21,"value":354},"最佳实践",{"type":21,"value":356},"：Spec 定义边界，Agent 在边界内自主发挥——用规格约束智能体的行为范围，用智能体提升规格的落地效率",{"type":15,"tag":63,"props":358,"children":359},{},[],{"type":15,"tag":24,"props":361,"children":362},{"id":297},[363],{"type":21,"value":297},{"type":15,"tag":323,"props":365,"children":366},{},[367,372,377,382],{"type":15,"tag":327,"props":368,"children":369},{},[370],{"type":21,"value":371},"企业级项目",{"type":15,"tag":327,"props":373,"children":374},{},[375],{"type":21,"value":376},"团队开发",{"type":15,"tag":327,"props":378,"children":379},{},[380],{"type":21,"value":381},"复杂系统重构",{"type":15,"tag":327,"props":383,"children":384},{},[385],{"type":21,"value":386},"全项目交付",{"type":15,"tag":63,"props":388,"children":389},{},[],{"type":15,"tag":24,"props":391,"children":393},{"id":392},"代表工具",[394],{"type":21,"value":392},{"type":15,"tag":323,"props":396,"children":397},{},[398,403,408,413],{"type":15,"tag":327,"props":399,"children":400},{},[401],{"type":21,"value":402},"Trae SOLO",{"type":15,"tag":327,"props":404,"children":405},{},[406],{"type":21,"value":407},"Claude Code",{"type":15,"tag":327,"props":409,"children":410},{},[411],{"type":21,"value":412},"Cursor Composer",{"type":15,"tag":327,"props":414,"children":415},{},[416],{"type":21,"value":417},"DevIn",{"type":15,"tag":63,"props":419,"children":420},{},[],{"type":15,"tag":24,"props":422,"children":424},{"id":423},"工程控制harness层",[425],{"type":21,"value":426},"工程控制：Harness层",{"type":15,"tag":30,"props":428,"children":429},{},[430],{"type":21,"value":431},"Agentic Coding 的高阶实践离不开工程控制——即如何管理AI Agent的行为：",{"type":15,"tag":323,"props":433,"children":434},{},[435,445,455,465],{"type":15,"tag":327,"props":436,"children":437},{},[438,443],{"type":15,"tag":34,"props":439,"children":440},{},[441],{"type":21,"value":442},"指令系统",{"type":21,"value":444},"：AGENTS.md \u002F CLAUDE.md 定义角色、规则、边界",{"type":15,"tag":327,"props":446,"children":447},{},[448,453],{"type":15,"tag":34,"props":449,"children":450},{},[451],{"type":21,"value":452},"验证门禁",{"type":21,"value":454},"：类型检查、测试、Lint、安全扫描——Agent修改的每段代码都需通过",{"type":15,"tag":327,"props":456,"children":457},{},[458,463],{"type":15,"tag":34,"props":459,"children":460},{},[461],{"type":21,"value":462},"状态追踪",{"type":21,"value":464},"：任务进度、错误恢复、执行日志",{"type":15,"tag":327,"props":466,"children":467},{},[468,473],{"type":15,"tag":34,"props":469,"children":470},{},[471],{"type":21,"value":472},"人类审查点",{"type":21,"value":474},"：关键决策需要人类确认，而非完全放权",{"type":15,"tag":30,"props":476,"children":477},{},[478],{"type":21,"value":479},"这本质上是\"AI-Native 的 DevOps\"——不是让AI写代码，而是为AI构建可靠的生产环境。",{"type":15,"tag":63,"props":481,"children":482},{},[],{"type":15,"tag":24,"props":484,"children":486},{"id":485},"协同策略",[487],{"type":21,"value":485},{"type":15,"tag":30,"props":489,"children":490},{},[491],{"type":21,"value":492},"四个范式在实际开发中并非互斥，而是按需组合：",{"type":15,"tag":494,"props":495,"children":496},"ol",{},[497,507,517,527],{"type":15,"tag":327,"props":498,"children":499},{},[500,505],{"type":15,"tag":34,"props":501,"children":502},{},[503],{"type":21,"value":504},"探索阶段",{"type":21,"value":506},"：用 Vibe Coding 快速生成原型，验证想法",{"type":15,"tag":327,"props":508,"children":509},{},[510,515],{"type":15,"tag":34,"props":511,"children":512},{},[513],{"type":21,"value":514},"规格阶段",{"type":21,"value":516},"：用 Spec Coding 定义需求和验收标准",{"type":15,"tag":327,"props":518,"children":519},{},[520,525],{"type":15,"tag":34,"props":521,"children":522},{},[523],{"type":21,"value":524},"实现阶段",{"type":21,"value":526},"：用 Agentic Coding 自主执行，按规格交付",{"type":15,"tag":327,"props":528,"children":529},{},[530,535],{"type":15,"tag":34,"props":531,"children":532},{},[533],{"type":21,"value":534},"日常编码",{"type":21,"value":536},"：Code Completion 始终开启，提升编码效率",{"type":15,"tag":63,"props":538,"children":539},{},[],{"type":15,"tag":24,"props":541,"children":543},{"id":542},"实战示例同一需求的-agentic-coding-写法",[544],{"type":21,"value":545},"实战示例：同一需求的 Agentic Coding 写法",{"type":15,"tag":54,"props":547,"children":548},{},[549],{"type":15,"tag":30,"props":550,"children":551},{},[552],{"type":21,"value":553},"需求：构建一个天气查询页面，调用 OpenWeatherMap API 显示当前天气",{"type":15,"tag":30,"props":555,"children":556},{},[557],{"type":21,"value":558},"描述业务目标，AI 自主规划并执行全流程：",{"type":15,"tag":560,"props":561,"children":563},"pre",{"code":562},"Prompt: \"做一个天气查询功能，要求生产级质量。\"\n",[564],{"type":15,"tag":565,"props":566,"children":567},"code",{"__ignoreMap":7},[568],{"type":21,"value":562},{"type":15,"tag":30,"props":570,"children":571},{},[572],{"type":21,"value":573},"AI 自主执行（无需人工干预）：",{"type":15,"tag":560,"props":575,"children":577},{"code":576},"📋 规划阶段\n├── 分析需求，确定技术栈：React + TypeScript + Tailwind\n├── 拆解任务：API层 → 类型定义 → 组件 → 测试 → 文档\n└── 生成执行计划\n\n⚙️ 执行阶段\n├── [1\u002F6] 创建项目结构和依赖配置\n├── [2\u002F6] 编写 API 封装层 + TypeScript 类型\n├── [3\u002F6] 实现 WeatherApp 组件 + 错误边界\n├── [4\u002F6] 编写单元测试（API mock + 组件渲染）\n├── [5\u002F6] 运行测试 → 发现 1 个失败 → 自动修复 → 全部通过\n└── [6\u002F6] 生成 README 文档\n\n✅ 输出\n├── 完整可运行的代码\n├── 通过的测试套件\n├── 项目文档\n└── 执行日志（每一步做了什么、为什么这么做）\n",[578],{"type":15,"tag":565,"props":579,"children":580},{"__ignoreMap":7},[581],{"type":21,"value":576},{"type":15,"tag":30,"props":583,"children":584},{},[585,590],{"type":15,"tag":34,"props":586,"children":587},{},[588],{"type":21,"value":589},"关键特征",{"type":21,"value":591},"：端到端自主交付。人类只做两件事——描述目标 + 最终审查。AI 像一个高级工程师一样思考、规划、执行、调试。适合复杂项目和团队交付。",{"type":15,"tag":63,"props":593,"children":594},{},[],{"type":15,"tag":24,"props":596,"children":598},{"id":597},"相关资源",[599],{"type":21,"value":597},{"type":15,"tag":323,"props":601,"children":602},{},[603,615],{"type":15,"tag":327,"props":604,"children":605},{},[606],{"type":15,"tag":607,"props":608,"children":612},"a",{"href":609,"rel":610},"https:\u002F\u002Fclaude.com\u002Fblog\u002Fintroduction-to-agentic-coding",[611],"nofollow",[613],{"type":21,"value":614},"Introduction to agentic coding - Anthropic",{"type":15,"tag":327,"props":616,"children":617},{},[618],{"type":15,"tag":607,"props":619,"children":622},{"href":620,"rel":621},"https:\u002F\u002Fjuejin.cn\u002Fpost\u002F7600601482690969646",[611],[623],{"type":21,"value":624},"AI代理化编程全面爆发",{"title":7,"searchDepth":626,"depth":626,"links":627},3,[628,630,631,632,633,634,635,636,637,638],{"id":26,"depth":629,"text":26},2,{"id":68,"depth":629,"text":68},{"id":173,"depth":629,"text":176},{"id":313,"depth":629,"text":316},{"id":297,"depth":629,"text":297},{"id":392,"depth":629,"text":392},{"id":423,"depth":629,"text":426},{"id":485,"depth":629,"text":485},{"id":542,"depth":629,"text":545},{"id":597,"depth":629,"text":597},"markdown","content:paradigms:agentic-coding.md","content","paradigms\u002Fagentic-coding.md","paradigms\u002Fagentic-coding","md",1777287374432]