042-planning-openspec

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenSpec Change Planning from
*.plan.md

*.plan.md
生成OpenSpec变更计划

Guide the process of turning an implementation plan (
*.plan.md
) into an OpenSpec change workflow. This is an interactive SKILL. It verifies CLI availability, initializes OpenSpec when needed, and then creates or updates a change with proposal, design, tasks, and spec deltas.
What is covered in this Skill?
  • Input analysis from
    *.plan.md
    (scope, change-id candidate, affected capabilities)
  • Installation and availability checks for OpenSpec CLI
  • Recommended installation paths on macOS, Linux, and Windows using npm
  • OpenSpec project bootstrapping with
    openspec init
  • Existing-project workflow using
    openspec list
    ,
    openspec status
    ,
    openspec show
  • Validation and completion flow with
    openspec validate --all
    and
    openspec archive
  • Example-root workflow at
    examples/requirements-examples/problem1/requirements/openspec
指导将实施计划(
*.plan.md
)转换为OpenSpec变更工作流的过程。这是一个交互式SKILL。它会验证CLI可用性,在需要时初始化OpenSpec,然后创建或更新包含提案、设计、任务和规范差异的变更。
本Skill涵盖哪些内容?
  • *.plan.md
    进行输入分析(范围、候选变更ID、受影响的功能)
  • OpenSpec CLI的安装与可用性检查
  • 基于npm的macOS、Linux和Windows推荐安装路径
  • 使用
    openspec init
    初始化OpenSpec项目
  • 使用
    openspec list
    openspec status
    openspec show
    的现有项目工作流
  • 使用
    openspec validate --all
    openspec archive
    的验证与完成流程
  • 位于
    examples/requirements-examples/problem1/requirements/openspec
    的示例根工作流

Constraints

约束条件

Always execute OpenSpec commands from the parent directory that contains the
openspec/
folder. Do not invent requirements not present in the
*.plan.md
; convert plan intent into explicit OpenSpec change artifacts.
  • MUST: Start by reading and summarizing the provided
    *.plan.md
  • MUST: Check CLI availability with
    openspec --version
    before any OpenSpec operation
  • MUST: If OpenSpec is missing, provide macOS, Linux, and Windows install guidance via npm command
  • MUST: Offer
    openspec init
    when no OpenSpec project exists
  • MUST: When creating a new OpenSpec project, run plain
    openspec init
    only (do not use
    --tools ...
    options)
  • MUST: Use a stable change-id (for example:
    add-dark-mode
    ) for status/show/archive commands
  • MUST: Run
    openspec validate --all
    before archiving
  • MUST: When a feature/change is completed (all checklist tasks done), guide the user to archive it (for example:
    openspec archive us-001-god-analysis-api
    )
  • MUST: In
    tasks.md
    , generate a single OpenSpec checklist (
    - [ ]
    /
    - [x]
    ) only; do not add a second table-based task list
  • MUST: Explain whether the workflow creates a new change or updates an existing one
始终从包含
openspec/
文件夹的父目录执行OpenSpec命令。不要添加
*.plan.md
中未提及的需求;将计划意图转换为明确的OpenSpec变更工件。
  • 必须:首先读取并总结提供的
    *.plan.md
    文件
  • 必须:在执行任何OpenSpec操作前,使用
    openspec --version
    检查CLI可用性
  • 必须:如果未安装OpenSpec,提供基于npm命令的macOS、Linux和Windows安装指南
  • 必须:当不存在OpenSpec项目时,提供
    openspec init
    命令选项
  • 必须:创建新OpenSpec项目时,仅运行纯
    openspec init
    命令(不要使用
    --tools ...
    选项)
  • 必须:为status/show/archive命令使用稳定的变更ID(例如:
    add-dark-mode
  • 必须:归档前运行
    openspec validate --all
  • 必须:当功能/变更完成(所有清单任务已完成)时,引导用户归档(例如:
    openspec archive us-001-god-analysis-api
  • 必须:在
    tasks.md
    中,仅生成一个OpenSpec清单(
    - [ ]
    /
    - [x]
    );不要添加第二个基于表格的任务列表
  • 必须:说明工作流是创建新变更还是更新现有变更

When to use this skill

何时使用本Skill

  • Convert
    *.plan.md
    into OpenSpec
  • Add change proposal from plan
  • Update existing OpenSpec project
  • Initialize OpenSpec in requirements folder
  • Validate and archive OpenSpec change
  • *.plan.md
    转换为OpenSpec格式
  • 从计划中添加变更提案
  • 更新现有OpenSpec项目
  • 在需求文件夹中初始化OpenSpec
  • 验证并归档OpenSpec变更

Reference

参考

For detailed guidance, examples, and constraints, see references/042-planning-openspec.md.
如需详细指南、示例和约束条件,请查看references/042-planning-openspec.md