[{"data":1,"prerenderedAt":3200},["ShallowReactive",2],{"content-query-4owfAIXPXw":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"lastUpdated":10,"body":11,"_type":1994,"_id":3195,"_source":3196,"_file":3197,"_stem":3198,"_extension":3199},"\u002Fmethodology\u002Fspec-driven","methodology",false,"","Spec 驱动开发","用结构化的Spec文档约束AI生成边界，含SpecKit工具链详解与Trae实战","2026-04-27",{"type":12,"children":13,"toc":3153},"root",[14,23,30,36,46,57,109,113,119,136,145,249,252,257,444,460,463,468,475,480,490,566,578,584,589,598,604,609,736,747,753,758,761,767,773,794,809,823,829,851,859,953,961,984,992,1012,1017,1138,1165,1170,1178,1206,1209,1215,1223,1252,1255,1261,1285,1294,1302,1319,1329,1332,1338,1365,1373,1381,1397,1406,1434,1437,1443,1463,1471,1479,1484,1487,1493,1513,1521,1529,1537,1573,1576,1582,1602,1605,1611,1630,1638,1646,1662,1685,1688,1694,1714,1722,1730,1733,1739,1759,1767,1775,1780,1783,1789,1905,1908,1914,1920,1956,1962,1970,1978,1986,1991,2270,2278,2283,2301,2309,2314,2322,2327,2330,2335,2340,2346,2478,2483,2488,2602,2607,2705,2708,2713,2719,2832,2838,2887,2893,2924,2927,2932,3103,3106,3147],{"type":15,"tag":16,"props":17,"children":19},"element","h1",{"id":18},"spec-driven-development规范驱动开发",[20],{"type":21,"value":22},"text","Spec-Driven Development（规范驱动开发）",{"type":15,"tag":24,"props":25,"children":27},"h2",{"id":26},"我应该用-spec-吗",[28],{"type":21,"value":29},"我应该用 Spec 吗？",{"type":15,"tag":31,"props":32,"children":33},"p",{},[34],{"type":21,"value":35},"在深入学习之前，先判断你的项目是否需要 Spec：",{"type":15,"tag":37,"props":38,"children":40},"pre",{"code":39},"你的项目是什么规模？\n│\n├─ 单文件 \u002F 小脚本 \u002F 个人项目\n│   → Chat 模式或 Plan 模式就够了，不需要 Spec\n│\n├─ 多文件 \u002F 中等复杂度 \u002F 2-5 人团队\n│   → 考虑 Spec 驱动开发，从轻量级 Spec 开始\n│\n└─ 大型项目 \u002F 企业级 \u002F 合规要求 \u002F 遗留系统改造\n    → 必须使用 Spec 驱动开发\n",[41],{"type":15,"tag":42,"props":43,"children":44},"code",{"__ignoreMap":7},[45],{"type":21,"value":39},{"type":15,"tag":31,"props":47,"children":48},{},[49,55],{"type":15,"tag":50,"props":51,"children":52},"strong",{},[53],{"type":21,"value":54},"快速判断",{"type":21,"value":56},"：",{"type":15,"tag":58,"props":59,"children":60},"ul",{},[61,74,86,98],{"type":15,"tag":62,"props":63,"children":64},"li",{},[65,67,72],{"type":21,"value":66},"AI 一次生成的代码你",{"type":15,"tag":50,"props":68,"children":69},{},[70],{"type":21,"value":71},"能在 10 分钟内审查完",{"type":21,"value":73}," → 不需要 Spec",{"type":15,"tag":62,"props":75,"children":76},{},[77,79,84],{"type":21,"value":78},"涉及",{"type":15,"tag":50,"props":80,"children":81},{},[82],{"type":21,"value":83},"多个文件的协同修改",{"type":21,"value":85}," → 建议用 Spec",{"type":15,"tag":62,"props":87,"children":88},{},[89,91,96],{"type":21,"value":90},"需要",{"type":15,"tag":50,"props":92,"children":93},{},[94],{"type":21,"value":95},"可追溯的需求文档",{"type":21,"value":97}," → 必须用 Spec",{"type":15,"tag":62,"props":99,"children":100},{},[101,103,108],{"type":21,"value":102},"有",{"type":15,"tag":50,"props":104,"children":105},{},[106],{"type":21,"value":107},"合规\u002F审计要求",{"type":21,"value":97},{"type":15,"tag":110,"props":111,"children":112},"hr",{},[],{"type":15,"tag":24,"props":114,"children":116},{"id":115},"什么是-spec-driven-development",[117],{"type":21,"value":118},"什么是 Spec-Driven Development",{"type":15,"tag":31,"props":120,"children":121},{},[122,127,129,134],{"type":15,"tag":50,"props":123,"children":124},{},[125],{"type":21,"value":126},"Spec-Driven Development",{"type":21,"value":128},"（规范驱动开发）是 AI 编程的主流工作流，核心是",{"type":15,"tag":50,"props":130,"children":131},{},[132],{"type":21,"value":133},"用结构化的 Spec 文档约束 AI 生成的边界",{"type":21,"value":135},"，将\"模糊需求\"转化为\"可执行的验收标准\"，从而解决 AI 的\"幻觉\"问题，提升代码质量。",{"type":15,"tag":31,"props":137,"children":138},{},[139,144],{"type":15,"tag":50,"props":140,"children":141},{},[142],{"type":21,"value":143},"传统开发 vs SDD",{"type":21,"value":56},{"type":15,"tag":146,"props":147,"children":148},"table",{},[149,172],{"type":15,"tag":150,"props":151,"children":152},"thead",{},[153],{"type":15,"tag":154,"props":155,"children":156},"tr",{},[157,163,168],{"type":15,"tag":158,"props":159,"children":160},"th",{},[161],{"type":21,"value":162},"维度",{"type":15,"tag":158,"props":164,"children":165},{},[166],{"type":21,"value":167},"传统开发",{"type":15,"tag":158,"props":169,"children":170},{},[171],{"type":21,"value":8},{"type":15,"tag":173,"props":174,"children":175},"tbody",{},[176,195,213,231],{"type":15,"tag":154,"props":177,"children":178},{},[179,185,190],{"type":15,"tag":180,"props":181,"children":182},"td",{},[183],{"type":21,"value":184},"流程",{"type":15,"tag":180,"props":186,"children":187},{},[188],{"type":21,"value":189},"需求 → 代码 → 文档（经常缺失）",{"type":15,"tag":180,"props":191,"children":192},{},[193],{"type":21,"value":194},"规范 → 计划 → 任务 → 实现",{"type":15,"tag":154,"props":196,"children":197},{},[198,203,208],{"type":15,"tag":180,"props":199,"children":200},{},[201],{"type":21,"value":202},"文档",{"type":15,"tag":180,"props":204,"children":205},{},[206],{"type":21,"value":207},"事后补写，容易过时",{"type":15,"tag":180,"props":209,"children":210},{},[211],{"type":21,"value":212},"事前编写，持续维护",{"type":15,"tag":154,"props":214,"children":215},{},[216,221,226],{"type":15,"tag":180,"props":217,"children":218},{},[219],{"type":21,"value":220},"AI 协作",{"type":15,"tag":180,"props":222,"children":223},{},[224],{"type":21,"value":225},"AI 猜测需求，幻觉率高",{"type":15,"tag":180,"props":227,"children":228},{},[229],{"type":21,"value":230},"AI 按 Spec 执行，幻觉率低",{"type":15,"tag":154,"props":232,"children":233},{},[234,239,244],{"type":15,"tag":180,"props":235,"children":236},{},[237],{"type":21,"value":238},"可追溯性",{"type":15,"tag":180,"props":240,"children":241},{},[242],{"type":21,"value":243},"低",{"type":15,"tag":180,"props":245,"children":246},{},[247],{"type":21,"value":248},"从需求到代码的完整追溯链",{"type":15,"tag":110,"props":250,"children":251},{},[],{"type":15,"tag":24,"props":253,"children":255},{"id":254},"核心流程",[256],{"type":21,"value":254},{"type":15,"tag":146,"props":258,"children":259},{},[260,286],{"type":15,"tag":150,"props":261,"children":262},{},[263],{"type":15,"tag":154,"props":264,"children":265},{},[266,271,276,281],{"type":15,"tag":158,"props":267,"children":268},{},[269],{"type":21,"value":270},"阶段",{"type":15,"tag":158,"props":272,"children":273},{},[274],{"type":21,"value":275},"核心动作",{"type":15,"tag":158,"props":277,"children":278},{},[279],{"type":21,"value":280},"输出物",{"type":15,"tag":158,"props":282,"children":283},{},[284],{"type":21,"value":285},"耗时占比",{"type":15,"tag":173,"props":287,"children":288},{},[289,315,341,367,393,419],{"type":15,"tag":154,"props":290,"children":291},{},[292,300,305,310],{"type":15,"tag":180,"props":293,"children":294},{},[295],{"type":15,"tag":50,"props":296,"children":297},{},[298],{"type":21,"value":299},"需求拆解",{"type":15,"tag":180,"props":301,"children":302},{},[303],{"type":21,"value":304},"与 AI 协作，明确需求边界、验收标准与技术栈",{"type":15,"tag":180,"props":306,"children":307},{},[308],{"type":21,"value":309},"需求清单、验收标准",{"type":15,"tag":180,"props":311,"children":312},{},[313],{"type":21,"value":314},"10%",{"type":15,"tag":154,"props":316,"children":317},{},[318,326,331,336],{"type":15,"tag":180,"props":319,"children":320},{},[321],{"type":15,"tag":50,"props":322,"children":323},{},[324],{"type":21,"value":325},"Spec 编写",{"type":15,"tag":180,"props":327,"children":328},{},[329],{"type":21,"value":330},"编写结构化的 spec 文档，包含功能描述、数据模型、接口定义、错误处理、代码规范",{"type":15,"tag":180,"props":332,"children":333},{},[334],{"type":21,"value":335},"spec.md、tasks.md",{"type":15,"tag":180,"props":337,"children":338},{},[339],{"type":21,"value":340},"30%",{"type":15,"tag":154,"props":342,"children":343},{},[344,352,357,362],{"type":15,"tag":180,"props":345,"children":346},{},[347],{"type":15,"tag":50,"props":348,"children":349},{},[350],{"type":21,"value":351},"AI 生成",{"type":15,"tag":180,"props":353,"children":354},{},[355],{"type":21,"value":356},"将 spec 文档输入 AI 工具，生成代码、单元测试、接口文档",{"type":15,"tag":180,"props":358,"children":359},{},[360],{"type":21,"value":361},"可运行代码、测试用例",{"type":15,"tag":180,"props":363,"children":364},{},[365],{"type":21,"value":366},"5%",{"type":15,"tag":154,"props":368,"children":369},{},[370,378,383,388],{"type":15,"tag":180,"props":371,"children":372},{},[373],{"type":15,"tag":50,"props":374,"children":375},{},[376],{"type":21,"value":377},"人工评审",{"type":15,"tag":180,"props":379,"children":380},{},[381],{"type":21,"value":382},"评审 AI 生成的代码，重点检查逻辑正确性、安全漏洞、性能瓶颈",{"type":15,"tag":180,"props":384,"children":385},{},[386],{"type":21,"value":387},"评审报告、修改建议",{"type":15,"tag":180,"props":389,"children":390},{},[391],{"type":21,"value":392},"15%",{"type":15,"tag":154,"props":394,"children":395},{},[396,404,409,414],{"type":15,"tag":180,"props":397,"children":398},{},[399],{"type":15,"tag":50,"props":400,"children":401},{},[402],{"type":21,"value":403},"测试调试",{"type":15,"tag":180,"props":405,"children":406},{},[407],{"type":21,"value":408},"运行测试用例，定位并修复问题",{"type":15,"tag":180,"props":410,"children":411},{},[412],{"type":21,"value":413},"测试报告、修复后的代码",{"type":15,"tag":180,"props":415,"children":416},{},[417],{"type":21,"value":418},"25%",{"type":15,"tag":154,"props":420,"children":421},{},[422,430,435,440],{"type":15,"tag":180,"props":423,"children":424},{},[425],{"type":15,"tag":50,"props":426,"children":427},{},[428],{"type":21,"value":429},"迭代优化",{"type":15,"tag":180,"props":431,"children":432},{},[433],{"type":21,"value":434},"根据测试结果或业务需求，迭代 spec 文档与代码",{"type":15,"tag":180,"props":436,"children":437},{},[438],{"type":21,"value":439},"优化后的代码",{"type":15,"tag":180,"props":441,"children":442},{},[443],{"type":21,"value":392},{"type":15,"tag":445,"props":446,"children":447},"blockquote",{},[448],{"type":15,"tag":31,"props":449,"children":450},{},[451,453,458],{"type":21,"value":452},"💡 ",{"type":15,"tag":50,"props":454,"children":455},{},[456],{"type":21,"value":457},"关键认知",{"type":21,"value":459},"：AI 生成只占 5% 的时间。真正的成本在 Spec 编写（30%）和测试调试（25%）。这不是 AI 替代人，而是人用 Spec 约束 AI。",{"type":15,"tag":110,"props":461,"children":462},{},[],{"type":15,"tag":24,"props":464,"children":466},{"id":465},"关键技巧",[467],{"type":21,"value":465},{"type":15,"tag":469,"props":470,"children":472},"h3",{"id":471},"_1-结构化思维",[473],{"type":21,"value":474},"1. 结构化思维",{"type":15,"tag":31,"props":476,"children":477},{},[478],{"type":21,"value":479},"多用列表、表格、枚举等结构化格式，少用大段自然语言。",{"type":15,"tag":31,"props":481,"children":482},{},[483,488],{"type":15,"tag":50,"props":484,"children":485},{},[486],{"type":21,"value":487},"示例",{"type":21,"value":489},"：用表格定义接口入参",{"type":15,"tag":146,"props":491,"children":492},{},[493,519],{"type":15,"tag":150,"props":494,"children":495},{},[496],{"type":15,"tag":154,"props":497,"children":498},{},[499,504,509,514],{"type":15,"tag":158,"props":500,"children":501},{},[502],{"type":21,"value":503},"参数名",{"type":15,"tag":158,"props":505,"children":506},{},[507],{"type":21,"value":508},"类型",{"type":15,"tag":158,"props":510,"children":511},{},[512],{"type":21,"value":513},"是否必填",{"type":15,"tag":158,"props":515,"children":516},{},[517],{"type":21,"value":518},"示例值",{"type":15,"tag":173,"props":520,"children":521},{},[522,545],{"type":15,"tag":154,"props":523,"children":524},{},[525,530,535,540],{"type":15,"tag":180,"props":526,"children":527},{},[528],{"type":21,"value":529},"username",{"type":15,"tag":180,"props":531,"children":532},{},[533],{"type":21,"value":534},"string",{"type":15,"tag":180,"props":536,"children":537},{},[538],{"type":21,"value":539},"是",{"type":15,"tag":180,"props":541,"children":542},{},[543],{"type":21,"value":544},"\"zhangsan\"",{"type":15,"tag":154,"props":546,"children":547},{},[548,553,557,561],{"type":15,"tag":180,"props":549,"children":550},{},[551],{"type":21,"value":552},"password",{"type":15,"tag":180,"props":554,"children":555},{},[556],{"type":21,"value":534},{"type":15,"tag":180,"props":558,"children":559},{},[560],{"type":21,"value":539},{"type":15,"tag":180,"props":562,"children":563},{},[564],{"type":21,"value":565},"\"123456\"",{"type":15,"tag":31,"props":567,"children":568},{},[569,571,576],{"type":21,"value":570},"使用结构化格式，AI 的识别准确率可提升至 ",{"type":15,"tag":50,"props":572,"children":573},{},[574],{"type":21,"value":575},"95%",{"type":21,"value":577}," 以上。",{"type":15,"tag":469,"props":579,"children":581},{"id":580},"_2-版本锁定",[582],{"type":21,"value":583},"2. 版本锁定",{"type":15,"tag":31,"props":585,"children":586},{},[587],{"type":21,"value":588},"所有前置文档的版本、技术栈版本、规范版本必须一次性锁定，中途不随意变更。",{"type":15,"tag":31,"props":590,"children":591},{},[592,596],{"type":15,"tag":50,"props":593,"children":594},{},[595],{"type":21,"value":487},{"type":21,"value":597},"：锁定\"Vue 3.3 + SpringBoot 3.0\"的技术栈，后续迭代不得修改。",{"type":15,"tag":469,"props":599,"children":601},{"id":600},"_3-示例驱动",[602],{"type":21,"value":603},"3. 示例驱动",{"type":15,"tag":31,"props":605,"children":606},{},[607],{"type":21,"value":608},"提供\"好\"和\"坏\"的代码示例，明确告诉 AI 应该避免什么。",{"type":15,"tag":37,"props":610,"children":614},{"code":611,"language":612,"meta":7,"className":613,"style":7},"\u002F\u002F ❌ 不要使用 var 定义变量\nvar name = \"zhangsan\";\n\n\u002F\u002F ✅ 统一用 let\u002Fconst\nconst name = \"zhangsan\";\nlet age = 25;\n","javascript","language-javascript shiki shiki-themes github-dark",[615],{"type":15,"tag":42,"props":616,"children":617},{"__ignoreMap":7},[618,630,662,672,681,709],{"type":15,"tag":619,"props":620,"children":623},"span",{"class":621,"line":622},"line",1,[624],{"type":15,"tag":619,"props":625,"children":627},{"style":626},"--shiki-default:#6A737D",[628],{"type":21,"value":629},"\u002F\u002F ❌ 不要使用 var 定义变量\n",{"type":15,"tag":619,"props":631,"children":633},{"class":621,"line":632},2,[634,640,646,651,657],{"type":15,"tag":619,"props":635,"children":637},{"style":636},"--shiki-default:#F97583",[638],{"type":21,"value":639},"var",{"type":15,"tag":619,"props":641,"children":643},{"style":642},"--shiki-default:#E1E4E8",[644],{"type":21,"value":645}," name ",{"type":15,"tag":619,"props":647,"children":648},{"style":636},[649],{"type":21,"value":650},"=",{"type":15,"tag":619,"props":652,"children":654},{"style":653},"--shiki-default:#9ECBFF",[655],{"type":21,"value":656}," \"zhangsan\"",{"type":15,"tag":619,"props":658,"children":659},{"style":642},[660],{"type":21,"value":661},";\n",{"type":15,"tag":619,"props":663,"children":665},{"class":621,"line":664},3,[666],{"type":15,"tag":619,"props":667,"children":669},{"emptyLinePlaceholder":668},true,[670],{"type":21,"value":671},"\n",{"type":15,"tag":619,"props":673,"children":675},{"class":621,"line":674},4,[676],{"type":15,"tag":619,"props":677,"children":678},{"style":626},[679],{"type":21,"value":680},"\u002F\u002F ✅ 统一用 let\u002Fconst\n",{"type":15,"tag":619,"props":682,"children":684},{"class":621,"line":683},5,[685,690,696,701,705],{"type":15,"tag":619,"props":686,"children":687},{"style":636},[688],{"type":21,"value":689},"const",{"type":15,"tag":619,"props":691,"children":693},{"style":692},"--shiki-default:#79B8FF",[694],{"type":21,"value":695}," name",{"type":15,"tag":619,"props":697,"children":698},{"style":636},[699],{"type":21,"value":700}," =",{"type":15,"tag":619,"props":702,"children":703},{"style":653},[704],{"type":21,"value":656},{"type":15,"tag":619,"props":706,"children":707},{"style":642},[708],{"type":21,"value":661},{"type":15,"tag":619,"props":710,"children":712},{"class":621,"line":711},6,[713,718,723,727,732],{"type":15,"tag":619,"props":714,"children":715},{"style":636},[716],{"type":21,"value":717},"let",{"type":15,"tag":619,"props":719,"children":720},{"style":642},[721],{"type":21,"value":722}," age ",{"type":15,"tag":619,"props":724,"children":725},{"style":636},[726],{"type":21,"value":650},{"type":15,"tag":619,"props":728,"children":729},{"style":692},[730],{"type":21,"value":731}," 25",{"type":15,"tag":619,"props":733,"children":734},{"style":642},[735],{"type":21,"value":661},{"type":15,"tag":31,"props":737,"children":738},{},[739,741,746],{"type":21,"value":740},"将代码规范的符合率提升至 ",{"type":15,"tag":50,"props":742,"children":743},{},[744],{"type":21,"value":745},"90%",{"type":21,"value":577},{"type":15,"tag":469,"props":748,"children":750},{"id":749},"_4-迭代-spec",[751],{"type":21,"value":752},"4. 迭代 Spec",{"type":15,"tag":31,"props":754,"children":755},{},[756],{"type":21,"value":757},"Spec 不是瀑布文档——它应该随项目迭代持续更新。每次代码变更后，检查 Spec 是否仍然准确。",{"type":15,"tag":110,"props":759,"children":760},{},[],{"type":15,"tag":24,"props":762,"children":764},{"id":763},"speckit-工具链详解",[765],{"type":21,"value":766},"SpecKit 工具链详解",{"type":15,"tag":469,"props":768,"children":770},{"id":769},"speckit-是什么",[771],{"type":21,"value":772},"SpecKit 是什么",{"type":15,"tag":31,"props":774,"children":775},{},[776,785,787,792],{"type":15,"tag":777,"props":778,"children":782},"a",{"href":779,"rel":780},"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit",[781],"nofollow",[783],{"type":21,"value":784},"SpecKit",{"type":21,"value":786}," 是 ",{"type":15,"tag":50,"props":788,"children":789},{},[790],{"type":21,"value":791},"GitHub 官方开源",{"type":21,"value":793},"的规范驱动开发工具包。它通过\"宪法 → 规范 → 计划 → 任务 → 实现\"的结构化流程，将 AI 从\"代码生成工具\"转变为\"产品开发伙伴\"。",{"type":15,"tag":445,"props":795,"children":796},{},[797],{"type":15,"tag":31,"props":798,"children":799},{},[800,802],{"type":21,"value":801},"📺 官方视频介绍：",{"type":15,"tag":777,"props":803,"children":806},{"href":804,"rel":805},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=a9eR1xsfvHg",[781],[807],{"type":21,"value":808},"Spec Kit Video Overview",{"type":15,"tag":445,"props":810,"children":811},{},[812],{"type":15,"tag":31,"props":813,"children":814},{},[815,817],{"type":21,"value":816},"📖 GitHub 仓库：",{"type":15,"tag":777,"props":818,"children":820},{"href":779,"rel":819},[781],[821],{"type":21,"value":822},"github\u002Fspec-kit",{"type":15,"tag":469,"props":824,"children":826},{"id":825},"安装-specify-cli",[827],{"type":21,"value":828},"安装 Specify CLI",{"type":15,"tag":445,"props":830,"children":831},{},[832],{"type":15,"tag":31,"props":833,"children":834},{},[835,837,842,844,849],{"type":21,"value":836},"⚠️ ",{"type":15,"tag":50,"props":838,"children":839},{},[840],{"type":21,"value":841},"重要",{"type":21,"value":843},"：SpecKit 是 Python 生态工具，",{"type":15,"tag":50,"props":845,"children":846},{},[847],{"type":21,"value":848},"不是 npm 包",{"type":21,"value":850},"。唯一官方安装来源是 GitHub 仓库，PyPI 上的同名包非官方维护，请勿使用。",{"type":15,"tag":31,"props":852,"children":853},{},[854],{"type":15,"tag":50,"props":855,"children":856},{},[857],{"type":21,"value":858},"推荐方式：使用 uv（Python 包管理器）",{"type":15,"tag":37,"props":860,"children":864},{"code":861,"language":862,"meta":7,"className":863,"style":7},"# 安装指定稳定版本（推荐，去 GitHub Releases 页面查看最新版本号）\nuv tool install specify-cli --from git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git@vX.Y.Z\n\n# 或安装最新版（可能包含未发布的变化）\nuv tool install specify-cli --from git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git\n","bash","language-bash shiki shiki-themes github-dark",[865],{"type":15,"tag":42,"props":866,"children":867},{"__ignoreMap":7},[868,876,910,917,925],{"type":15,"tag":619,"props":869,"children":870},{"class":621,"line":622},[871],{"type":15,"tag":619,"props":872,"children":873},{"style":626},[874],{"type":21,"value":875},"# 安装指定稳定版本（推荐，去 GitHub Releases 页面查看最新版本号）\n",{"type":15,"tag":619,"props":877,"children":878},{"class":621,"line":632},[879,885,890,895,900,905],{"type":15,"tag":619,"props":880,"children":882},{"style":881},"--shiki-default:#B392F0",[883],{"type":21,"value":884},"uv",{"type":15,"tag":619,"props":886,"children":887},{"style":653},[888],{"type":21,"value":889}," tool",{"type":15,"tag":619,"props":891,"children":892},{"style":653},[893],{"type":21,"value":894}," install",{"type":15,"tag":619,"props":896,"children":897},{"style":653},[898],{"type":21,"value":899}," specify-cli",{"type":15,"tag":619,"props":901,"children":902},{"style":692},[903],{"type":21,"value":904}," --from",{"type":15,"tag":619,"props":906,"children":907},{"style":653},[908],{"type":21,"value":909}," git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git@vX.Y.Z\n",{"type":15,"tag":619,"props":911,"children":912},{"class":621,"line":664},[913],{"type":15,"tag":619,"props":914,"children":915},{"emptyLinePlaceholder":668},[916],{"type":21,"value":671},{"type":15,"tag":619,"props":918,"children":919},{"class":621,"line":674},[920],{"type":15,"tag":619,"props":921,"children":922},{"style":626},[923],{"type":21,"value":924},"# 或安装最新版（可能包含未发布的变化）\n",{"type":15,"tag":619,"props":926,"children":927},{"class":621,"line":683},[928,932,936,940,944,948],{"type":15,"tag":619,"props":929,"children":930},{"style":881},[931],{"type":21,"value":884},{"type":15,"tag":619,"props":933,"children":934},{"style":653},[935],{"type":21,"value":889},{"type":15,"tag":619,"props":937,"children":938},{"style":653},[939],{"type":21,"value":894},{"type":15,"tag":619,"props":941,"children":942},{"style":653},[943],{"type":21,"value":899},{"type":15,"tag":619,"props":945,"children":946},{"style":692},[947],{"type":21,"value":904},{"type":15,"tag":619,"props":949,"children":950},{"style":653},[951],{"type":21,"value":952}," git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git\n",{"type":15,"tag":31,"props":954,"children":955},{},[956],{"type":15,"tag":50,"props":957,"children":958},{},[959],{"type":21,"value":960},"替代方式：使用 pipx",{"type":15,"tag":37,"props":962,"children":964},{"code":963,"language":862,"meta":7,"className":863,"style":7},"pipx install git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git@vX.Y.Z\n",[965],{"type":15,"tag":42,"props":966,"children":967},{"__ignoreMap":7},[968],{"type":15,"tag":619,"props":969,"children":970},{"class":621,"line":622},[971,976,980],{"type":15,"tag":619,"props":972,"children":973},{"style":881},[974],{"type":21,"value":975},"pipx",{"type":15,"tag":619,"props":977,"children":978},{"style":653},[979],{"type":21,"value":894},{"type":15,"tag":619,"props":981,"children":982},{"style":653},[983],{"type":21,"value":909},{"type":15,"tag":31,"props":985,"children":986},{},[987],{"type":15,"tag":50,"props":988,"children":989},{},[990],{"type":21,"value":991},"验证安装",{"type":15,"tag":37,"props":993,"children":995},{"code":994,"language":862,"meta":7,"className":863,"style":7},"specify version\n",[996],{"type":15,"tag":42,"props":997,"children":998},{"__ignoreMap":7},[999],{"type":15,"tag":619,"props":1000,"children":1001},{"class":621,"line":622},[1002,1007],{"type":15,"tag":619,"props":1003,"children":1004},{"style":881},[1005],{"type":21,"value":1006},"specify",{"type":15,"tag":619,"props":1008,"children":1009},{"style":653},[1010],{"type":21,"value":1011}," version\n",{"type":15,"tag":469,"props":1013,"children":1015},{"id":1014},"初始化项目",[1016],{"type":21,"value":1014},{"type":15,"tag":37,"props":1018,"children":1020},{"code":1019,"language":862,"meta":7,"className":863,"style":7},"# 新建项目\nspecify init \u003CPROJECT_NAME>\n\n# 在当前目录初始化（推荐）\nspecify init --here --integration copilot\n# 或\nspecify init . --integration copilot\n",[1021],{"type":15,"tag":42,"props":1022,"children":1023},{"__ignoreMap":7},[1024,1032,1064,1071,1079,1105,1113],{"type":15,"tag":619,"props":1025,"children":1026},{"class":621,"line":622},[1027],{"type":15,"tag":619,"props":1028,"children":1029},{"style":626},[1030],{"type":21,"value":1031},"# 新建项目\n",{"type":15,"tag":619,"props":1033,"children":1034},{"class":621,"line":632},[1035,1039,1044,1049,1054,1059],{"type":15,"tag":619,"props":1036,"children":1037},{"style":881},[1038],{"type":21,"value":1006},{"type":15,"tag":619,"props":1040,"children":1041},{"style":653},[1042],{"type":21,"value":1043}," init",{"type":15,"tag":619,"props":1045,"children":1046},{"style":636},[1047],{"type":21,"value":1048}," \u003C",{"type":15,"tag":619,"props":1050,"children":1051},{"style":653},[1052],{"type":21,"value":1053},"PROJECT_NAM",{"type":15,"tag":619,"props":1055,"children":1056},{"style":642},[1057],{"type":21,"value":1058},"E",{"type":15,"tag":619,"props":1060,"children":1061},{"style":636},[1062],{"type":21,"value":1063},">\n",{"type":15,"tag":619,"props":1065,"children":1066},{"class":621,"line":664},[1067],{"type":15,"tag":619,"props":1068,"children":1069},{"emptyLinePlaceholder":668},[1070],{"type":21,"value":671},{"type":15,"tag":619,"props":1072,"children":1073},{"class":621,"line":674},[1074],{"type":15,"tag":619,"props":1075,"children":1076},{"style":626},[1077],{"type":21,"value":1078},"# 在当前目录初始化（推荐）\n",{"type":15,"tag":619,"props":1080,"children":1081},{"class":621,"line":683},[1082,1086,1090,1095,1100],{"type":15,"tag":619,"props":1083,"children":1084},{"style":881},[1085],{"type":21,"value":1006},{"type":15,"tag":619,"props":1087,"children":1088},{"style":653},[1089],{"type":21,"value":1043},{"type":15,"tag":619,"props":1091,"children":1092},{"style":692},[1093],{"type":21,"value":1094}," --here",{"type":15,"tag":619,"props":1096,"children":1097},{"style":692},[1098],{"type":21,"value":1099}," --integration",{"type":15,"tag":619,"props":1101,"children":1102},{"style":653},[1103],{"type":21,"value":1104}," copilot\n",{"type":15,"tag":619,"props":1106,"children":1107},{"class":621,"line":711},[1108],{"type":15,"tag":619,"props":1109,"children":1110},{"style":626},[1111],{"type":21,"value":1112},"# 或\n",{"type":15,"tag":619,"props":1114,"children":1116},{"class":621,"line":1115},7,[1117,1121,1125,1130,1134],{"type":15,"tag":619,"props":1118,"children":1119},{"style":881},[1120],{"type":21,"value":1006},{"type":15,"tag":619,"props":1122,"children":1123},{"style":653},[1124],{"type":21,"value":1043},{"type":15,"tag":619,"props":1126,"children":1127},{"style":653},[1128],{"type":21,"value":1129}," .",{"type":15,"tag":619,"props":1131,"children":1132},{"style":692},[1133],{"type":21,"value":1099},{"type":15,"tag":619,"props":1135,"children":1136},{"style":653},[1137],{"type":21,"value":1104},{"type":15,"tag":31,"props":1139,"children":1140},{},[1141,1147,1149,1155,1157,1163],{"type":15,"tag":42,"props":1142,"children":1144},{"className":1143},[],[1145],{"type":21,"value":1146},"--integration",{"type":21,"value":1148}," 参数指定你使用的 AI 编程工具（如 ",{"type":15,"tag":42,"props":1150,"children":1152},{"className":1151},[],[1153],{"type":21,"value":1154},"copilot",{"type":21,"value":1156},"、",{"type":15,"tag":42,"props":1158,"children":1160},{"className":1159},[],[1161],{"type":21,"value":1162},"claude",{"type":21,"value":1164}," 等）。",{"type":15,"tag":469,"props":1166,"children":1168},{"id":1167},"生成的目录结构",[1169],{"type":21,"value":1167},{"type":15,"tag":37,"props":1171,"children":1173},{"code":1172},"project\u002F\n├── memory\u002F\n│   ├── constitution.md              # 项目宪法（全局约束）\n│   └── constitution_update_checklist.md\n├── scripts\u002F\n│   ├── check-task-prerequisites.sh\n│   ├── common.sh\n│   ├── create-new-feature.sh\n│   ├── get-feature-paths.sh\n│   ├── setup-plan.sh\n│   └── update-claude-md.sh\n├── specs\u002F\n│   └── \u003CFEATURE_NAME>\u002F\n│       └── spec.md                  # 功能规范\n└── templates\u002F\n    ├── CLAUDE-template.md\n    ├── plan-template.md\n    ├── spec-template.md\n    └── tasks-template.md\n",[1174],{"type":15,"tag":42,"props":1175,"children":1176},{"__ignoreMap":7},[1177],{"type":21,"value":1172},{"type":15,"tag":445,"props":1179,"children":1180},{},[1181],{"type":15,"tag":31,"props":1182,"children":1183},{},[1184,1185,1190,1191,1196,1198,1204],{"type":21,"value":836},{"type":15,"tag":50,"props":1186,"children":1187},{},[1188],{"type":21,"value":1189},"注意区分",{"type":21,"value":56},{"type":15,"tag":42,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":21,"value":1006},{"type":21,"value":1197}," 是 CLI 命令（在终端执行），",{"type":15,"tag":42,"props":1199,"children":1201},{"className":1200},[],[1202],{"type":21,"value":1203},"\u002Fspeckit.*",{"type":21,"value":1205}," 是斜杠命令（在 AI 编程工具内执行）。两者完全不同。",{"type":15,"tag":110,"props":1207,"children":1208},{},[],{"type":15,"tag":469,"props":1210,"children":1212},{"id":1211},"核心流程5-步-3-个可选步骤",[1213],{"type":21,"value":1214},"核心流程：5 步 + 3 个可选步骤",{"type":15,"tag":37,"props":1216,"children":1218},{"code":1217},"┌─────────────────────────────────────────────────────────────┐\n│  1. \u002Fspeckit.constitution  — 建立项目原则                    │\n└─────────────────────────────────────────────────────────────┘\n                              ↓\n┌─────────────────────────────────────────────────────────────┐\n│  2. \u002Fspeckit.specify       — 创建功能规范                    │\n└─────────────────────────────────────────────────────────────┘\n                              ↓\n                ┌─────────────┴─────────────┐\n                │  可选：\u002Fspeckit.clarify     │\n                │  在 plan 前澄清模糊需求     │\n                └─────────────┬─────────────┘\n                              ↓\n┌─────────────────────────────────────────────────────────────┐\n│  3. \u002Fspeckit.plan          — 创建技术计划                    │\n└─────────────────────────────────────────────────────────────┘\n                              ↓\n                ┌─────────────┴─────────────┐\n                │  可选：\u002Fspeckit.checklist   │\n                │  质量检查清单               │\n                └─────────────┬─────────────┘\n                              ↓\n┌─────────────────────────────────────────────────────────────┐\n│  4. \u002Fspeckit.tasks         — 分解为任务                      │\n└─────────────────────────────────────────────────────────────┘\n                              ↓\n                ┌─────────────┴─────────────┐\n                │  可选：\u002Fspeckit.analyze     │\n                │  一致性分析                 │\n                └─────────────┬─────────────┘\n                              ↓\n┌─────────────────────────────────────────────────────────────┐\n│  5. \u002Fspeckit.implement     — 执行实现                        │\n└─────────────────────────────────────────────────────────────┘\n",[1219],{"type":15,"tag":42,"props":1220,"children":1221},{"__ignoreMap":7},[1222],{"type":21,"value":1217},{"type":15,"tag":445,"props":1224,"children":1225},{},[1226],{"type":15,"tag":31,"props":1227,"children":1228},{},[1229,1231,1236,1238,1243,1245,1250],{"type":21,"value":1230},"以下所有 ",{"type":15,"tag":42,"props":1232,"children":1234},{"className":1233},[],[1235],{"type":21,"value":1203},{"type":21,"value":1237}," 命令均在 ",{"type":15,"tag":50,"props":1239,"children":1240},{},[1241],{"type":21,"value":1242},"AI 编程工具内",{"type":21,"value":1244},"（Claude Code \u002F Cursor \u002F Trae 等）以斜杠命令形式输入，",{"type":15,"tag":50,"props":1246,"children":1247},{},[1248],{"type":21,"value":1249},"不是",{"type":21,"value":1251},"终端命令。",{"type":15,"tag":110,"props":1253,"children":1254},{},[],{"type":15,"tag":469,"props":1256,"children":1258},{"id":1257},"step-1speckitconstitution建立项目原则",[1259],{"type":21,"value":1260},"Step 1：\u002Fspeckit.constitution（建立项目原则）",{"type":15,"tag":31,"props":1262,"children":1263},{},[1264,1269,1271,1276,1278,1283],{"type":15,"tag":50,"props":1265,"children":1266},{},[1267],{"type":21,"value":1268},"执行环境",{"type":21,"value":1270},"：在 AI 编程工具内输入\n",{"type":15,"tag":50,"props":1272,"children":1273},{},[1274],{"type":21,"value":1275},"目的",{"type":21,"value":1277},"：创建项目的最高指导原则，所有后续开发决策以此为准\n",{"type":15,"tag":50,"props":1279,"children":1280},{},[1281],{"type":21,"value":1282},"执行次数",{"type":21,"value":1284},"：每个项目只需执行一次",{"type":15,"tag":31,"props":1286,"children":1287},{},[1288,1293],{"type":15,"tag":50,"props":1289,"children":1290},{},[1291],{"type":21,"value":1292},"输入示例",{"type":21,"value":56},{"type":15,"tag":37,"props":1295,"children":1297},{"code":1296},"\u002Fspeckit.constitution 创建原则，聚焦于代码质量、测试标准、\n用户体验一致性和性能要求\n",[1298],{"type":15,"tag":42,"props":1299,"children":1300},{"__ignoreMap":7},[1301],{"type":21,"value":1296},{"type":15,"tag":31,"props":1303,"children":1304},{},[1305,1310,1311,1317],{"type":15,"tag":50,"props":1306,"children":1307},{},[1308],{"type":21,"value":1309},"输出产物",{"type":21,"value":56},{"type":15,"tag":42,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":21,"value":1316},"memory\u002Fconstitution.md",{"type":21,"value":1318},"（项目宪法）",{"type":15,"tag":31,"props":1320,"children":1321},{},[1322,1327],{"type":15,"tag":50,"props":1323,"children":1324},{},[1325],{"type":21,"value":1326},"为什么这是第一步",{"type":21,"value":1328},"：Constitution 是整个 SpecKit 流程的\"宪法\"，后续的 specify、plan、tasks 都会引用它作为约束条件。跳过这一步，AI 就没有全局约束，生成的内容可能偏离项目目标。",{"type":15,"tag":110,"props":1330,"children":1331},{},[],{"type":15,"tag":469,"props":1333,"children":1335},{"id":1334},"step-2speckitspecify创建功能规范",[1336],{"type":21,"value":1337},"Step 2：\u002Fspeckit.specify（创建功能规范）",{"type":15,"tag":31,"props":1339,"children":1340},{},[1341,1345,1346,1351,1353,1357,1359,1363],{"type":15,"tag":50,"props":1342,"children":1343},{},[1344],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1347,"children":1348},{},[1349],{"type":21,"value":1350},"前置条件",{"type":21,"value":1352},"：Step 1 已完成\n",{"type":15,"tag":50,"props":1354,"children":1355},{},[1356],{"type":21,"value":1275},{"type":21,"value":1358},"：描述要构建的功能（只写\"做什么\"和\"为什么\"，不写\"怎么做\"）\n",{"type":15,"tag":50,"props":1360,"children":1361},{},[1362],{"type":21,"value":1282},{"type":21,"value":1364},"：每个新功能执行一次",{"type":15,"tag":31,"props":1366,"children":1367},{},[1368,1372],{"type":15,"tag":50,"props":1369,"children":1370},{},[1371],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1374,"children":1376},{"code":1375},"\u002Fspeckit.specify 实现一个文章发布系统，支持：\n- 创建文章（标题、内容、标签）\n- 编辑文章\n- 删除文章\n- 文章列表（分页、按标签筛选）\n",[1377],{"type":15,"tag":42,"props":1378,"children":1379},{"__ignoreMap":7},[1380],{"type":21,"value":1375},{"type":15,"tag":31,"props":1382,"children":1383},{},[1384,1388,1389,1395],{"type":15,"tag":50,"props":1385,"children":1386},{},[1387],{"type":21,"value":1309},{"type":21,"value":56},{"type":15,"tag":42,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":21,"value":1394},"specs\u002F\u003Cfeature-name>\u002Fspec.md",{"type":21,"value":1396},"（功能规范文档）",{"type":15,"tag":31,"props":1398,"children":1399},{},[1400,1405],{"type":15,"tag":50,"props":1401,"children":1402},{},[1403],{"type":21,"value":1404},"规范应包含",{"type":21,"value":56},{"type":15,"tag":58,"props":1407,"children":1408},{},[1409,1414,1419,1424,1429],{"type":15,"tag":62,"props":1410,"children":1411},{},[1412],{"type":21,"value":1413},"用户场景和故事",{"type":15,"tag":62,"props":1415,"children":1416},{},[1417],{"type":21,"value":1418},"功能需求",{"type":15,"tag":62,"props":1420,"children":1421},{},[1422],{"type":21,"value":1423},"成功标准（可量化、可测试）",{"type":15,"tag":62,"props":1425,"children":1426},{},[1427],{"type":21,"value":1428},"关键实体",{"type":15,"tag":62,"props":1430,"children":1431},{},[1432],{"type":21,"value":1433},"边界和约束",{"type":15,"tag":110,"props":1435,"children":1436},{},[],{"type":15,"tag":469,"props":1438,"children":1440},{"id":1439},"可选speckitclarify澄清需求",[1441],{"type":21,"value":1442},"（可选）\u002Fspeckit.clarify（澄清需求）",{"type":15,"tag":31,"props":1444,"children":1445},{},[1446,1450,1451,1455,1457,1461],{"type":15,"tag":50,"props":1447,"children":1448},{},[1449],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1452,"children":1453},{},[1454],{"type":21,"value":1350},{"type":21,"value":1456},"：Step 2 已完成，Step 3 尚未执行\n",{"type":15,"tag":50,"props":1458,"children":1459},{},[1460],{"type":21,"value":1275},{"type":21,"value":1462},"：在写技术计划之前，提出结构化问题，降低需求中的模糊区域",{"type":15,"tag":31,"props":1464,"children":1465},{},[1466,1470],{"type":15,"tag":50,"props":1467,"children":1468},{},[1469],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1472,"children":1474},{"code":1473},"\u002Fspeckit.clarify\n",[1475],{"type":15,"tag":42,"props":1476,"children":1477},{"__ignoreMap":7},[1478],{"type":21,"value":1473},{"type":15,"tag":31,"props":1480,"children":1481},{},[1482],{"type":21,"value":1483},"AI 会针对 spec.md 中不够清晰的部分提出问题，你回答后 AI 会更新规范。",{"type":15,"tag":110,"props":1485,"children":1486},{},[],{"type":15,"tag":469,"props":1488,"children":1490},{"id":1489},"step-3speckitplan创建技术计划",[1491],{"type":21,"value":1492},"Step 3：\u002Fspeckit.plan（创建技术计划）",{"type":15,"tag":31,"props":1494,"children":1495},{},[1496,1500,1501,1505,1507,1511],{"type":15,"tag":50,"props":1497,"children":1498},{},[1499],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1502,"children":1503},{},[1504],{"type":21,"value":1350},{"type":21,"value":1506},"：Step 2 已完成\n",{"type":15,"tag":50,"props":1508,"children":1509},{},[1510],{"type":21,"value":1275},{"type":21,"value":1512},"：指定技术栈和架构，将功能规范转化为技术设计",{"type":15,"tag":31,"props":1514,"children":1515},{},[1516,1520],{"type":15,"tag":50,"props":1517,"children":1518},{},[1519],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1522,"children":1524},{"code":1523},"\u002Fspeckit.plan 使用 Next.js 14 App Router + Prisma ORM +\nPostgreSQL，前端用 Tailwind CSS + Shadcn\u002Fui\n",[1525],{"type":15,"tag":42,"props":1526,"children":1527},{"__ignoreMap":7},[1528],{"type":21,"value":1523},{"type":15,"tag":31,"props":1530,"children":1531},{},[1532,1536],{"type":15,"tag":50,"props":1533,"children":1534},{},[1535],{"type":21,"value":1309},{"type":21,"value":56},{"type":15,"tag":58,"props":1538,"children":1539},{},[1540,1551,1562],{"type":15,"tag":62,"props":1541,"children":1542},{},[1543,1549],{"type":15,"tag":42,"props":1544,"children":1546},{"className":1545},[],[1547],{"type":21,"value":1548},"plan.md",{"type":21,"value":1550}," — 技术实现计划",{"type":15,"tag":62,"props":1552,"children":1553},{},[1554,1560],{"type":15,"tag":42,"props":1555,"children":1557},{"className":1556},[],[1558],{"type":21,"value":1559},"data-model.md",{"type":21,"value":1561}," — 数据模型",{"type":15,"tag":62,"props":1563,"children":1564},{},[1565,1571],{"type":15,"tag":42,"props":1566,"children":1568},{"className":1567},[],[1569],{"type":21,"value":1570},"contracts\u002F",{"type":21,"value":1572}," — 接口契约（如 API spec）",{"type":15,"tag":110,"props":1574,"children":1575},{},[],{"type":15,"tag":469,"props":1577,"children":1579},{"id":1578},"可选speckitchecklist质量检查清单",[1580],{"type":21,"value":1581},"（可选）\u002Fspeckit.checklist（质量检查清单）",{"type":15,"tag":31,"props":1583,"children":1584},{},[1585,1589,1590,1594,1596,1600],{"type":15,"tag":50,"props":1586,"children":1587},{},[1588],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1591,"children":1592},{},[1593],{"type":21,"value":1350},{"type":21,"value":1595},"：Step 3 已完成\n",{"type":15,"tag":50,"props":1597,"children":1598},{},[1599],{"type":21,"value":1275},{"type":21,"value":1601},"：生成质量检查清单，确保 plan 的完整性和一致性",{"type":15,"tag":110,"props":1603,"children":1604},{},[],{"type":15,"tag":469,"props":1606,"children":1608},{"id":1607},"step-4speckittasks分解为任务",[1609],{"type":21,"value":1610},"Step 4：\u002Fspeckit.tasks（分解为任务）",{"type":15,"tag":31,"props":1612,"children":1613},{},[1614,1618,1619,1623,1624,1628],{"type":15,"tag":50,"props":1615,"children":1616},{},[1617],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1620,"children":1621},{},[1622],{"type":21,"value":1350},{"type":21,"value":1595},{"type":15,"tag":50,"props":1625,"children":1626},{},[1627],{"type":21,"value":1275},{"type":21,"value":1629},"：将技术计划分解为可执行的任务清单",{"type":15,"tag":31,"props":1631,"children":1632},{},[1633,1637],{"type":15,"tag":50,"props":1634,"children":1635},{},[1636],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1639,"children":1641},{"code":1640},"\u002Fspeckit.tasks\n",[1642],{"type":15,"tag":42,"props":1643,"children":1644},{"__ignoreMap":7},[1645],{"type":21,"value":1640},{"type":15,"tag":31,"props":1647,"children":1648},{},[1649,1653,1654,1660],{"type":15,"tag":50,"props":1650,"children":1651},{},[1652],{"type":21,"value":1309},{"type":21,"value":56},{"type":15,"tag":42,"props":1655,"children":1657},{"className":1656},[],[1658],{"type":21,"value":1659},"tasks.md",{"type":21,"value":1661},"（任务清单），包含：",{"type":15,"tag":58,"props":1663,"children":1664},{},[1665,1670,1675,1680],{"type":15,"tag":62,"props":1666,"children":1667},{},[1668],{"type":21,"value":1669},"按用户故事组织的任务",{"type":15,"tag":62,"props":1671,"children":1672},{},[1673],{"type":21,"value":1674},"依赖关系",{"type":15,"tag":62,"props":1676,"children":1677},{},[1678],{"type":21,"value":1679},"并行执行机会",{"type":15,"tag":62,"props":1681,"children":1682},{},[1683],{"type":21,"value":1684},"独立测试标准",{"type":15,"tag":110,"props":1686,"children":1687},{},[],{"type":15,"tag":469,"props":1689,"children":1691},{"id":1690},"可选speckitanalyze一致性分析",[1692],{"type":21,"value":1693},"（可选）\u002Fspeckit.analyze（一致性分析）",{"type":15,"tag":31,"props":1695,"children":1696},{},[1697,1701,1702,1706,1708,1712],{"type":15,"tag":50,"props":1698,"children":1699},{},[1700],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1703,"children":1704},{},[1705],{"type":21,"value":1350},{"type":21,"value":1707},"：Step 4 已完成，Step 5 尚未执行\n",{"type":15,"tag":50,"props":1709,"children":1710},{},[1711],{"type":21,"value":1275},{"type":21,"value":1713},"：检查产品设计、技术设计、任务拆解之间的一致性，确保没有偏差",{"type":15,"tag":31,"props":1715,"children":1716},{},[1717,1721],{"type":15,"tag":50,"props":1718,"children":1719},{},[1720],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1723,"children":1725},{"code":1724},"\u002Fspeckit.analyze\n",[1726],{"type":15,"tag":42,"props":1727,"children":1728},{"__ignoreMap":7},[1729],{"type":21,"value":1724},{"type":15,"tag":110,"props":1731,"children":1732},{},[],{"type":15,"tag":469,"props":1734,"children":1736},{"id":1735},"step-5speckitimplement执行实现",[1737],{"type":21,"value":1738},"Step 5：\u002Fspeckit.implement（执行实现）",{"type":15,"tag":31,"props":1740,"children":1741},{},[1742,1746,1747,1751,1753,1757],{"type":15,"tag":50,"props":1743,"children":1744},{},[1745],{"type":21,"value":1268},{"type":21,"value":1270},{"type":15,"tag":50,"props":1748,"children":1749},{},[1750],{"type":21,"value":1350},{"type":21,"value":1752},"：Step 4 已完成\n",{"type":15,"tag":50,"props":1754,"children":1755},{},[1756],{"type":21,"value":1275},{"type":21,"value":1758},"：按 spec + plan + tasks 驱动 AI 生成代码",{"type":15,"tag":31,"props":1760,"children":1761},{},[1762,1766],{"type":15,"tag":50,"props":1763,"children":1764},{},[1765],{"type":21,"value":1292},{"type":21,"value":56},{"type":15,"tag":37,"props":1768,"children":1770},{"code":1769},"\u002Fspeckit.implement\n",[1771],{"type":15,"tag":42,"props":1772,"children":1773},{"__ignoreMap":7},[1774],{"type":21,"value":1769},{"type":15,"tag":31,"props":1776,"children":1777},{},[1778],{"type":21,"value":1779},"AI 会根据计划逐步生成代码。实现完成后，运行应用并检查错误。如果出现运行时错误，将错误信息提供给 AI 以修复。",{"type":15,"tag":110,"props":1781,"children":1782},{},[],{"type":15,"tag":469,"props":1784,"children":1786},{"id":1785},"与-ai-编程工具的集成",[1787],{"type":21,"value":1788},"与 AI 编程工具的集成",{"type":15,"tag":146,"props":1790,"children":1791},{},[1792,1808],{"type":15,"tag":150,"props":1793,"children":1794},{},[1795],{"type":15,"tag":154,"props":1796,"children":1797},{},[1798,1803],{"type":15,"tag":158,"props":1799,"children":1800},{},[1801],{"type":21,"value":1802},"工具",{"type":15,"tag":158,"props":1804,"children":1805},{},[1806],{"type":21,"value":1807},"集成方式",{"type":15,"tag":173,"props":1809,"children":1810},{},[1811,1832,1851,1864,1884],{"type":15,"tag":154,"props":1812,"children":1813},{},[1814,1819],{"type":15,"tag":180,"props":1815,"children":1816},{},[1817],{"type":21,"value":1818},"Cursor",{"type":15,"tag":180,"props":1820,"children":1821},{},[1822,1824,1830],{"type":21,"value":1823},"通过 ",{"type":15,"tag":42,"props":1825,"children":1827},{"className":1826},[],[1828],{"type":21,"value":1829},".cursorrules",{"type":21,"value":1831}," 引用 spec 文件",{"type":15,"tag":154,"props":1833,"children":1834},{},[1835,1840],{"type":15,"tag":180,"props":1836,"children":1837},{},[1838],{"type":21,"value":1839},"Claude Code",{"type":15,"tag":180,"props":1841,"children":1842},{},[1843,1844,1850],{"type":21,"value":1823},{"type":15,"tag":42,"props":1845,"children":1847},{"className":1846},[],[1848],{"type":21,"value":1849},"CLAUDE.md",{"type":21,"value":1831},{"type":15,"tag":154,"props":1852,"children":1853},{},[1854,1859],{"type":15,"tag":180,"props":1855,"children":1856},{},[1857],{"type":21,"value":1858},"Trae",{"type":15,"tag":180,"props":1860,"children":1861},{},[1862],{"type":21,"value":1863},"通过 Spec 模式直接读取 spec\u002F 目录",{"type":15,"tag":154,"props":1865,"children":1866},{},[1867,1872],{"type":15,"tag":180,"props":1868,"children":1869},{},[1870],{"type":21,"value":1871},"GitHub Copilot",{"type":15,"tag":180,"props":1873,"children":1874},{},[1875,1876,1882],{"type":21,"value":1823},{"type":15,"tag":42,"props":1877,"children":1879},{"className":1878},[],[1880],{"type":21,"value":1881},"copilot-instructions.md",{"type":21,"value":1883}," 引用",{"type":15,"tag":154,"props":1885,"children":1886},{},[1887,1892],{"type":15,"tag":180,"props":1888,"children":1889},{},[1890],{"type":21,"value":1891},"Codex CLI",{"type":15,"tag":180,"props":1893,"children":1894},{},[1895,1897,1903],{"type":21,"value":1896},"在 skills 模式下使用 ",{"type":15,"tag":42,"props":1898,"children":1900},{"className":1899},[],[1901],{"type":21,"value":1902},"$speckit-*",{"type":21,"value":1904}," 前缀",{"type":15,"tag":110,"props":1906,"children":1907},{},[],{"type":15,"tag":24,"props":1909,"children":1911},{"id":1910},"spec-实战以-trae-为例",[1912],{"type":21,"value":1913},"Spec 实战：以 Trae 为例",{"type":15,"tag":469,"props":1915,"children":1917},{"id":1916},"trae-中如何开启-spec-模式",[1918],{"type":21,"value":1919},"Trae 中如何开启 Spec 模式",{"type":15,"tag":1921,"props":1922,"children":1923},"ol",{},[1924,1929,1941,1951],{"type":15,"tag":62,"props":1925,"children":1926},{},[1927],{"type":21,"value":1928},"打开 Trae，进入项目",{"type":15,"tag":62,"props":1930,"children":1931},{},[1932,1934,1939],{"type":21,"value":1933},"在侧边栏找到 ",{"type":15,"tag":50,"props":1935,"children":1936},{},[1937],{"type":21,"value":1938},"Spec",{"type":21,"value":1940}," 面板",{"type":15,"tag":62,"props":1942,"children":1943},{},[1944,1946],{"type":21,"value":1945},"点击 ",{"type":15,"tag":50,"props":1947,"children":1948},{},[1949],{"type":21,"value":1950},"新建 Spec",{"type":15,"tag":62,"props":1952,"children":1953},{},[1954],{"type":21,"value":1955},"输入需求描述",{"type":15,"tag":469,"props":1957,"children":1959},{"id":1958},"从需求到-spec-的完整流程",[1960],{"type":21,"value":1961},"从需求到 Spec 的完整流程",{"type":15,"tag":31,"props":1963,"children":1964},{},[1965],{"type":15,"tag":50,"props":1966,"children":1967},{},[1968],{"type":21,"value":1969},"Step 1：描述需求",{"type":15,"tag":37,"props":1971,"children":1973},{"code":1972},"实现一个文章发布系统，支持：\n- 创建文章（标题、内容、标签）\n- 编辑文章\n- 删除文章\n- 文章列表（分页、按标签筛选）\n",[1974],{"type":15,"tag":42,"props":1975,"children":1976},{"__ignoreMap":7},[1977],{"type":21,"value":1972},{"type":15,"tag":31,"props":1979,"children":1980},{},[1981],{"type":15,"tag":50,"props":1982,"children":1983},{},[1984],{"type":21,"value":1985},"Step 2：AI 生成 Spec",{"type":15,"tag":31,"props":1987,"children":1988},{},[1989],{"type":21,"value":1990},"Trae 会自动生成结构化 Spec：",{"type":15,"tag":37,"props":1992,"children":1996},{"code":1993,"language":1994,"meta":7,"className":1995,"style":7},"# 文章发布系统 Spec\n\n## 数据模型\n- Article: id, title, content, tags[], author_id, created_at, updated_at\n- Tag: id, name\n\n## API 接口\n| 方法 | 路径 | 说明 |\n|------|------|------|\n| POST | \u002Fapi\u002Farticles | 创建文章 |\n| PUT | \u002Fapi\u002Farticles\u002F:id | 编辑文章 |\n| DELETE | \u002Fapi\u002Farticles\u002F:id | 删除文章 |\n| GET | \u002Fapi\u002Farticles | 文章列表 |\n\n## 业务规则\n- 标题长度：1-200 字符\n- 内容不能为空\n- 标签最多 5 个\n- 只有作者可以编辑\u002F删除自己的文章\n\n## 验收标准\n- [ ] 创建文章后返回完整文章对象\n- [ ] 编辑文章只更新传入的字段\n- [ ] 删除文章为软删除\n- [ ] 列表接口支持分页（page, pageSize）\n- [ ] 列表接口支持按标签筛选\n","markdown","language-markdown shiki shiki-themes github-dark",[1997],{"type":15,"tag":42,"props":1998,"children":1999},{"__ignoreMap":7},[2000,2009,2016,2024,2038,2050,2057,2065,2074,2083,2092,2101,2110,2119,2127,2136,2149,2162,2175,2188,2196,2205,2218,2231,2244,2257],{"type":15,"tag":619,"props":2001,"children":2002},{"class":621,"line":622},[2003],{"type":15,"tag":619,"props":2004,"children":2006},{"style":2005},"--shiki-default:#79B8FF;--shiki-default-font-weight:bold",[2007],{"type":21,"value":2008},"# 文章发布系统 Spec\n",{"type":15,"tag":619,"props":2010,"children":2011},{"class":621,"line":632},[2012],{"type":15,"tag":619,"props":2013,"children":2014},{"emptyLinePlaceholder":668},[2015],{"type":21,"value":671},{"type":15,"tag":619,"props":2017,"children":2018},{"class":621,"line":664},[2019],{"type":15,"tag":619,"props":2020,"children":2021},{"style":2005},[2022],{"type":21,"value":2023},"## 数据模型\n",{"type":15,"tag":619,"props":2025,"children":2026},{"class":621,"line":674},[2027,2033],{"type":15,"tag":619,"props":2028,"children":2030},{"style":2029},"--shiki-default:#FFAB70",[2031],{"type":21,"value":2032},"-",{"type":15,"tag":619,"props":2034,"children":2035},{"style":642},[2036],{"type":21,"value":2037}," Article: id, title, content, tags[], author_id, created_at, updated_at\n",{"type":15,"tag":619,"props":2039,"children":2040},{"class":621,"line":683},[2041,2045],{"type":15,"tag":619,"props":2042,"children":2043},{"style":2029},[2044],{"type":21,"value":2032},{"type":15,"tag":619,"props":2046,"children":2047},{"style":642},[2048],{"type":21,"value":2049}," Tag: id, name\n",{"type":15,"tag":619,"props":2051,"children":2052},{"class":621,"line":711},[2053],{"type":15,"tag":619,"props":2054,"children":2055},{"emptyLinePlaceholder":668},[2056],{"type":21,"value":671},{"type":15,"tag":619,"props":2058,"children":2059},{"class":621,"line":1115},[2060],{"type":15,"tag":619,"props":2061,"children":2062},{"style":2005},[2063],{"type":21,"value":2064},"## API 接口\n",{"type":15,"tag":619,"props":2066,"children":2068},{"class":621,"line":2067},8,[2069],{"type":15,"tag":619,"props":2070,"children":2071},{"style":642},[2072],{"type":21,"value":2073},"| 方法 | 路径 | 说明 |\n",{"type":15,"tag":619,"props":2075,"children":2077},{"class":621,"line":2076},9,[2078],{"type":15,"tag":619,"props":2079,"children":2080},{"style":642},[2081],{"type":21,"value":2082},"|------|------|------|\n",{"type":15,"tag":619,"props":2084,"children":2086},{"class":621,"line":2085},10,[2087],{"type":15,"tag":619,"props":2088,"children":2089},{"style":642},[2090],{"type":21,"value":2091},"| POST | \u002Fapi\u002Farticles | 创建文章 |\n",{"type":15,"tag":619,"props":2093,"children":2095},{"class":621,"line":2094},11,[2096],{"type":15,"tag":619,"props":2097,"children":2098},{"style":642},[2099],{"type":21,"value":2100},"| PUT | \u002Fapi\u002Farticles\u002F:id | 编辑文章 |\n",{"type":15,"tag":619,"props":2102,"children":2104},{"class":621,"line":2103},12,[2105],{"type":15,"tag":619,"props":2106,"children":2107},{"style":642},[2108],{"type":21,"value":2109},"| DELETE | \u002Fapi\u002Farticles\u002F:id | 删除文章 |\n",{"type":15,"tag":619,"props":2111,"children":2113},{"class":621,"line":2112},13,[2114],{"type":15,"tag":619,"props":2115,"children":2116},{"style":642},[2117],{"type":21,"value":2118},"| GET | \u002Fapi\u002Farticles | 文章列表 |\n",{"type":15,"tag":619,"props":2120,"children":2122},{"class":621,"line":2121},14,[2123],{"type":15,"tag":619,"props":2124,"children":2125},{"emptyLinePlaceholder":668},[2126],{"type":21,"value":671},{"type":15,"tag":619,"props":2128,"children":2130},{"class":621,"line":2129},15,[2131],{"type":15,"tag":619,"props":2132,"children":2133},{"style":2005},[2134],{"type":21,"value":2135},"## 业务规则\n",{"type":15,"tag":619,"props":2137,"children":2139},{"class":621,"line":2138},16,[2140,2144],{"type":15,"tag":619,"props":2141,"children":2142},{"style":2029},[2143],{"type":21,"value":2032},{"type":15,"tag":619,"props":2145,"children":2146},{"style":642},[2147],{"type":21,"value":2148}," 标题长度：1-200 字符\n",{"type":15,"tag":619,"props":2150,"children":2152},{"class":621,"line":2151},17,[2153,2157],{"type":15,"tag":619,"props":2154,"children":2155},{"style":2029},[2156],{"type":21,"value":2032},{"type":15,"tag":619,"props":2158,"children":2159},{"style":642},[2160],{"type":21,"value":2161}," 内容不能为空\n",{"type":15,"tag":619,"props":2163,"children":2165},{"class":621,"line":2164},18,[2166,2170],{"type":15,"tag":619,"props":2167,"children":2168},{"style":2029},[2169],{"type":21,"value":2032},{"type":15,"tag":619,"props":2171,"children":2172},{"style":642},[2173],{"type":21,"value":2174}," 标签最多 5 个\n",{"type":15,"tag":619,"props":2176,"children":2178},{"class":621,"line":2177},19,[2179,2183],{"type":15,"tag":619,"props":2180,"children":2181},{"style":2029},[2182],{"type":21,"value":2032},{"type":15,"tag":619,"props":2184,"children":2185},{"style":642},[2186],{"type":21,"value":2187}," 只有作者可以编辑\u002F删除自己的文章\n",{"type":15,"tag":619,"props":2189,"children":2191},{"class":621,"line":2190},20,[2192],{"type":15,"tag":619,"props":2193,"children":2194},{"emptyLinePlaceholder":668},[2195],{"type":21,"value":671},{"type":15,"tag":619,"props":2197,"children":2199},{"class":621,"line":2198},21,[2200],{"type":15,"tag":619,"props":2201,"children":2202},{"style":2005},[2203],{"type":21,"value":2204},"## 验收标准\n",{"type":15,"tag":619,"props":2206,"children":2208},{"class":621,"line":2207},22,[2209,2213],{"type":15,"tag":619,"props":2210,"children":2211},{"style":2029},[2212],{"type":21,"value":2032},{"type":15,"tag":619,"props":2214,"children":2215},{"style":642},[2216],{"type":21,"value":2217}," [ ] 创建文章后返回完整文章对象\n",{"type":15,"tag":619,"props":2219,"children":2221},{"class":621,"line":2220},23,[2222,2226],{"type":15,"tag":619,"props":2223,"children":2224},{"style":2029},[2225],{"type":21,"value":2032},{"type":15,"tag":619,"props":2227,"children":2228},{"style":642},[2229],{"type":21,"value":2230}," [ ] 编辑文章只更新传入的字段\n",{"type":15,"tag":619,"props":2232,"children":2234},{"class":621,"line":2233},24,[2235,2239],{"type":15,"tag":619,"props":2236,"children":2237},{"style":2029},[2238],{"type":21,"value":2032},{"type":15,"tag":619,"props":2240,"children":2241},{"style":642},[2242],{"type":21,"value":2243}," [ ] 删除文章为软删除\n",{"type":15,"tag":619,"props":2245,"children":2247},{"class":621,"line":2246},25,[2248,2252],{"type":15,"tag":619,"props":2249,"children":2250},{"style":2029},[2251],{"type":21,"value":2032},{"type":15,"tag":619,"props":2253,"children":2254},{"style":642},[2255],{"type":21,"value":2256}," [ ] 列表接口支持分页（page, pageSize）\n",{"type":15,"tag":619,"props":2258,"children":2260},{"class":621,"line":2259},26,[2261,2265],{"type":15,"tag":619,"props":2262,"children":2263},{"style":2029},[2264],{"type":21,"value":2032},{"type":15,"tag":619,"props":2266,"children":2267},{"style":642},[2268],{"type":21,"value":2269}," [ ] 列表接口支持按标签筛选\n",{"type":15,"tag":31,"props":2271,"children":2272},{},[2273],{"type":15,"tag":50,"props":2274,"children":2275},{},[2276],{"type":21,"value":2277},"Step 3：审查 Spec",{"type":15,"tag":31,"props":2279,"children":2280},{},[2281],{"type":21,"value":2282},"人工审查 AI 生成的 Spec，补充遗漏：",{"type":15,"tag":58,"props":2284,"children":2285},{},[2286,2291,2296],{"type":15,"tag":62,"props":2287,"children":2288},{},[2289],{"type":21,"value":2290},"是否需要权限控制？",{"type":15,"tag":62,"props":2292,"children":2293},{},[2294],{"type":21,"value":2295},"是否需要草稿功能？",{"type":15,"tag":62,"props":2297,"children":2298},{},[2299],{"type":21,"value":2300},"标签是否需要预定义还是自由创建？",{"type":15,"tag":31,"props":2302,"children":2303},{},[2304],{"type":15,"tag":50,"props":2305,"children":2306},{},[2307],{"type":21,"value":2308},"Step 4：AI 生成代码",{"type":15,"tag":31,"props":2310,"children":2311},{},[2312],{"type":21,"value":2313},"确认 Spec 后，Trae 按 Spec 生成完整的代码实现。",{"type":15,"tag":31,"props":2315,"children":2316},{},[2317],{"type":15,"tag":50,"props":2318,"children":2319},{},[2320],{"type":21,"value":2321},"Step 5：验证与迭代",{"type":15,"tag":31,"props":2323,"children":2324},{},[2325],{"type":21,"value":2326},"运行测试，检查是否符合 Spec 中的验收标准。不符合的项回到 Spec 修正或让 AI 重新生成。",{"type":15,"tag":110,"props":2328,"children":2329},{},[],{"type":15,"tag":24,"props":2331,"children":2333},{"id":2332},"评审与测试",[2334],{"type":21,"value":2332},{"type":15,"tag":31,"props":2336,"children":2337},{},[2338],{"type":21,"value":2339},"AI 生成的代码不等于正确的代码。评审和测试是 Spec 驱动开发中不可或缺的环节。",{"type":15,"tag":469,"props":2341,"children":2343},{"id":2342},"ai-代码的常见失效模式",[2344],{"type":21,"value":2345},"AI 代码的常见失效模式",{"type":15,"tag":146,"props":2347,"children":2348},{},[2349,2370],{"type":15,"tag":150,"props":2350,"children":2351},{},[2352],{"type":15,"tag":154,"props":2353,"children":2354},{},[2355,2360,2365],{"type":15,"tag":158,"props":2356,"children":2357},{},[2358],{"type":21,"value":2359},"失效模式",{"type":15,"tag":158,"props":2361,"children":2362},{},[2363],{"type":21,"value":2364},"表现",{"type":15,"tag":158,"props":2366,"children":2367},{},[2368],{"type":21,"value":2369},"检查方法",{"type":15,"tag":173,"props":2371,"children":2372},{},[2373,2394,2415,2436,2457],{"type":15,"tag":154,"props":2374,"children":2375},{},[2376,2384,2389],{"type":15,"tag":180,"props":2377,"children":2378},{},[2379],{"type":15,"tag":50,"props":2380,"children":2381},{},[2382],{"type":21,"value":2383},"幻觉 API",{"type":15,"tag":180,"props":2385,"children":2386},{},[2387],{"type":21,"value":2388},"调用不存在的函数或方法",{"type":15,"tag":180,"props":2390,"children":2391},{},[2392],{"type":21,"value":2393},"查阅官方文档验证",{"type":15,"tag":154,"props":2395,"children":2396},{},[2397,2405,2410],{"type":15,"tag":180,"props":2398,"children":2399},{},[2400],{"type":15,"tag":50,"props":2401,"children":2402},{},[2403],{"type":21,"value":2404},"过时语法",{"type":15,"tag":180,"props":2406,"children":2407},{},[2408],{"type":21,"value":2409},"使用已废弃的 API",{"type":15,"tag":180,"props":2411,"children":2412},{},[2413],{"type":21,"value":2414},"检查版本号",{"type":15,"tag":154,"props":2416,"children":2417},{},[2418,2426,2431],{"type":15,"tag":180,"props":2419,"children":2420},{},[2421],{"type":15,"tag":50,"props":2422,"children":2423},{},[2424],{"type":21,"value":2425},"隐含 Bug",{"type":15,"tag":180,"props":2427,"children":2428},{},[2429],{"type":21,"value":2430},"逻辑正确但边界条件遗漏",{"type":15,"tag":180,"props":2432,"children":2433},{},[2434],{"type":21,"value":2435},"编写边界测试",{"type":15,"tag":154,"props":2437,"children":2438},{},[2439,2447,2452],{"type":15,"tag":180,"props":2440,"children":2441},{},[2442],{"type":15,"tag":50,"props":2443,"children":2444},{},[2445],{"type":21,"value":2446},"安全漏洞",{"type":15,"tag":180,"props":2448,"children":2449},{},[2450],{"type":21,"value":2451},"SQL 注入、XSS、未校验输入",{"type":15,"tag":180,"props":2453,"children":2454},{},[2455],{"type":21,"value":2456},"安全审查清单",{"type":15,"tag":154,"props":2458,"children":2459},{},[2460,2468,2473],{"type":15,"tag":180,"props":2461,"children":2462},{},[2463],{"type":15,"tag":50,"props":2464,"children":2465},{},[2466],{"type":21,"value":2467},"性能问题",{"type":15,"tag":180,"props":2469,"children":2470},{},[2471],{"type":21,"value":2472},"N+1 查询、不必要的重渲染",{"type":15,"tag":180,"props":2474,"children":2475},{},[2476],{"type":21,"value":2477},"性能测试",{"type":15,"tag":469,"props":2479,"children":2481},{"id":2480},"审查清单",[2482],{"type":21,"value":2480},{"type":15,"tag":31,"props":2484,"children":2485},{},[2486],{"type":21,"value":2487},"每次 AI 生成代码后，按以下清单检查：",{"type":15,"tag":58,"props":2489,"children":2492},{"className":2490},[2491],"contains-task-list",[2493,2512,2527,2542,2557,2572,2587],{"type":15,"tag":62,"props":2494,"children":2497},{"className":2495},[2496],"task-list-item",[2498,2503,2505,2510],{"type":15,"tag":2499,"props":2500,"children":2502},"input",{"disabled":668,"type":2501},"checkbox",[],{"type":21,"value":2504}," ",{"type":15,"tag":50,"props":2506,"children":2507},{},[2508],{"type":21,"value":2509},"功能正确",{"type":21,"value":2511},"：是否符合 Spec 中的验收标准？",{"type":15,"tag":62,"props":2513,"children":2515},{"className":2514},[2496],[2516,2519,2520,2525],{"type":15,"tag":2499,"props":2517,"children":2518},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2521,"children":2522},{},[2523],{"type":21,"value":2524},"输入验证",{"type":21,"value":2526},"：所有外部输入是否校验？",{"type":15,"tag":62,"props":2528,"children":2530},{"className":2529},[2496],[2531,2534,2535,2540],{"type":15,"tag":2499,"props":2532,"children":2533},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2536,"children":2537},{},[2538],{"type":21,"value":2539},"错误处理",{"type":21,"value":2541},"：异常情况是否处理？",{"type":15,"tag":62,"props":2543,"children":2545},{"className":2544},[2496],[2546,2549,2550,2555],{"type":15,"tag":2499,"props":2547,"children":2548},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2551,"children":2552},{},[2553],{"type":21,"value":2554},"安全检查",{"type":21,"value":2556},"：是否有注入、越权等漏洞？",{"type":15,"tag":62,"props":2558,"children":2560},{"className":2559},[2496],[2561,2564,2565,2570],{"type":15,"tag":2499,"props":2562,"children":2563},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2566,"children":2567},{},[2568],{"type":21,"value":2569},"性能检查",{"type":21,"value":2571},"：是否有 N+1、内存泄漏等问题？",{"type":15,"tag":62,"props":2573,"children":2575},{"className":2574},[2496],[2576,2579,2580,2585],{"type":15,"tag":2499,"props":2577,"children":2578},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2581,"children":2582},{},[2583],{"type":21,"value":2584},"代码规范",{"type":21,"value":2586},"：是否符合项目规则？",{"type":15,"tag":62,"props":2588,"children":2590},{"className":2589},[2496],[2591,2594,2595,2600],{"type":15,"tag":2499,"props":2592,"children":2593},{"disabled":668,"type":2501},[],{"type":21,"value":2504},{"type":15,"tag":50,"props":2596,"children":2597},{},[2598],{"type":21,"value":2599},"测试覆盖",{"type":21,"value":2601},"：关键路径是否有测试？",{"type":15,"tag":469,"props":2603,"children":2605},{"id":2604},"信任决策框架",[2606],{"type":21,"value":2604},{"type":15,"tag":146,"props":2608,"children":2609},{},[2610,2631],{"type":15,"tag":150,"props":2611,"children":2612},{},[2613],{"type":15,"tag":154,"props":2614,"children":2615},{},[2616,2621,2626],{"type":15,"tag":158,"props":2617,"children":2618},{},[2619],{"type":21,"value":2620},"场景",{"type":15,"tag":158,"props":2622,"children":2623},{},[2624],{"type":21,"value":2625},"信任级别",{"type":15,"tag":158,"props":2627,"children":2628},{},[2629],{"type":21,"value":2630},"行动",{"type":15,"tag":173,"props":2632,"children":2633},{},[2634,2652,2670,2688],{"type":15,"tag":154,"props":2635,"children":2636},{},[2637,2642,2647],{"type":15,"tag":180,"props":2638,"children":2639},{},[2640],{"type":21,"value":2641},"AI 生成的样板代码（CRUD、配置文件）",{"type":15,"tag":180,"props":2643,"children":2644},{},[2645],{"type":21,"value":2646},"高信任",{"type":15,"tag":180,"props":2648,"children":2649},{},[2650],{"type":21,"value":2651},"快速审查后使用",{"type":15,"tag":154,"props":2653,"children":2654},{},[2655,2660,2665],{"type":15,"tag":180,"props":2656,"children":2657},{},[2658],{"type":21,"value":2659},"AI 生成的业务逻辑",{"type":15,"tag":180,"props":2661,"children":2662},{},[2663],{"type":21,"value":2664},"中信任",{"type":15,"tag":180,"props":2666,"children":2667},{},[2668],{"type":21,"value":2669},"仔细审查 + 测试",{"type":15,"tag":154,"props":2671,"children":2672},{},[2673,2678,2683],{"type":15,"tag":180,"props":2674,"children":2675},{},[2676],{"type":21,"value":2677},"AI 生成的安全相关代码（认证、加密）",{"type":15,"tag":180,"props":2679,"children":2680},{},[2681],{"type":21,"value":2682},"低信任",{"type":15,"tag":180,"props":2684,"children":2685},{},[2686],{"type":21,"value":2687},"逐行审查 + 专项测试",{"type":15,"tag":154,"props":2689,"children":2690},{},[2691,2696,2700],{"type":15,"tag":180,"props":2692,"children":2693},{},[2694],{"type":21,"value":2695},"AI 生成的算法实现",{"type":15,"tag":180,"props":2697,"children":2698},{},[2699],{"type":21,"value":2682},{"type":15,"tag":180,"props":2701,"children":2702},{},[2703],{"type":21,"value":2704},"理解原理后再使用",{"type":15,"tag":110,"props":2706,"children":2707},{},[],{"type":15,"tag":24,"props":2709,"children":2711},{"id":2710},"最佳实践",[2712],{"type":21,"value":2710},{"type":15,"tag":469,"props":2714,"children":2716},{"id":2715},"何时用-spec-何时不用",[2717],{"type":21,"value":2718},"何时用 Spec \u002F 何时不用",{"type":15,"tag":146,"props":2720,"children":2721},{},[2722,2742],{"type":15,"tag":150,"props":2723,"children":2724},{},[2725],{"type":15,"tag":154,"props":2726,"children":2727},{},[2728,2732,2737],{"type":15,"tag":158,"props":2729,"children":2730},{},[2731],{"type":21,"value":2620},{"type":15,"tag":158,"props":2733,"children":2734},{},[2735],{"type":21,"value":2736},"是否需要 Spec",{"type":15,"tag":158,"props":2738,"children":2739},{},[2740],{"type":21,"value":2741},"原因",{"type":15,"tag":173,"props":2743,"children":2744},{},[2745,2763,2781,2798,2815],{"type":15,"tag":154,"props":2746,"children":2747},{},[2748,2753,2758],{"type":15,"tag":180,"props":2749,"children":2750},{},[2751],{"type":21,"value":2752},"单文件脚本",{"type":15,"tag":180,"props":2754,"children":2755},{},[2756],{"type":21,"value":2757},"❌",{"type":15,"tag":180,"props":2759,"children":2760},{},[2761],{"type":21,"value":2762},"Chat 模式足够",{"type":15,"tag":154,"props":2764,"children":2765},{},[2766,2771,2776],{"type":15,"tag":180,"props":2767,"children":2768},{},[2769],{"type":21,"value":2770},"多文件功能",{"type":15,"tag":180,"props":2772,"children":2773},{},[2774],{"type":21,"value":2775},"✅",{"type":15,"tag":180,"props":2777,"children":2778},{},[2779],{"type":21,"value":2780},"需要跨文件协调",{"type":15,"tag":154,"props":2782,"children":2783},{},[2784,2789,2793],{"type":15,"tag":180,"props":2785,"children":2786},{},[2787],{"type":21,"value":2788},"团队项目",{"type":15,"tag":180,"props":2790,"children":2791},{},[2792],{"type":21,"value":2775},{"type":15,"tag":180,"props":2794,"children":2795},{},[2796],{"type":21,"value":2797},"需要共同语言",{"type":15,"tag":154,"props":2799,"children":2800},{},[2801,2806,2810],{"type":15,"tag":180,"props":2802,"children":2803},{},[2804],{"type":21,"value":2805},"原型验证",{"type":15,"tag":180,"props":2807,"children":2808},{},[2809],{"type":21,"value":2757},{"type":15,"tag":180,"props":2811,"children":2812},{},[2813],{"type":21,"value":2814},"速度优先",{"type":15,"tag":154,"props":2816,"children":2817},{},[2818,2823,2827],{"type":15,"tag":180,"props":2819,"children":2820},{},[2821],{"type":21,"value":2822},"合规项目",{"type":15,"tag":180,"props":2824,"children":2825},{},[2826],{"type":21,"value":2775},{"type":15,"tag":180,"props":2828,"children":2829},{},[2830],{"type":21,"value":2831},"需要可追溯性",{"type":15,"tag":469,"props":2833,"children":2835},{"id":2834},"spec-的粒度控制",[2836],{"type":21,"value":2837},"Spec 的粒度控制",{"type":15,"tag":58,"props":2839,"children":2840},{},[2841,2864],{"type":15,"tag":62,"props":2842,"children":2843},{},[2844,2849,2851],{"type":15,"tag":50,"props":2845,"children":2846},{},[2847],{"type":21,"value":2848},"太细",{"type":21,"value":2850},"：微管理 AI，反而降低效率\n",{"type":15,"tag":58,"props":2852,"children":2853},{},[2854,2859],{"type":15,"tag":62,"props":2855,"children":2856},{},[2857],{"type":21,"value":2858},"❌ \"第 3 行用 const 不用 let\"",{"type":15,"tag":62,"props":2860,"children":2861},{},[2862],{"type":21,"value":2863},"✅ \"所有变量声明使用 const 优先，需要重新赋值时用 let\"",{"type":15,"tag":62,"props":2865,"children":2866},{},[2867,2872,2874],{"type":15,"tag":50,"props":2868,"children":2869},{},[2870],{"type":21,"value":2871},"太粗",{"type":21,"value":2873},"：等于没写\n",{"type":15,"tag":58,"props":2875,"children":2876},{},[2877,2882],{"type":15,"tag":62,"props":2878,"children":2879},{},[2880],{"type":21,"value":2881},"❌ \"实现用户系统\"",{"type":15,"tag":62,"props":2883,"children":2884},{},[2885],{"type":21,"value":2886},"✅ \"实现用户注册\u002F登录\u002F找回密码，包含邮箱验证和密码加密\"",{"type":15,"tag":469,"props":2888,"children":2890},{"id":2889},"spec-与代码的同步",[2891],{"type":21,"value":2892},"Spec 与代码的同步",{"type":15,"tag":58,"props":2894,"children":2895},{},[2896,2901,2914,2919],{"type":15,"tag":62,"props":2897,"children":2898},{},[2899],{"type":21,"value":2900},"每次代码变更后，检查 Spec 是否仍然准确",{"type":15,"tag":62,"props":2902,"children":2903},{},[2904,2906,2912],{"type":21,"value":2905},"使用 ",{"type":15,"tag":42,"props":2907,"children":2909},{"className":2908},[],[2910],{"type":21,"value":2911},"\u002Fspeckit.analyze",{"type":21,"value":2913}," 检查一致性",{"type":15,"tag":62,"props":2915,"children":2916},{},[2917],{"type":21,"value":2918},"将 Spec 文件纳入版本控制",{"type":15,"tag":62,"props":2920,"children":2921},{},[2922],{"type":21,"value":2923},"Spec 是 Source of Truth，代码跟随 Spec",{"type":15,"tag":110,"props":2925,"children":2926},{},[],{"type":15,"tag":24,"props":2928,"children":2930},{"id":2929},"常见问题",[2931],{"type":21,"value":2929},{"type":15,"tag":146,"props":2933,"children":2934},{},[2935,2951],{"type":15,"tag":150,"props":2936,"children":2937},{},[2938],{"type":15,"tag":154,"props":2939,"children":2940},{},[2941,2946],{"type":15,"tag":158,"props":2942,"children":2943},{},[2944],{"type":21,"value":2945},"问题",{"type":15,"tag":158,"props":2947,"children":2948},{},[2949],{"type":21,"value":2950},"解决方案",{"type":15,"tag":173,"props":2952,"children":2953},{},[2954,2967,2980,2993,3006,3019,3032,3057,3084],{"type":15,"tag":154,"props":2955,"children":2956},{},[2957,2962],{"type":15,"tag":180,"props":2958,"children":2959},{},[2960],{"type":21,"value":2961},"Spec 写得太粗，AI 猜测太多",{"type":15,"tag":180,"props":2963,"children":2964},{},[2965],{"type":21,"value":2966},"补充数据模型、接口定义、验收标准",{"type":15,"tag":154,"props":2968,"children":2969},{},[2970,2975],{"type":15,"tag":180,"props":2971,"children":2972},{},[2973],{"type":21,"value":2974},"Spec 写得太细，耗时过长",{"type":15,"tag":180,"props":2976,"children":2977},{},[2978],{"type":21,"value":2979},"只写关键约束，实现细节交给 AI",{"type":15,"tag":154,"props":2981,"children":2982},{},[2983,2988],{"type":15,"tag":180,"props":2984,"children":2985},{},[2986],{"type":21,"value":2987},"AI 不遵守 Spec",{"type":15,"tag":180,"props":2989,"children":2990},{},[2991],{"type":21,"value":2992},"在规则文件中引用 Spec，强调\"严格遵守\"",{"type":15,"tag":154,"props":2994,"children":2995},{},[2996,3001],{"type":15,"tag":180,"props":2997,"children":2998},{},[2999],{"type":21,"value":3000},"Spec 和代码不一致",{"type":15,"tag":180,"props":3002,"children":3003},{},[3004],{"type":21,"value":3005},"用 Spec 作为 Source of Truth，代码跟随 Spec",{"type":15,"tag":154,"props":3007,"children":3008},{},[3009,3014],{"type":15,"tag":180,"props":3010,"children":3011},{},[3012],{"type":21,"value":3013},"团队不愿意写 Spec",{"type":15,"tag":180,"props":3015,"children":3016},{},[3017],{"type":21,"value":3018},"从轻量级 Spec 开始（只写接口定义 + 验收标准），逐步完善",{"type":15,"tag":154,"props":3020,"children":3021},{},[3022,3027],{"type":15,"tag":180,"props":3023,"children":3024},{},[3025],{"type":21,"value":3026},"不确定 Spec 该写多细",{"type":15,"tag":180,"props":3028,"children":3029},{},[3030],{"type":21,"value":3031},"参考\"我应该用 Spec 吗\"的决策树，按项目规模调整",{"type":15,"tag":154,"props":3033,"children":3034},{},[3035,3046],{"type":15,"tag":180,"props":3036,"children":3037},{},[3038,3044],{"type":15,"tag":42,"props":3039,"children":3041},{"className":3040},[],[3042],{"type":21,"value":3043},"npm install -g speckit",{"type":21,"value":3045}," 报错",{"type":15,"tag":180,"props":3047,"children":3048},{},[3049,3051],{"type":21,"value":3050},"SpecKit 不是 npm 包，使用 ",{"type":15,"tag":42,"props":3052,"children":3054},{"className":3053},[],[3055],{"type":21,"value":3056},"uv tool install specify-cli --from git+https:\u002F\u002Fgithub.com\u002Fgithub\u002Fspec-kit.git",{"type":15,"tag":154,"props":3058,"children":3059},{},[3060,3079],{"type":15,"tag":180,"props":3061,"children":3062},{},[3063,3069,3071,3077],{"type":15,"tag":42,"props":3064,"children":3066},{"className":3065},[],[3067],{"type":21,"value":3068},"\u002Fspeckit.constitution",{"type":21,"value":3070}," 和 ",{"type":15,"tag":42,"props":3072,"children":3074},{"className":3073},[],[3075],{"type":21,"value":3076},"\u002Fspeckit.specify",{"type":21,"value":3078}," 有什么区别？",{"type":15,"tag":180,"props":3080,"children":3081},{},[3082],{"type":21,"value":3083},"constitution 是项目级原则（全局约束，只需一次），specify 是功能级规范（每个新功能都要执行）",{"type":15,"tag":154,"props":3085,"children":3086},{},[3087,3098],{"type":15,"tag":180,"props":3088,"children":3089},{},[3090,3096],{"type":15,"tag":42,"props":3091,"children":3093},{"className":3092},[],[3094],{"type":21,"value":3095},"\u002Fspeckit.clarify",{"type":21,"value":3097}," 是必须的吗？",{"type":15,"tag":180,"props":3099,"children":3100},{},[3101],{"type":21,"value":3102},"不是，它是可选的。需求已经很清晰时可以跳过",{"type":15,"tag":110,"props":3104,"children":3105},{},[],{"type":15,"tag":445,"props":3107,"children":3108},{},[3109,3119],{"type":15,"tag":31,"props":3110,"children":3111},{},[3112,3114],{"type":21,"value":3113},"📖 ",{"type":15,"tag":50,"props":3115,"children":3116},{},[3117],{"type":21,"value":3118},"参考来源",{"type":15,"tag":58,"props":3120,"children":3121},{},[3122,3132,3142],{"type":15,"tag":62,"props":3123,"children":3124},{},[3125,3127],{"type":21,"value":3126},"GitHub 官方仓库：",{"type":15,"tag":777,"props":3128,"children":3130},{"href":779,"rel":3129},[781],[3131],{"type":21,"value":822},{"type":15,"tag":62,"props":3133,"children":3134},{},[3135,3137],{"type":21,"value":3136},"官方视频：",{"type":15,"tag":777,"props":3138,"children":3140},{"href":804,"rel":3139},[781],[3141],{"type":21,"value":808},{"type":15,"tag":62,"props":3143,"children":3144},{},[3145],{"type":21,"value":3146},"数据更新于 2026 年 4 月 27 日 · AI 工具迭代迅速，信息仅供参考，请以官方最新发布为准",{"type":15,"tag":3148,"props":3149,"children":3150},"style",{},[3151],{"type":21,"value":3152},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":664,"depth":664,"links":3154},[3155,3156,3157,3158,3164,3180,3184,3189,3194],{"id":26,"depth":632,"text":29},{"id":115,"depth":632,"text":118},{"id":254,"depth":632,"text":254},{"id":465,"depth":632,"text":465,"children":3159},[3160,3161,3162,3163],{"id":471,"depth":664,"text":474},{"id":580,"depth":664,"text":583},{"id":600,"depth":664,"text":603},{"id":749,"depth":664,"text":752},{"id":763,"depth":632,"text":766,"children":3165},[3166,3167,3168,3169,3170,3171,3172,3173,3174,3175,3176,3177,3178,3179],{"id":769,"depth":664,"text":772},{"id":825,"depth":664,"text":828},{"id":1014,"depth":664,"text":1014},{"id":1167,"depth":664,"text":1167},{"id":1211,"depth":664,"text":1214},{"id":1257,"depth":664,"text":1260},{"id":1334,"depth":664,"text":1337},{"id":1439,"depth":664,"text":1442},{"id":1489,"depth":664,"text":1492},{"id":1578,"depth":664,"text":1581},{"id":1607,"depth":664,"text":1610},{"id":1690,"depth":664,"text":1693},{"id":1735,"depth":664,"text":1738},{"id":1785,"depth":664,"text":1788},{"id":1910,"depth":632,"text":1913,"children":3181},[3182,3183],{"id":1916,"depth":664,"text":1919},{"id":1958,"depth":664,"text":1961},{"id":2332,"depth":632,"text":2332,"children":3185},[3186,3187,3188],{"id":2342,"depth":664,"text":2345},{"id":2480,"depth":664,"text":2480},{"id":2604,"depth":664,"text":2604},{"id":2710,"depth":632,"text":2710,"children":3190},[3191,3192,3193],{"id":2715,"depth":664,"text":2718},{"id":2834,"depth":664,"text":2837},{"id":2889,"depth":664,"text":2892},{"id":2929,"depth":632,"text":2929},"content:methodology:spec-driven.md","content","methodology\u002Fspec-driven.md","methodology\u002Fspec-driven","md",1777287374367]