openspec-boot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenSpec Boot — initialize the SDD workflow in a project

OpenSpec Boot — 在项目中初始化SDD工作流

What this skill does

该技能的作用

Bootstraps OpenSpec + the
superpowers-bridge
schema in the current project root, in one call. Concretely:
  1. Runs
    openspec init
    if no
    openspec/
    directory exists
  2. Installs the
    superpowers-bridge
    schema into
    <project>/openspec/schemas/superpowers-bridge/
    (project-local; user-global is also supported via
    --user
    but is rarely useful — see WARNING in the script)
  3. Runs
    openspec schema validate superpowers-bridge
    and
    openspec schema which superpowers-bridge
  4. Optionally sets
    superpowers-bridge
    as the project's default schema in
    openspec/config.yaml
    (so
    /opsx:new
    no longer needs
    --schema
    )
  5. Optionally appends the workflow-routing fragment to
    CLAUDE.md
    or
    AGENTS.md
  6. Reports
    obra/superpowers
    plugin / skill availability
The script is idempotent — safe to re-run any time, completed steps are skipped.
通过一次调用,在当前项目根目录中快速搭建OpenSpec +
superpowers-bridge
架构。具体包括:
  1. 若不存在
    openspec/
    目录,则运行
    openspec init
  2. superpowers-bridge
    架构安装到
    <project>/openspec/schemas/superpowers-bridge/
    (项目本地模式;也支持通过
    --user
    参数使用用户全局模式,但实用性极低——详见脚本中的警告)
  3. 运行
    openspec schema validate superpowers-bridge
    openspec schema which superpowers-bridge
  4. 可选择在
    openspec/config.yaml
    中将
    superpowers-bridge
    设置为项目默认架构(这样
    /opsx:new
    命令就无需再添加
    --schema
    参数)
  5. 可选择将工作流路由片段追加到
    CLAUDE.md
    AGENTS.md
    文件中
  6. 报告
    obra/superpowers
    插件/技能的可用情况
该脚本具有幂等性——可随时安全重新运行,已完成的步骤会被跳过。

When to use

使用场景

Trigger when the user says any of (English / Chinese):
  • "set up SDD for this project" / "configure spec-driven workflow"
  • "init openspec" / "initialize openspec" / "装一下 openspec"
  • "add the SDD workflow to this repo" / "给这个仓库加上 SDD 工作流"
  • "我要用 superpowers-bridge"
Or when you observe:
  • The project has no
    openspec/
    directory and the user is about to do design work
  • The user invokes
    /opsx:new
    but
    openspec schemas
    does not list
    superpowers-bridge
  • The user just cloned a fresh repo and wants the SDD toolchain ready
当用户说出以下任意语句(英文/中文)时触发:
  • "set up SDD for this project" / "配置规范驱动工作流"
  • "init openspec" / "initialize openspec" / "装一下 openspec"
  • "add the SDD workflow to this repo" / "给这个仓库加上 SDD 工作流"
  • "我要用 superpowers-bridge"
或是观察到以下情况时:
  • 项目没有
    openspec/
    目录,且用户即将开展设计工作
  • 用户调用
    /opsx:new
    命令,但
    openspec schemas
    列表中没有
    superpowers-bridge
  • 用户刚克隆了一个全新仓库,希望SDD工具链准备就绪

When NOT to use

禁用场景

  • Inside a subagent dispatched for a specific implementation task
  • Project already has
    openspec/schemas/superpowers-bridge/
    AND
    openspec/config.yaml
    with the desired default schema — setup is done, do not re-run unless the user asks
  • The user explicitly wants only
    spec-driven
    (OpenSpec built-in), not
    superpowers-bridge
    — in that case just run
    openspec init
    and stop
  • 在为特定实现任务调度的子Agent中
  • 项目已存在
    openspec/schemas/superpowers-bridge/
    openspec/config.yaml
    已设置好所需的默认架构——配置已完成,除非用户要求,否则不要重新运行
  • 用户明确只需要内置的
    spec-driven
    (而非
    superpowers-bridge
    )——这种情况下只需运行
    openspec init
    即可停止

How to invoke

调用方式

The skill bundles a script (
scripts/run.sh
) sitting next to this
SKILL.md
. Run it from the project root, locating the script via one of its install paths:
bash
cd <project-root>
SCRIPT=""
for c in ~/.claude/skills/openspec-boot/scripts/run.sh \
         ~/.agents/skills/openspec-boot/scripts/run.sh \
         ~/.codex/openspec-boot/skills/openspec-boot/scripts/run.sh \
         ~/.openspec-boot/skills/openspec-boot/scripts/run.sh; do
  [ -x "$c" ] && SCRIPT="$c" && break
done
[ -n "$SCRIPT" ] || { echo "openspec-boot script not found"; exit 1; }
bash "$SCRIPT" "$@"
If the user has the
openspec-boot
command installed in
PATH
(via
install.sh
or manual symlink), prefer the simpler form:
bash
cd <project-root>
openspec-boot "$@"
该技能捆绑了一个脚本(
scripts/run.sh
),与本
SKILL.md
文件同级。从项目根目录运行脚本,可通过以下安装路径之一找到它:
bash
cd <project-root>
SCRIPT=""
for c in ~/.claude/skills/openspec-boot/scripts/run.sh \
         ~/.agents/skills/openspec-boot/scripts/run.sh \
         ~/.codex/openspec-boot/skills/openspec-boot/scripts/run.sh \
         ~/.openspec-boot/skills/openspec-boot/scripts/run.sh; do
  [ -x "$c" ] && SCRIPT="$c" && break
done
[ -n "$SCRIPT" ] || { echo "openspec-boot script not found"; exit 1; }
bash "$SCRIPT" "$@"
如果用户已通过
install.sh
或手动链接将
openspec-boot
命令安装到
PATH
中,优先使用更简洁的形式:
bash
cd <project-root>
openspec-boot "$@"

Common flag combinations

常用参数组合

bash
undefined
bash
undefined

default: project-local schema, prompts on CLAUDE.md inject + default schema

默认:项目本地架构,对CLAUDE.md注入和默认架构进行提示

bash <run.sh>
bash <run.sh>

automate everything (CI, scripted setup)

自动化所有操作(CI、脚本化配置)

bash <run.sh> --inject --default-schema=superpowers-bridge
bash <run.sh> --inject --default-schema=superpowers-bridge

skip the CLAUDE.md/AGENTS.md fragment but still set default schema

跳过CLAUDE.md/AGENTS.md片段注入,但仍设置默认架构

bash <run.sh> --no-inject
bash <run.sh> --no-inject

leave openspec/config.yaml schema field alone

不修改openspec/config.yaml中的架构字段

bash <run.sh> --no-default
bash <run.sh> --no-default

explicitly pass --tools to
openspec init
(default: claude when non-interactive)

显式向
openspec init
传递--tools参数(默认:非交互式时为claude)

bash <run.sh> --tools=claude,codex
bash <run.sh> --tools=claude,codex

preview without doing anything

预览操作但不执行任何实际修改

bash <run.sh> --dry-run
bash <run.sh> --dry-run

refresh the cached schemas source (one-time per machine, not per project)

刷新缓存的架构源(每台机器一次,而非每个项目)

bash <run.sh> --update

Pass any of these to the script. The script prints `--help` for the full list.
bash <run.sh> --update

可将上述任意参数传递给脚本。运行脚本时添加 `--help` 可查看完整参数列表。

Preflight (script handles, agent should know)

预检查(脚本自动处理,Agent需知晓)

  • Requires
    openspec
    CLI on PATH (
    npm i -g @fission-ai/openspec
    if missing — tell the user)
  • Requires
    git
  • The script runs
    openspec init
    for the user when
    openspec/
    is absent
  • 需要在PATH中配置
    openspec
    CLI(若缺失,告知用户执行
    npm i -g @fission-ai/openspec
  • 需要安装
    git
  • openspec/
    目录不存在时,脚本会自动为用户运行
    openspec init

After bootstrap, in a project

项目完成初始化后

If the user accepted the default-schema prompt:
bash
/opsx:new my-feature                          # uses superpowers-bridge by default
/opsx:new my-feature --schema spec-driven     # opt-out for a lighter run
Otherwise:
bash
/opsx:new my-feature --schema superpowers-bridge
如果用户接受了默认架构提示:
bash
/opsx:new my-feature                          # 默认使用superpowers-bridge
/opsx:new my-feature --schema spec-driven     # 选择使用轻量版模式
若未设置默认架构:
bash
/opsx:new my-feature --schema superpowers-bridge

Failure modes

故障排查

  • openspec CLI not found
    → tell user to
    npm i -g @fission-ai/openspec
  • Schema validation fails
    → likely OpenSpec CLI version mismatch; suggest CLI upgrade
  • Fragment injection requested but CLAUDE.md / AGENTS.md absent
    → script silently skips; tell user they can re-run with
    --inject
    after creating one of those files
  • Superpowers not detected
    warning → not blocking; only matters if user plans to use
    superpowers-bridge
    (Full tier). For
    spec-driven
    (Lite) no action needed.
  • openspec CLI not found
    → 告知用户执行
    npm i -g @fission-ai/openspec
  • Schema validation fails
    → 可能是OpenSpec CLI版本不匹配;建议升级CLI
  • Fragment injection requested but CLAUDE.md / AGENTS.md absent
    → 脚本会静默跳过;告知用户创建上述任一文件后可重新运行并添加
    --inject
    参数
  • Superpowers not detected
    警告 → 不影响核心功能;仅当用户计划使用
    superpowers-bridge
    (完整版)时需要处理。若使用
    spec-driven
    (轻量版)则无需操作。

Related links

相关链接