Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/community-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ jobs:
test -f .specify/presets/workflow-preset/.composed/speckit.analyze.md
test -f .specify/presets/workflow-preset/.composed/speckit.plan.md
test -f .specify/presets/workflow-preset/.composed/speckit.tasks.md
test ! -e .specify/presets/workflow-preset/commands/speckit.implement.md
test ! -e .specify/presets/workflow-preset/.composed/speckit.implement.md

test -f .claude/skills/speckit-preview-wireflow/SKILL.md
test -f .claude/skills/speckit-discovery-contract/SKILL.md
Expand Down
75 changes: 62 additions & 13 deletions .github/workflows/workflow-preset-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ permissions:
contents: read

on:
repository_dispatch:
types: ["workflow-preset-release"]
workflow_dispatch:
inputs:
preset_version:
Expand All @@ -14,14 +12,17 @@ on:
preset_download_url:
description: "Optional workflow preset release ZIP URL"
required: false
preset_manifest_url:
description: "Optional workflow preset release manifest URL"
required: false
require_bundled_version_match:
description: "Require bundled preset version to match preset_version"
required: false
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.event.client_payload.preset_version || github.event.client_payload.version || inputs.preset_version || 'unknown-version' }}-${{ github.run_id }}
group: ${{ github.workflow }}-${{ inputs.preset_version || 'unknown-version' }}-${{ github.run_id }}
cancel-in-progress: false

jobs:
Expand Down Expand Up @@ -50,8 +51,9 @@ jobs:
- name: Resolve workflow preset release
id: release
env:
EVENT_PRESET_VERSION: ${{ github.event.client_payload.preset_version || github.event.client_payload.version || inputs.preset_version }}
EVENT_PRESET_DOWNLOAD_URL: ${{ github.event.client_payload.preset_download_url || github.event.client_payload.download_url || inputs.preset_download_url }}
EVENT_PRESET_VERSION: ${{ inputs.preset_version }}
EVENT_PRESET_DOWNLOAD_URL: ${{ inputs.preset_download_url }}
EVENT_PRESET_MANIFEST_URL: ${{ inputs.preset_manifest_url }}
run: |
set -euo pipefail
write_github_output() {
Expand All @@ -72,7 +74,7 @@ jobs:

preset_version="${EVENT_PRESET_VERSION}"
if [ -z "$preset_version" ]; then
echo "preset_version is required from repository_dispatch payload or workflow_dispatch input" >&2
echo "preset_version is required from workflow_dispatch input" >&2
exit 1
fi
if ! printf '%s\n' "$preset_version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
Expand All @@ -84,20 +86,65 @@ jobs:
if [ -z "$preset_download_url" ]; then
preset_download_url="https://github.com/bigsmartben/spec-kit-workflow-preset/releases/download/v${preset_version}/spec-kit-workflow-preset-v${preset_version}.zip"
fi
preset_manifest_url="${EVENT_PRESET_MANIFEST_URL}"
if [ -z "$preset_manifest_url" ]; then
preset_manifest_url="https://github.com/bigsmartben/spec-kit-workflow-preset/releases/download/v${preset_version}/spec-kit-workflow-preset-v${preset_version}.manifest.json"
fi

write_github_output "version" "$preset_version"
write_github_output "download_url" "$preset_download_url"
write_github_output "manifest_url" "$preset_manifest_url"

- name: Install and verify external workflow preset
env:
PRESET_VERSION: ${{ steps.release.outputs.version }}
PRESET_DOWNLOAD_URL: ${{ steps.release.outputs.download_url }}
PRESET_MANIFEST_URL: ${{ steps.release.outputs.manifest_url }}
run: |
set -euo pipefail
project_dir="$(mktemp -d)"
cd "$project_dir"
release_dir="$(mktemp -d)"
curl --fail --location --silent --show-error "$PRESET_DOWNLOAD_URL" \
--output "$release_dir/workflow-preset.zip"
curl --fail --location --silent --show-error "$PRESET_MANIFEST_URL" \
--output "$release_dir/workflow-preset.manifest.json"
/tmp/specify-workflow-preset-venv/bin/python - "$release_dir" <<'PY'
import hashlib
import json
import sys
import zipfile
from pathlib import Path

release_dir = Path(sys.argv[1])
zip_path = release_dir / "workflow-preset.zip"
release_manifest = json.loads(
(release_dir / "workflow-preset.manifest.json").read_text(
encoding="utf-8"
)
)
assert (
hashlib.sha256(zip_path.read_bytes()).hexdigest()
== release_manifest["artifact"]["sha256"]
)
with zipfile.ZipFile(zip_path) as archive:
actual = {
name: hashlib.sha256(archive.read(name)).hexdigest()
for name in archive.namelist()
}
expected = {
entry["path"]: entry["sha256"]
for entry in release_manifest["files"]
}
assert actual == expected
PY

bundled_project="$(mktemp -d)"
cd "$bundled_project"
/tmp/specify-workflow-preset-venv/bin/specify init --here --ai claude --script sh --ignore-agent-tools

external_project="$(mktemp -d)"
cd "$external_project"
/tmp/specify-workflow-preset-venv/bin/specify init --here --ai claude --script sh --ignore-agent-tools
core_implement_sha="$(sha256sum .claude/skills/speckit-implement/SKILL.md | awk '{print $1}')"
/tmp/specify-workflow-preset-venv/bin/specify preset remove workflow-preset
/tmp/specify-workflow-preset-venv/bin/specify preset add --from "$PRESET_DOWNLOAD_URL"

Expand All @@ -121,15 +168,17 @@ jobs:
test -f .specify/presets/workflow-preset/commands/speckit.constitution.md
test -f .specify/presets/workflow-preset/commands/speckit.plan.md
test -f .specify/presets/workflow-preset/commands/speckit.tasks.md
test -f .specify/presets/workflow-preset/commands/speckit.implement.md
test ! -e .specify/presets/workflow-preset/commands/speckit.implement.md

test -f .claude/skills/speckit-constitution/SKILL.md
test -f .claude/skills/speckit-plan/SKILL.md
test -f .claude/skills/speckit-tasks/SKILL.md
test -f .claude/skills/speckit-implement/SKILL.md
grep -F "Change Scope Granularity" .claude/skills/speckit-constitution/SKILL.md
grep -F "## Pre-Execution Checks" .claude/skills/speckit-implement/SKILL.md
grep -F "mark the task off as [X] in the tasks file" .claude/skills/speckit-implement/SKILL.md
test "${core_implement_sha}" = "$(sha256sum .claude/skills/speckit-implement/SKILL.md | awk '{print $1}')"
diff -ru \
"$bundled_project/.specify/presets/workflow-preset" \
"$external_project/.specify/presets/workflow-preset"

bundled-regression:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -159,8 +208,8 @@ jobs:

- name: Check bundled workflow preset version
env:
EVENT_PRESET_VERSION: ${{ github.event.client_payload.preset_version || github.event.client_payload.version || inputs.preset_version }}
REQUIRE_BUNDLED_VERSION_MATCH: ${{ github.event.client_payload.require_bundled_version_match || inputs.require_bundled_version_match || 'false' }}
EVENT_PRESET_VERSION: ${{ inputs.preset_version }}
REQUIRE_BUNDLED_VERSION_MATCH: ${{ inputs.require_bundled_version_match || 'false' }}
run: |
set -euo pipefail
if [ "$REQUIRE_BUNDLED_VERSION_MATCH" != "true" ]; then
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ specify init my-project --integration codex --ignore-agent-tools
| 默认扩展 | `intake` | `extensions/intake` | 把 PRD、设计稿、Figma、最终静态 HTML 交付、测试用例等来源归一化为 SDD 可消费的证据包。 |
| 默认扩展 | `preview` | `extensions/preview` | 从规格和计划生成低、中、高保真 Markdown 或自包含 HTML 预览。 |
| 默认扩展 | `repository-governance` | `extensions/repository-governance` | 生成仓库治理 SSOT,帮助 agent 明确目录责任、读取顺序和事实证据。 |
| 默认预设 | `workflow-preset` | `presets/workflow-preset` | 由 Constitution 阶段托管单文件项目架构,并强化 BDD、NFR、UIF、设计产物、任务验证策略和 implement handoff 编排。 |
| 默认预设 | `workflow-preset` | `presets/workflow-preset` | 从 Specify 引入 UI/UX 需求,从 Plan 引入 BDD、集成与 E2E 测试设计,由 Tasks 映射为执行清单,最终交给标准 Core Implement。 |

默认扩展列表在 `src/specify_cli/commands/init.py` 的 `DEFAULT_BUNDLED_EXTENSIONS` 中维护。默认预设列表在同文件的 `DEFAULT_BUNDLED_PRESETS` 中维护。

Expand Down Expand Up @@ -238,7 +238,7 @@ specs/<feature>/preview/wireflow.html

### `workflow-preset`

`workflow-preset` 是这个本地分发版的核心增强预设。它包装或替换核心命令,让规格驱动流程更适合复杂功能和多 agent 实现
`workflow-preset` 是这个本地分发版的核心增强预设。它包装规格、检查、规划和任务阶段;实现阶段始终使用当前 Spec Kit core 命令

它会增强这些命令:

Expand All @@ -250,16 +250,15 @@ specs/<feature>/preview/wireflow.html
/speckit.analyze
/speckit.plan
/speckit.tasks
/speckit.implement
```

主要增强:

- `/speckit.checklist` 增加 BDD、NFR、视觉保真 readiness gate。
- `/speckit.constitution` 增加 Change Scope Granularity 治理。
- `/speckit.plan` 增加 Phase 0 行为投影、BDD/UIF/data fixture intent 和可选设计产物。
- `/speckit.tasks` 从行为契约、接口契约、`research.md`、`quickstart.md` 派生验证策略
- `/speckit.implement` 使用上游标准单会话流程执行 `tasks.md`,在每个阶段验证并标记完成任务
- `/speckit.tasks` 从行为契约、接口契约、`research.md`、`quickstart.md` 映射实现、验证、集成/E2E 和最终 Code Review 清单
- `/speckit.implement` 不由 preset 复制或覆盖;当前 core 命令按顺序执行 `tasks.md`,其中 Final Code Review 是最后的强制阶段

典型产物:

Expand Down
2 changes: 1 addition & 1 deletion docs/community/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ The following community-contributed presets customize how Spec Kit behaves — o
| Spec2Cloud | Spec-driven workflow tuned for shipping to Azure: spec → plan → tasks → implement → deploy | 5 templates, 8 commands | — | [spec2cloud](https://github.com/Azure-Samples/Spec2Cloud) |
| Table of Contents Navigation | Adds a navigable Table of Contents to generated spec.md, plan.md, and tasks.md documents | 3 templates, 3 commands | — | [spec-kit-preset-toc-navigation](https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation) |
| VS Code Ask Questions | Enhances the clarify command to use `vscode/askQuestions` for batched interactive questioning. | 1 command | — | [spec-kit-presets](https://github.com/fdcastel/spec-kit-presets) |
| Workflow Preset | Behavior-first specification, design-aware planning, and scoped change governance — adds requirement-phase behavior drafts, formal BDD/UIF/behavior contracts, and optional design artifacts while keeping the standard implementation workflow | 20 templates, 8 commands | — | [spec-kit-workflow-preset](https://github.com/bigsmartben/spec-kit-workflow-preset) |
| Workflow Preset | UI/UX-aware specification, behavior-first planning, integration/E2E test design, and task-to-execution mapping with mandatory final Code Review while keeping the standard core implementation workflow | 24 templates, 7 commands | — | [spec-kit-workflow-preset](https://github.com/bigsmartben/spec-kit-workflow-preset) |

To build and publish your own preset, see the [Presets Publishing Guide](https://github.com/bigsmartben/spec-kit/blob/main/presets/PUBLISHING.md).
2 changes: 1 addition & 1 deletion docs/preset-extension-coding-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ Preset/Extension issue 只有满足以下条件才可视为完成:

- `extensions/arch/`:Command、Template、Schema 和 Validator 分离。
- `extensions/intake/`:Schema、语义 Contract、Readiness Validator 权威清晰。
- `presets/workflow-preset/`:阶段所有权、结构化契约和多 agent handoff 边界
- `presets/workflow-preset/`:阶段所有权、结构化行为契约,以及 Tasks 与标准 Core Implement 的边界
- `src/specify_cli/integrations/`:平台投影与功能提示词分离。
- `src/specify_cli/agents.py`:Extension/Preset 共用的 command registrar。

Expand Down
15 changes: 8 additions & 7 deletions presets/catalog.community.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,11 @@
"workflow-preset": {
"name": "Workflow Preset",
"id": "workflow-preset",
"version": "2.0.0",
"description": "Constitution-managed architecture, behavior-first specification, design artifacts, and scoped change governance",
"version": "3.0.0",
"description": "Constitution-managed architecture, behavior-first specification, design artifacts, and execution-ready task mapping",
"author": "bigsmartben",
"repository": "https://github.com/bigsmartben/spec-kit-workflow-preset",
"download_url": "https://github.com/bigsmartben/spec-kit-workflow-preset/releases/download/v2.0.0/spec-kit-workflow-preset-v2.0.0.zip",
"download_url": "https://github.com/bigsmartben/spec-kit-workflow-preset/releases/download/v3.0.0/spec-kit-workflow-preset-v3.0.0.zip",
"homepage": "https://github.com/bigsmartben/spec-kit-workflow-preset",
"documentation": "https://github.com/bigsmartben/spec-kit-workflow-preset/blob/main/README.md",
"license": "MIT",
Expand All @@ -683,19 +683,20 @@
},
"provides": {
"templates": 24,
"commands": 8
"commands": 7
},
"tags": [
"architecture",
"constitution",
"behavior",
"bdd",
"planning",
"implementation",
"handoff"
"implementation"
],
"created_at": "2026-05-27T00:00:00Z",
"updated_at": "2026-06-23T00:00:00Z"
"updated_at": "2026-07-26T00:00:00Z",
"source_commit": "c35c96cec18c280445ea4f9f73c929e5b61f8393",
"sha256": "3924817ded5c59649ea3ef685cd1a4572363f95e9379becd0eafe1d3757ee852"
}
}
}
13 changes: 7 additions & 6 deletions presets/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"workflow-preset": {
"name": "Workflow Preset",
"id": "workflow-preset",
"version": "2.0.0",
"description": "Constitution-managed architecture, behavior-first specification, design artifacts, and scoped change governance",
"version": "3.0.0",
"description": "Constitution-managed architecture, behavior-first specification, design artifacts, and execution-ready task mapping",
"author": "bigsmartben",
"repository": "https://github.com/bigsmartben/spec-kit-workflow-preset",
"license": "MIT",
Expand All @@ -39,7 +39,7 @@
"speckit_version": ">=0.12.7.dev0"
},
"provides": {
"commands": 8,
"commands": 7,
"templates": 24
},
"tags": [
Expand All @@ -48,9 +48,10 @@
"behavior",
"bdd",
"planning",
"implementation",
"handoff"
]
"implementation"
],
"source_commit": "c35c96cec18c280445ea4f9f73c929e5b61f8393",
"sha256": "3924817ded5c59649ea3ef685cd1a4572363f95e9379becd0eafe1d3757ee852"
}
}
}
Loading