安装 Specify CLI
uv tool install specify-cli --from git+github.com/github/spec…
还有一个中文版本的
uv tool install specify-cn-cli --from git+github.com/linfee/spec…
所以还需要你安装下uv
powershell -ExecutionPolicy ByPass -c "irm astral.sh/uv/install.… | iex"
此外,还需要安装python 3.11+, Git
使用
# Create new project 创建新项目,从最新模板初始化一个新的 Specify 项目
specify init <PROJECT_NAME>
# Or initialize in existing project 在现有项目中初始化
specify init . --ai claude
# Check installed tools 检查已安装的工具,如git,claude , gemini
specify check
升级
uv tool install specify-cli --force --from git+github.com/github/spec…
中文版本
uv tool install specify-cn-cli --force --from git+github.com/linfee/spec…
常用
//.当前目录 --no-git 不创建.git目录,
specify init . --no-git --ai copilot --script sh //中文版本换成specify-cn即可
确立项目原则
创建项目的指导原则和开发指南,指导后续开发
在CLI AI工具里面启动
/speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements
创建以代码质量、测试标准、用户体验一致性和性能要求为重点的原则
会创建一个.specify/memory/constitution.md
AI 代理将在规范制定、规划和实施阶段参考这些原则。
创建需求
/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.
/speckit.specify 开发一个应用程序,帮助我把我們的照片分门别类地整理在不同的相册中。相册按日期分组,并且可以在主页面通过拖放重新排序。相册不会嵌套在其他相册中。在每个相册中,照片以类似瓷砖的界面进行预览。
描述你想构建的内容。关注 what and why,需求和用户故事之类,而不是技术栈。
制定技术实施计划
可选的 /speckit.clarify 澄清未明确的领域,还可以让cc验证下你的checklist,如:
Read the review and acceptance checklist, and check off each item in the checklist if the feature spec meets the criteria. Leave it empty if it does not.
然后提供你的技术栈和架构选择
/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.
/speckit.plan 该应用程序使用 Vite 并尽量减少库的数量。尽可能使用纯 HTML、CSS 和 JavaScript。图像不会上传到任何地方,元数据存储在本地 SQLite 数据库中。
执行后要检查 research.md 是否使用了正确的技术栈
任务拆解
/speckit.tasks
从你的实施计划创建可操作的待办事项列表
会创建 tasks.md
每个用户故事都拥有自己的一组任务
执行
/speckit.implement 执行所有任务
小结:
所有命令的执行顺序:
/speckit.constitution - 建立项目原则
/speckit.specify - 创建基线规范
/speckit.clarify (可选) - 在规划前询问结构化问题以降低模糊区域的风险 (如果使用,在 /speckit.plan 前运行,也可以在任何阶段运行)
/speckit.plan - 创建实施计划
/speckit.checklist (可选) - 生成质量检查清单以验证需求的完整性、清晰度和一致性 (在 /speckit.plan 后)
/speckit.tasks - 生成可执行任务
/speckit.analyze (可选) - 交叉制品一致性和对齐报告 (在 /speckit.tasks 后,/speckit.implement 前)
/speckit.implement - 执行实施
应该是使用prompt功能实现的
支持从vibe-coding to AI-native development开发新范式