当前位置: 首页 > news >正文

AI规范编程 - specify-Kit

🤔 What is Spec-Driven Development?🤔 什么是规范驱动开发?

Spec-Driven Development flips the script on traditional software development. For decades, code has been king — specifications were just scaffolding we built and discarded once the "real work" of coding began. Spec-Driven Development changes this: specifications become executable, directly generating working implementations rather than just guiding them.规范驱动开发颠覆了传统软件开发的脚本。几十年来,代码一直是王道——规范只是我们构建的脚手架,一旦编码的“真正工作”开始就被丢弃了。规范驱动开发改变了这一点:规范变得可执行,直接生成有效的实现,而不仅仅是指导它们。

⚡ Get Started ⚡ 开始行动

1. Install Specify CLI 1.安装指定CLI

Choose your preferred installation method:
选择您喜欢的安装方法:

选项1:持久安装(推荐)

Install once and use everywhere: 
安装一次,随处使用:

uv tool install specify-cli --from git+https://github.com/github/spec-kit.git

Then use the tool directly: 
然后直接使用该工具:
先安装

npm install -g @qwen-code/qwen-code
# Create new project
specify init <PROJECT_NAME># Or initialize in existing project
# 我使用这个
specify init . --ai qwen
# or
specify init --here --ai claude# Check installed tools
specify check

![[Pasted image 20251207195841.png]]

从界面可以看到项目已成功初始化完成(显示“Project ready”),接下来可以按以下步骤操作:

一、优先处理安全提示(避免密钥泄露)

界面中的“Agent Folder Security”提示:.qwen/ 文件夹可能存储凭证/密钥,需将其加入 .gitignore 防止误提交:

  1. 打开项目根目录的 .gitignore 文件(若没有则新建);
  2. 添加一行:
    .qwen/
    
  3. 保存文件(若已有Git仓库,执行 git add .gitignore && git commit -m "Add .qwen/ to .gitignore" 提交修改)。

二、开始使用项目:执行核心命令

通过“Next Steps”中的Slash命令,利用Qwen AI助手推进项目:\

步骤 命令 作用
1 /speckit.constitution 建立项目基本原则(定义项目目标、规范)
2 /speckit.specify 创建基础需求文档(明确项目功能范围)
3 /speckit.plan 生成实施计划(拆分任务、排期)
4 /speckit.tasks 生成可执行任务列表(细化每个步骤)
5 /speckit.implement 执行实施(AI辅助生成代码/配置)

三、可选增强命令(提升项目质量)

  • /speckit.clarify:规划前梳理模糊需求(降低风险);
  • /speckit.analyze:任务生成后,检查各模块一致性;
  • /speckit.checklist:计划完成后,生成质量检查表(验证需求完整性)。

四、当前状态说明

项目已完成初始化流程(模板下载、Git仓库检测等),直接在当前项目目录下执行上述命令即可启动开发流程。

建议先执行 /speckit.constitution 明确项目基础规则,再逐步推进后续步骤。

To upgrade Specify, see the Upgrade Guide for detailed instructions. Quick upgrade:
要升级指定,请参阅升级指南以获取详细说明。快速升级:

uv tool install specify-cli --force --from git+https://github.com/github/spec-kit.git

Option 2: One-time Usage 选项2:一次性使用

Run directly without installing: 
无需安装直接运行:

uvx --from git+https://github.com/github/spec-kit.git specify init <PROJECT_NAME>

Benefits of persistent installation:持久安装的好处:

  • Tool stays installed and available in
    PATH工具保持安装并在PATH中可用
  • No need to create shell aliases 
    无需创建shell别名
  • Better tool management with uv tool listuv tool upgradeuv tool uninstall
    使用uv tool listuv tool upgradeuv tool uninstall更好的工具管理
  • Cleaner shell configuration 
    更清洁的外壳配置

2. Establish project principles 2.建立项目原则

Launch your AI assistant in the project directory. The /speckit.* commands are available in the assistant.
在项目目录中启动您的AI助手。/speckit.*命令在助手中可用。

Use the /speckit.constitution command to create your project's governing principles and development guidelines that will guide all subsequent development.
使用/speckit.constitution命令创建项目的管理原则和开发指南,以指导所有后续开发。

/speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements/speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements

3. Create the spec 3.创建规范

Use the /speckit.specify command to describe what you want to build. Focus on the what and why, not the tech stack.使用/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.

4. Create a technical implementation plan4、打造技术落地方案

Use the /speckit.plan command to provide your tech stack and architecture choices.
使用/speckit.plan命令提供您的技术堆栈和架构选择。

/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.

5. Break down into tasks 5.分解成任务

Use /speckit.tasks to create an actionable task list from your implementation plan.
使用/speckit.tasks从您的落地方案创建一个可操作的任务列表。

/speckit.tasks

6. Execute implementation 6.执行执行

Use /speckit.implement to execute all tasks and build your feature according to the plan.
使用/speckit.implement执行所有任务并根据计划构建您的功能。

/speckit.implement

For detailed step-by-step instructions, see our comprehensive guide.
有关详细的分步说明,请参阅我们的综合指南。

http://www.jsqmd.com/news/65622/

相关文章:

  • 2025最新成都精装房装修公司TOP5评测!一站式服务+品质保障,成都十区装修服务商权威榜单发布,重塑居家生活新体验
  • why North Korean are extremely anti-American, and think Nihon is a puppet of A.
  • 可变参数模版中的折叠表达式
  • scikit-learn 能否做深度学习?——兼谈不同神经元数量的模型对比实验实现
  • 吟诗一首
  • 二分查找
  • 深入解析USB侦探:数字取证数据流分析技术
  • Oracle数据库性能诊断与SQL优化实战指南
  • 56
  • re:MARS 2022:聚焦机器学习与机器人技术的年度盛会
  • 深入解析:Spring Boot 3.2 高性能架构实战:虚拟线程、原生镜像与响应式编程全解析
  • CMake-模块化
  • 测试用例的编写和注意事项
  • 割点和桥
  • AI元人文构想全维解构:从意义行为原生到文明价值操作系统
  • YII框架的三条经典利用链的探究
  • HELLDIVERS 2 地狱潜兵 2 缩小体积至22.54G 教程
  • 深度解析人工神经元输入机制
  • Milvus GUI ATTU Docker 容器化部署指南
  • 如何使用QFontDatabase在Qt应用程序中嵌入字体
  • 人工神经元输入机制深度解析:从理论基础到工程实践的全面指南
  • 贪心 [CSP-S 2025] 社团招新
  • 12月7日总结 - 作业----
  • P7115 [NOIP2020] 移球游戏 题解
  • pdf图片处理
  • 2025年12月本田雅阁更换轮胎推荐:最新性能测评与选购攻略
  • 获取运行中的exe的窗口标题名
  • 2025年大众帕萨特更换轮胎推荐:玲珑、米其林、马牌哪个是全面优选?
  • 12.7
  • 安卓页面的布局和生命周期(新手村第三篇) - 详解