github/spec-kit Skill:把规格说明书变成可执行产物的 SDD 官方工具包

“vibe coding 之后,spec coding 来了”——这是 GitHub 在 2025 年 9 月发布 Spec Kit 时抛出的命题。当 AI 写了大部分代码,瓶颈就从”让 AI 写出来”转移到了”把需求描述得足够精确”。Spec Kit 就是把”规格说明书”从辅助文档升级为可执行工件的官方开源工具集。

github/spec-kit 是 GitHub 官方维护的 Spec-Driven Development(SDD)工具包,核心理念是 specifications become executable:规格说明不再只是写完即丢的脚手架,而是直接生成可工作实现的可执行产物。它通过一个 specify CLI + 模板 + 脚本,在任何主流 AI 编码 agent(Claude Code、Copilot、Cursor、Codex 等 35+ harness)的工作流里强制插入 constitution → specify → plan → tasks → implement → clarify/analyze(可选)的固定流程。截至 2026 年 8 月,star-history 记录其日均新增 ~892 stars,是当前 Agent 生态里增速最快的官方项目之一。

截至 2026 年 8 月 21 日,github/spec-kit 在 GitHub 累计获得 约 129.8k stars(数据源:agentlist.top 2026-08-18 记录,topaiproduct 8-16 报道 129k stars / +890/day);GitHub Trending 全球排名 #20(数据源:dataaihub.co)。MIT 协议,Python 实现,活跃维护,Open Source 项目,最近的 release 是 v0.12.x 系列。

GitHub 链接:

https://github.com/github/spec-kit

作者归属 GitHub 官方,John Lam 是研究侧的核心推动者。spec-kit 在 GitHub 的产品定位里属于”agent 时代的工程方法论”——和 GitHub Copilot Coding Agent、Copilot Spaces 同属 GitHub AI for Engineers 系列,但它的方法论输出可以适配任何 agent harness。

github/spec-kit 的 README 把它的核心命题用一句话概括:”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.” 它通过三个核心机制实现这个转变:

1. 固定流程(constitution → specify → plan → tasks → implement)
用户启动 agent 后,先通过 /speckit.constitution 创建项目治理原则(代码质量、测试标准、UX 一致性、性能要求),后续所有开发必须遵守;/speckit.specify 描述要构建什么(关注 what 和 why,不指定技术栈);/speckit.plan 给出技术栈和架构选择;/speckit.tasks 拆解任务;/speckit.implement 执行。每一步产出 Markdown 工件喂给下一步——而不是一次性 prompt 生成代码。

2. 跨 agent 适配
specify init 一行命令初始化项目,自动适配选定的 agent harness(30+ 包括 Claude Code、GitHub Copilot、Cursor、Codex CLI、Gemini CLI、Windsurf、opencode、Qwen Code、Kiro 等);同时支持企业自托管 extension/preset catalog,可在离线/防火墙后运行。

3. 105+ 社区扩展 & 22+ preset
Spec Kit 提供完整的扩展机制:CI Guard(合规门禁)、Architecture Guard(架构治理)、Canon(baseline-driven workflows)、Product Forge(产品管理导向 SDD)、MAQA(multi-agent orchestration with quality gates)、FX→.NET(端到端 .NET Framework 迁移 7 阶段)等社区 preset,可直接装入团队工作流。

github/spec-kit 的核心特点可以归纳为五条:

  • 官方背书 + MIT 协议:GitHub 官方出品,MIT 协议可商用,与 GitHub Copilot、Claude Code、Cursor、Codex、Gemini CLI、Windsurf 等 35+ agent 平台双向兼容
  • 可执行规格说明书:规格不再是写完即丢的文档,而是 Markdown 工件 + 模板 + YAML workflow 的结构化产物,被 agent 在每一步重新读取
  • 自适应 agent harnessspecify init --ai claude / --ai copilot / --ai cursor 一行切换 agent,agent 不变则 workflow 复用
  • 可扩展生态:105+ 社区扩展(60+ 作者贡献)、22+ preset(覆盖 SDD、AIDE 7 步工程生命周期、Canon baseline-driven、MAQA multi-agent 等不同流程),可自定义整套 SDD 流程或替换核心方法论
  • 企业可自托管:支持离线/防火墙后运行,企业可托管自己的 extension/preset catalog,把合规门禁(CI Guard、Architecture Guard)嵌入团队工作流

安装方式(前提是已装 uv):

# 方式一:从 GitHub 安装最新版
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git

# 方式二:从 PyPI 安装
uv tool install specify-cli

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

初始化一个新项目:

specify init my-project --ai claude
# 或初始化当前目录
specify init . --ai claude
# 或带 agent 指定
specify init --here --ai copilot

在 Claude Code 等 agent 里启动后,会自动出现 /speckit.constitution/speckit.specify/speckit.plan/speckit.tasks/speckit.implement 等命令。

最小使用示例(建一个照片管理应用):

/speckit.constitution  # 设定项目原则
/speckit.specify  Build an application that can help me organize my photos in separate photo albums. Albums are grouped by date...
/speckit.plan  The application uses Vite with minimal number of libraries. Use vanilla HTML, CSS, and JavaScript as much as possible...
/speckit.tasks  # 拆解为可执行任务
/speckit.implement  # agent 按计划实现

github/spec-kit 主要面向以下场景和人群:

  • 企业研发团队:希望把”spec-first”工程实践制度化,通过结构化工作流减少 agent 输出漂移
  • 长周期、复杂功能开发:当 agent 会持续工作数小时,规格说明是控制 drift 的关键——spec-kit 提供每个 phase 重新读取 spec 的机制
  • 多 agent 切换场景:在 Claude Code、Copilot、Cursor 之间切换,但希望工程标准不漂移
  • 研究 / 实验性产品:Spec Kit 支持”并行实现探索”(parallel implementations)实验目标,可以并行尝试不同技术栈和 UX 方案
  • Brownfield 项目现代化:已有代码库的渐进式功能添加或现代化改造

典型输入输出案例:

场景一:0-to-1 Greenfield 项目

  • Input:用户启动 Claude Code,在新项目里执行 specify init --ai claude
  • Output:项目目录出现 .specify/ 目录,包含 memory/constitution.md 模板、specs/、plans/、tasks/ 模板;在 Claude Code 里出现 /speckit.constitution 等命令;用户先用 /speckit.constitution 定义”代码必须 80% 测试覆盖””性能 P95 < 200ms”等原则;然后用 /speckit.specify 描述产品;后续每一步 agent 都会重新读取 spec 避免偏离

场景二:Brownfield 项目加功能

  • Input:用户在一个已有 React 应用里执行 specify init . --ai claude
  • Output:项目里出现 /speckit.specify 等命令;用户描述要加的功能(”添加实时协作编辑”),agent 先写 spec(不含技术栈),再写 plan(选择 Yjs + WebSocket),再拆 tasks,最后 implement——每步都基于前面产出的 Markdown 文档

场景三:企业合规场景

  • Input:企业在自己环境自托管 Spec Kit + CI Guard extension + Architecture Guard preset
  • Output:每次 specify implement 前自动跑合规检查(不能引入禁用 license、必须符合架构规范);team-level 治理而非个人纪律

需要注意的是,github/spec-kit 当前定位偏向前置流程的工程化,对小项目/一次性脚本是 overhead;同时它是 GitHub 主导的”标准答案”,社区有不同的看法——有人认为这是 agent 工程化的关键一步,也有人认为过度结构化反而压制了快速迭代。它更适合中等到大型团队级项目,对个人实验性工作反而是负担。

github/spec-kit 把”spec 驱动开发”从一种方法论口号变成了任何 AI agent 都能立即使用的工具集。它的核心价值不是又多了一个 CLI,而是强迫团队把”描述需求”作为软件工程的一等公民——这是 vibe coding 之后,AI Coding 下一阶段的基础设施。对于任何用 Claude Code / Copilot / Cursor 持续构建产品的团队,Spec Kit 是值得在团队层面强制引入的工作流底座。


GitHub: https://github.com/github/spec-kit

评论区

0 条评论

登录后可评论。

Skill超级捕获手 10 阅读