Skip to content

Commit d11eb9c

Browse files
authored
docs(workflows): sync the reference copy with the shipped workflow (#4424)
docs/reference/workflows.md introduces its YAML block as the workflow that ships with Spec Kit, so a reader is entitled to treat it as the real definition. It had drifted on four points: version 1.0.0 -> 1.0.1 speckit_version >=0.7.2 -> >=0.8.5 integrations.any copilot, claude, gemini -> also alquimia, opencode integration default "copilot" -> default "auto" The last is the most user-visible: the guide stated the default integration was copilot, when it is auto, resolved from the project's initialized integration. Someone reading the guide to learn what they get by default was being told the wrong thing. Adds a guard so this cannot drift again. It compares parsed YAML rather than text, so the guide stays free to format lists however reads best and only the content has to agree. Verified it fails against the pre-sync copy, reporting all four differences, and passes after. Follow-up to #4384 / #4398, at the maintainer's suggestion.
1 parent af8f5a4 commit d11eb9c

2 files changed

Lines changed: 39 additions & 8 deletions

File tree

docs/reference/workflows.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,19 @@ schema_version: "1.0"
431431
workflow:
432432
id: "speckit"
433433
name: "Full SDD Cycle"
434-
version: "1.0.0"
434+
version: "1.0.1"
435435
author: "GitHub"
436436
description: "Runs specify → plan → tasks → implement with review gates"
437437
438438
requires:
439-
speckit_version: ">=0.7.2"
439+
speckit_version: ">=0.8.5"
440440
integrations:
441-
any: ["copilot", "claude", "gemini"]
441+
any:
442+
- "alquimia"
443+
- "claude"
444+
- "copilot"
445+
- "gemini"
446+
- "opencode"
442447
443448
inputs:
444449
spec:
@@ -447,8 +452,8 @@ inputs:
447452
prompt: "Describe what you want to build"
448453
integration:
449454
type: string
450-
default: "copilot"
451-
prompt: "Integration to use (e.g. claude, copilot, gemini)"
455+
default: "auto"
456+
prompt: "Integration to use (e.g. claude, copilot, gemini; 'auto' uses the project's initialized integration)"
452457
453458
steps:
454459
- id: specify

tests/workflows/test_bundled_speckit_workflow.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@
88

99
from specify_cli.workflows.engine import WorkflowDefinition, validate_workflow
1010

11-
BUNDLED = (
12-
Path(__file__).resolve().parents[2] / "workflows" / "speckit" / "workflow.yml"
13-
)
11+
REPO_ROOT = Path(__file__).resolve().parents[2]
12+
BUNDLED = REPO_ROOT / "workflows" / "speckit" / "workflow.yml"
13+
REFERENCE_DOC = REPO_ROOT / "docs" / "reference" / "workflows.md"
14+
DOC_INTRO = "Here is the built-in **Full SDD Cycle** workflow that ships with Spec Kit:"
15+
16+
17+
def _documented_workflow() -> object:
18+
"""Return the workflow YAML the reference guide claims is the shipped one."""
19+
text = REFERENCE_DOC.read_text(encoding="utf-8")
20+
intro = text.index(DOC_INTRO)
21+
start = text.index("```yaml", intro) + len("```yaml")
22+
end = text.index("```", start)
23+
return yaml.safe_load(text[start:end])
1424

1525

1626
def test_bundled_speckit_workflow_has_no_unused_scope_input() -> None:
@@ -30,3 +40,19 @@ def test_bundled_speckit_workflow_has_no_unused_scope_input() -> None:
3040
if args is None:
3141
continue
3242
assert "inputs.scope" not in str(args)
43+
44+
45+
def test_reference_doc_matches_the_shipped_workflow() -> None:
46+
"""The reference guide reproduces this workflow, so it must not drift from it.
47+
48+
``docs/reference/workflows.md`` introduces its YAML block as the workflow
49+
that ships with Spec Kit, so a reader is entitled to treat it as the real
50+
definition. It had drifted on four points -- a stale ``version`` and
51+
``speckit_version``, a short ``integrations.any`` list, and an
52+
``integration`` default of ``copilot`` where the shipped default is
53+
``auto`` -- which is exactly the sort of thing nothing else would catch.
54+
55+
The comparison is on parsed YAML, not text, so the guide stays free to
56+
format lists however reads best; only the content has to agree.
57+
"""
58+
assert _documented_workflow() == yaml.safe_load(BUNDLED.read_text(encoding="utf-8"))

0 commit comments

Comments
 (0)