superspec-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Superspec Init: Project Bootstrap

Superspec Init:项目初始化引导

Purpose

用途

Initialize OpenSpec in the current project for Superspec workflow and ensure the superspec-rpi schema is available.
在当前项目中为Superspec工作流初始化OpenSpec,并确保superspec-rpi schema可用。

Preconditions

前置条件

  • OpenSpec CLI must be installed in PATH
  • OpenSpec CLI必须已安装在PATH环境变量中

Workflow

工作流

1. Verify OpenSpec exists

1. 验证OpenSpec是否存在

Run
openspec --help
.
If command fails: tell user to install OpenSpec and re-run this skill. Do not proceed.
运行
openspec --help
如果命令执行失败:告知用户安装OpenSpec后重新运行此skill,请勿继续执行后续步骤。

2. Initialize OpenSpec

2. 初始化OpenSpec

Run
openspec init --tools none
.
IMPORTANT: If this command prompts interactively (e.g., cleanup questions), STOP immediately and ask the user what to do. Do NOT add
--force
automatically.
If init succeeds without prompts, proceed to step 3.
运行
openspec init --tools none
重要提示:如果该命令触发交互式提示(例如清理相关问题),请立即停止操作并询问用户如何处理。请勿自动添加
--force
参数。
如果初始化过程无提示且成功完成,继续执行步骤3。

3. Ensure superspec-rpi schema exists

3. 确保superspec-rpi schema存在

Verify
openspec/schemas/superspec-rpi/
directory exists.
If needed, create parent directories first:
  • mkdir -p openspec/schemas/superspec-rpi/templates
If missing: Create these files by copying the exact contents (verbatim; do not invent or paraphrase) from the canonical assets listed in "Required Files Reference" below:
  • openspec/schemas/superspec-rpi/schema.yaml
  • openspec/schemas/superspec-rpi/templates/proposal.md
  • openspec/schemas/superspec-rpi/templates/spec.md
  • openspec/schemas/superspec-rpi/templates/design.md
  • openspec/schemas/superspec-rpi/templates/tasks.md
If present: Validate instead of overwriting. Proceed to step 4.
验证
openspec/schemas/superspec-rpi/
目录是否存在。
若需要,先创建父目录:
  • mkdir -p openspec/schemas/superspec-rpi/templates
若目录缺失:从下方「所需文件参考」中列出的标准资源中复制精确内容(完全照搬,不可自行创作或改写)来创建以下文件:
  • openspec/schemas/superspec-rpi/schema.yaml
  • openspec/schemas/superspec-rpi/templates/proposal.md
  • openspec/schemas/superspec-rpi/templates/spec.md
  • openspec/schemas/superspec-rpi/templates/design.md
  • openspec/schemas/superspec-rpi/templates/tasks.md
若目录已存在:执行验证操作而非覆盖文件,继续执行步骤4。

4. Validate schema

4. 验证schema

Run
openspec schema validate superspec-rpi --json
.
  • If validation fails: show the JSON summary, prioritizing
    issues
    if present. If unsure how to summarize, show the full JSON output. Then ask user whether to edit schema files or re-run init.
  • If validation passes: proceed to confirmation.
运行
openspec schema validate superspec-rpi --json
  • 若验证失败:展示JSON汇总结果,优先显示
    issues
    内容。若不确定如何汇总,直接展示完整JSON输出。随后询问用户是编辑schema文件还是重新运行初始化操作。
  • 若验证通过:继续执行确认步骤。

5. Confirm success

5. 确认操作成功

Run
openspec schemas --json
and confirm
superspec-rpi
appears in output.
运行
openspec schemas --json
并确认输出中包含
superspec-rpi

6. Report result

6. 报告结果

Output exactly:
Superspec initialized successfully
Selected schema: superspec-rpi
Next: /superspec-research
输出以下内容:
Superspec initialized successfully
Selected schema: superspec-rpi
Next: /superspec-research

Required Files Reference

所需文件参考

Canonical file contents live under this skill's
assets/
directory. When you need to create missing schema/template files in the project, copy the contents verbatim from these asset files into the corresponding destination paths.
Rules:
  • Copy exactly. Do not invent or paraphrase.
  • Keep references one level deep (SKILL.md -> assets/*).
  • If the destination file already exists, validate it instead of overwriting.
Sources (copy-from) -> Destinations (copy-to):
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/schema.yaml
    ->
    openspec/schemas/superspec-rpi/schema.yaml
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/proposal.md
    ->
    openspec/schemas/superspec-rpi/templates/proposal.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/spec.md
    ->
    openspec/schemas/superspec-rpi/templates/spec.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/design.md
    ->
    openspec/schemas/superspec-rpi/templates/design.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/tasks.md
    ->
    openspec/schemas/superspec-rpi/templates/tasks.md
标准文件内容存储在本skill的
assets/
目录下。当需要在项目中创建缺失的schema或模板文件时,完全照搬这些资源文件的内容到对应的目标路径中。
规则
  • 完全复制,不可自行创作或改写内容。
  • 保持引用层级为一级(SKILL.md -> assets/*)。
  • 若目标文件已存在,执行验证操作而非覆盖。
来源(复制自)→ 目标路径(复制到)
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/schema.yaml
    ->
    openspec/schemas/superspec-rpi/schema.yaml
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/proposal.md
    ->
    openspec/schemas/superspec-rpi/templates/proposal.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/spec.md
    ->
    openspec/schemas/superspec-rpi/templates/spec.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/design.md
    ->
    openspec/schemas/superspec-rpi/templates/design.md
  • skills/superspec-init/assets/openspec/schemas/superspec-rpi/templates/tasks.md
    ->
    openspec/schemas/superspec-rpi/templates/tasks.md