尧图建网站 尧图建网站 YAOTU WEB BUILD 免费咨询
ARTICLE DETAIL

资讯详情

深耕网站建设与建站编程的一线实战洞察。

Spec-Kit安装与介绍

Spec-Kit安装与介绍 Spec-Kit安装与介绍1、安装与开局1.1、安装specify-cli及其依赖1.2、specify-cli脚手架开局2、官方使用例子2.1、Establish project principles2.2、Create the spec2.3、Create a technical implementation plan2.4、Break down into tasks2.5、Execute implementation3、核心命令功能简介3.1、Core Commands3.2、Optional Commands4、推荐 SDD 流转顺序5、specify帮助说明官网链接: https://github.com/github/spec-kit1、安装与开局1.1、安装specify-cli及其依赖1. 安装python-3.14.5-amd64.exe2. 查看python版本 python--version3. 安装uv以下两个方法可以根据网络情况选择使用一个下载安装 方法1 powershell-ExecutionPolicyByPass-cirm https://astral.sh/uv/install.ps1 | iex方法2 wingetinstall--idastral-sh.uv-e4. 查看uv版本 uv--versionuvx pycowsayhello world!5. 使用uv安装spec-kit的脚手架specify-cli uv toolinstallspecify-cli--fromgithttps://github.com/github/spec-kit.gitv0.12.13 或 uv toolinstallspecify-cli--fromgithttps://mirror.ghproxy.com/https://github.com/github/spec-kit.gitv0.12.131.2、specify-cli脚手架开局1. 简单使用新项目初始化会新建项目目录 specify--versionspecify init my-project1--integrationclaudecdmy-project1 可以去看看脚手架创建的项目目录都有什么2. 存量项目初始化 specify init.--integrationclaude specify init.--integrationclaude--forcespecify init--here--integrationclaude3. 启动claude code# 方案Aclaude# 方案B自动接受文件编辑bash命令仍然需要确认安全日常SDD推荐claude --permission-mode acceptEdits# 方案CbypassPermissions全部工具直接放行高危本地沙盒项目用claude --permission-mode bypassPermissions2、官方使用例子2.1、Establish project principles制定项目“宪法”/speckit.constitution ​定义项目的最高准则如技术栈、代码质量、性能要求确保 AI 生成的所有内容符合团队规范/speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements2.2、Create the spec定义功能需求/speckit.specify ​将模糊的用户需求转化为可测试、无歧义的功能规格包含用户故事、功能需求、成功标准/speckit.specify Build an application that can help me organize my photos in separate photo albums. Albums are grouped by date and can be re-organized by dragging and dropping on the main page. Albums are never in other nested albums. Within each album, photos are previewed in a tile-like interface.2.3、Create a technical implementation plan生成技术方案/speckit.plan ​基于功能规范AI 自动生成详细的技术实现计划包括数据模型、接口契约、外部依赖、性能/安全要求/speckit.plan The application uses Vite with minimal number of libraries. Use vanilla HTML, CSS, and JavaScript as much as possible. Images are not uploaded anywhere and metadata is stored in a local SQLite database.2.4、Break down into tasks分解任务列表/speckit.tasks ​AI 将技术方案自动分解为可执行的任务单元每个任务包含前置条件、执行步骤、依赖关系/speckit.tasks2.5、Execute implementation执行任务生成代码/speckit.implement​AI 逐一执行任务列表中的任务自动编写代码、创建文件、运行测试并实时报告进度/speckit.implement3、核心命令功能简介执行完specify init之后你的 AI 编码代理就可以使用下面这些斜杠命令完成结构化开发流程。对于支持技能skills模式的集成环境传入参数--integration agent --integration-options--skills会安装 agent skills 代替 slash-command prompt files。3.1、Core CommandsEssential commands for the Spec-Driven Development workflow:CommandAgent SkillDescription/speckit.constitutionspeckit-constitutionCreate or update project governing principles and development guidelines创建 / 更新项目总纲领、开发规范准则/speckit.specifyspeckit-specifyDefine what you want to build (requirements and user stories)定义要开发的内容需求、用户故事/speckit.planspeckit-planCreate technical implementation plans with your chosen tech stack根据选定技术栈生成技术实施方案/speckit.tasksspeckit-tasksGenerate actionable task lists for implementation生成可落地的开发任务清单/speckit.implementspeckit-implementExecute all tasks to build the feature according to the plan根据方案执行全部任务完成功能编码实现/speckit.convergespeckit-convergeAssess the codebase against spec/plan/tasks and append remaining work as new tasks对照规范、方案、任务清单评审代码库把剩余未完成工作追加生成新任务/speckit.taskstoissuesspeckit-taskstoissuesConvert generated task lists into GitHub issues for tracking and execution将任务清单转换成 GitHub Issue用于跟踪管理3.2、Optional CommandsAdditional commands for enhanced quality and validation:CommandAgent SkillDescription/speckit.clarifyspeckit-clarifyClarify underspecified areas(recommended before /speckit.plan; formerly /quizme)/speckit.analyzespeckit-analyzeCross-artifact consistency coverage analysis(run after /speckit.tasks, before /speckit.implement)/speckit.checklistspeckit-checklistGenerate custom quality checklists that validate requirements completeness, clarity, and consistency(like “unit tests for English”)4、推荐 SDD 流转顺序/speckit.constitution 项目纲领 →/speckit.specify 写需求规范 →/speckit.plan 做技术方案 →/speckit.tasks 拆解任务 →/speckit.implement 编码落地 →/speckit.converge 收敛校验、补剩余任务/speckit.taskstoissues 是可选仅在用 GitHub 做任务管理的时候使用。5、specify帮助说明specify --help specify init --help
返回列表