superspec-research
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSuperspec Research
Superspec 研究
Rules (non-negotiable)
规则(不可协商)
- Drive OpenSpec via CLI only (NO OpenSpec slash commands; i.e., commands starting with or
/opsx)./openspec - Prefer JSON output for every OpenSpec call that supports it (use ).
--json- If a required command does not support (e.g.,
--json), run it withoutopenspec new changeand continue with the next JSON-capable command (typically--json).openspec status --change <change> --json
- If a required command does not support
- Keep changes scoped to and
proposalartifacts only.specs - If is not complete, run the brainstorming prelude before writing
proposal(seeproposal.md).skills/superspec-brainstorm/SKILL.md
- 仅通过CLI驱动OpenSpec(禁止使用OpenSpec斜杠命令;即,以或
/opsx开头的命令)。/openspec - 对于每个支持JSON输出的OpenSpec调用,优先使用JSON格式(添加参数)。
--json- 如果某个必需命令不支持(例如
--json),则不添加该参数运行命令,然后继续执行下一个支持JSON的命令(通常是openspec new change)。openspec status --change <change> --json
- 如果某个必需命令不支持
- 变更范围仅限和
proposal制品。specs - 如果未完成,在编写
proposal之前先执行头脑风暴前置步骤(详见proposal.md)。skills/superspec-brainstorm/SKILL.md
Change Selection
变更选择
- If the user provides a change name, use it as .
<change> - Else run:
- Ask the user to confirm/select a change name from the JSON output.
openspec list --json
- If there are no changes (or user wants a new one), ask for:
- change name (kebab-case)
- one-sentence description Then run:
openspec new change <change> --schema superspec-rpi --description "<description>"
Always print:
Selected change: <change>
- 如果用户提供了变更名称,将其作为使用。
<change> - 否则运行:
- 请用户从JSON输出中确认/选择一个变更名称。
openspec list --json
- 如果没有任何变更(或用户需要新建),请用户提供:
- 变更名称(短横线分隔格式,kebab-case)
- 一句话描述 然后运行:
openspec new change <change> --schema superspec-rpi --description "<description>"
始终打印:
Selected change: <change>
Artifact Loop (proposal + specs)
制品循环(提案 + 规格)
Repeat until BOTH and are complete.
proposalspecs重复执行,直到和均完成为止。
proposalspecs0. Inspect status
0. 检查状态
Run:
openspec status --change <change> --json
Parse the JSON to determine, for artifacts and :
proposalspecs- whether each is vs
readycomplete - whether is blocked by missing
specsproposal
If the JSON schema is unclear, show the JSON and ask the user what the status fields mean; do not guess.
运行:
openspec status --change <change> --json
解析JSON以确定和这两个制品的:
proposalspecs- 各自处于还是
ready状态complete - 是否因缺少
specs而被阻塞proposal
如果JSON架构不明确,显示JSON内容并询问用户状态字段的含义;请勿猜测。
1. Blocked behavior
1. 阻塞处理
If is blocked by missing , create first (even if looks ready).
specsproposalproposalspecs如果因缺少而被阻塞,先创建(即使显示为ready)。
specsproposalproposalspecs1.5 Brainstorming prelude (proposal inputs)
1.5 头脑风暴前置步骤(提案输入)
If is ready (and not complete), do a short clarification pass BEFORE writing files:
proposal- Follow as a subroutine.
skills/superspec-brainstorm/SKILL.md - Do NOT run during brainstorming.
openspec - Do NOT write or modify any files during brainstorming.
- Keep a "Brainstorming Notes" block as working notes.
Exit brainstorming when:
- You have concrete bullets for intent, background, in-scope, out-of-scope, constraints, affected specs, and success criteria.
- Affected Specs names are decided (kebab-case), because they drive .
specs/<kebab-name>/spec.md
Then proceed to create/update using OpenSpec instructions, using the notes to fill the template precisely.
proposal.mdIf you believe you already know all the answers, you still MUST produce the "Brainstorming Notes" block before writing .
proposal.md如果处于ready状态(但未完成),在编写文件前先进行简短的澄清环节:
proposal- 按照中的要求执行子流程。
skills/superspec-brainstorm/SKILL.md - 头脑风暴期间禁止运行命令。
openspec - 头脑风暴期间禁止编写或修改任何文件。
- 保留“头脑风暴笔记”块作为工作记录。
当满足以下条件时结束头脑风暴:
- 已明确意向、背景、范围内内容、范围外内容、约束条件、受影响规格和成功标准的具体要点。
- 已确定受影响规格的名称(短横线分隔格式,kebab-case),因为这些名称将决定的路径。
specs/<kebab-name>/spec.md
然后根据OpenSpec的说明创建/更新,使用笔记内容精准填充模板。
proposal.md即使你认为已掌握所有信息,在编写之前仍必须生成“头脑风暴笔记”块。
proposal.md2. Create/Update proposal
2. 创建/更新提案
If is ready (and not complete):
proposal- Run:
openspec instructions proposal --change <change> --json
- From the JSON, extract at minimum:
- (where to write)
outputPath - and/or
templatecontentinstruction
- Write the proposal content to the concrete (typically
outputPath).proposal.md
If is not a concrete file path (unexpected), STOP and show the full JSON.
outputPathProposal must be concise and must include a filled "Affected Specs" section (it drives specs file creation).
After writing, print:
Wrote proposal: <outputPath>
如果处于ready状态(但未完成):
proposal- 运行:
openspec instructions proposal --change <change> --json
- 从JSON中至少提取:
- (文件写入路径)
outputPath - 和/或
template内容instruction
- 将提案内容写入指定的具体路径(通常为)。
proposal.md
如果不是具体的文件路径(意外情况),停止操作并显示完整的JSON内容。
outputPath提案必须简洁,且必须包含已填写的“受影响规格”部分(该部分将驱动规格文件的创建)。
编写完成后,打印:
Wrote proposal: <outputPath>
3. Create/Update specs
3. 创建/更新规格
If is ready (and not complete):
specs- Run:
openspec instructions specs --change <change> --json
- Read dependencies from the JSON (e.g., ) and ensure proposal exists; if not, go create proposal.
requires - Treat patterns like
outputPathas a hint ONLY. Do not write wildcard paths.specs/**/spec.md - Determine concrete spec files from the proposal "Affected Specs".
Create one delta spec per affected capability (new/modified/removed), at:
specs/<kebab-name>/spec.md
Each delta spec MUST:
- Be a delta (changes only), structured into:
## ADDED Requirements## MODIFIED Requirements## REMOVED Requirements
- Use normative language per requirement (MUST/SHALL).
- For every ADDED/MODIFIED/REMOVED requirement, include Given/When/Then scenarios:
- at least one happy path (if applicable)
- at least one edge/failure case
- every MUST include a
#### Scenario:block with:##### Test Obligation(unit|integration|e2e),Type,Test File,Test Name,Verify Command, andExpected (RED). If any field is missing, ask the user; do not guess.Key Assertions
After writing, print:
Wrote specs: <path1>[, <path2> ...]
如果处于ready状态(但未完成):
specs- 运行:
openspec instructions specs --change <change> --json
- 从JSON中读取依赖关系(例如),确保提案已存在;如果不存在,先创建提案。
requires - 将模式(如
outputPath)仅视为提示信息。请勿写入通配符路径。specs/**/spec.md - 根据提案中的“受影响规格”确定具体的规格文件。
为每个受影响的能力(新增/修改/删除)创建一个增量规格文件,路径为:
specs/<kebab-name>/spec.md
每个增量规格必须:
- 仅包含变更内容(仅展示差异),结构分为:
## ADDED Requirements## MODIFIED Requirements## REMOVED Requirements
- 要求部分使用规范性语言(MUST/SHALL)。
- 对于每个新增/修改/删除的要求,包含Given/When/Then场景:
- 至少一个正常流程场景(如适用)
- 至少一个边缘/失败场景
- 每个必须包含一个
#### Scenario:块,内容包括:##### Test Obligation(unit|integration|e2e)、Type、Test File、Test Name、Verify Command和Expected (RED)。如果任何字段缺失,询问用户;请勿猜测。Key Assertions
编写完成后,打印:
Wrote specs: <path1>[, <path2> ...]
4. Re-check
4. 重新检查
After creating proposal or specs, re-run:
openspec status --change <change> --json
Stop the loop only when both artifacts show complete.
创建提案或规格后,重新运行:
openspec status --change <change> --json
仅当两个制品均显示为complete时,停止循环。
Minimal Output Contract
最小输出约定
- Always show .
Selected change: <change> - For each artifact you write, show exactly which artifact and the concrete path(s).
- On any error, show the exact command that failed (including ).
--json
- 始终显示。
Selected change: <change> - 对于每个编写的制品,明确显示制品类型和具体路径。
- 发生任何错误时,显示失败的具体命令(包括参数)。
--json
Common mistakes
常见错误
- Using OpenSpec slash commands (anything starting with or
/opsx) instead of the/openspecCLI.openspec - Treating wildcard (e.g.,
outputPath) as a real file path; always write concrete files likespecs/**/spec.md.specs/<kebab-name>/spec.md - Guessing JSON fields instead of showing the JSON and asking the user.
openspec
- 使用OpenSpec斜杠命令(任何以或
/opsx开头的命令)而非/openspecCLI。openspec - 将通配符(如
outputPath)视为真实文件路径;应始终写入具体文件,如specs/**/spec.md。specs/<kebab-name>/spec.md - 猜测JSON字段的含义,而非显示JSON内容并询问用户。
openspec