Repository navigation
OpenSpec Practise v1.16.0
基于 OpenSpec v1.16.0 的实践更新(v1.14.3 → v1.16.0,覆盖 v1.15.0 + v1.16.0)。
CLI & Skills
- CLI 升级至 1.16.0,首次用
openspec update --dry-run --json预览(6 个 skill 文件、0 失败),再--force刷新 - BREAKING:npm 安装要求 Node ≥ 22.12.0(Node 20 已 EOL);独立二进制无 Node 要求;示例代码仍为 Node v20+
- 新校验:Scenario 缺 WHEN/GIVEN 或 THEN 步骤时告警,
--strict失败;config.yaml无效时validate退出码 1
完整工作流实践:scenario-step-format-migration
- 步骤检查升级首跑即暴露历史格式欠账:6/7 主 spec 的裸关键字 Gherkin(
When ...)不被识别,--strict下 6/7 失败;product-query(列表格式)是唯一范本 - 用计数保持脚本迁移 6 个主 spec、48 个场景、195 个步骤行到
- **GIVEN**/**WHEN**/**THEN**/**AND**列表格式;git diff复核确认场景名与步骤文本逐字不变 - change 以
skip_specs: true留档并归档(纯格式、零行为变化);config.yaml规则同步明确列表格式 - 结果:
validate --specs --strict1/7 → 7/7,findings 清零,归档 7/7,Node 18/18 + Python 7/7 全绿 - 产物:
openspec/changes/archive/2026-11-02-scenario-step-format-migration/ - 复盘文章:
docs/openspec-v1.16.0-workflow-practice.md(中英双语)
OpenSpec Practise v1.16.0
Practice update based on OpenSpec v1.16.0 (v1.14.3 → v1.16.0, covering v1.15.0 + v1.16.0).
CLI & Skills
- CLI upgraded to 1.16.0; first use of
openspec update --dry-run --json(6 skill files, 0 failures) before--force - BREAKING: npm installs require Node ≥ 22.12.0 (Node 20 EOL); the standalone binary has no Node requirement; the examples keep their own v20+ floor
- New validation: scenarios missing a WHEN/GIVEN or THEN step now warn and fail under
--strict; an invalidconfig.yamlmakesvalidateexit 1
Full Workflow Practice: scenario-step-format-migration
- The step check exposed legacy formatting debt on the first run: 6/7 main specs written with bare Gherkin keywords (
When ...) were not recognized, failing 6/7 under--strict;product-query(list format) was the only passing exemplar - Migrated 6 main specs, 48 scenarios, and 195 step lines to the canonical
- **GIVEN**/**WHEN**/**THEN**/**AND**list format with a count-preserving script;git diffreview confirmed scenario names and step text verbatim - The change is documented with
skip_specs: trueand archived (pure format, zero behavior change); the config.yaml specs rule now names the list format - Results:
validate --specs --strict1/7 → 7/7, findings clean, archived 7/7, Node 18/18 + Python 7/7 green - Artifacts:
openspec/changes/archive/2026-11-02-scenario-step-format-migration/ - Retrospective:
docs/openspec-v1.16.0-workflow-practice.md(bilingual)