specify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Goal

目标

Synthesize the current conversation context, along with your understanding of the project, into a clear and concise specification document that can guide coding agents in implementing and delivering the feature.
综合当前对话上下文以及你对项目的理解,形成一份清晰、简洁的规格文档,用于指导 coding Agent 实施并交付该功能。

Input

输入

User must specify a directory where the specification file will be written. If not specified, stop and ask the user before proceeding.
用户必须指定规格文件写入的目录。如果未指定,应停止操作并先询问用户。

Permissions

权限

You are in RESTRICTED EDIT MODE. You are not allowed to modify any files in the codebase except the
<feature-name-slug>.spec.md
you need to create or unless the user explicitly instruct you otherwise.
你处于 受限编辑模式(RESTRICTED EDIT MODE)。除需要创建的
<feature-name-slug>.spec.md
外,不允许修改代码库中的任何文件,除非用户明确指示你这样做。

Workflow

工作流

  1. Read fully SKILL_ROOT/references/spec-template.md to understand the expected structure and content of the specification document.
  2. Use all the information in the current conversation context to understand the feature. Extract the agreed outcomes, scope, rules, assumptions and unresolved questions. Follow explicit corrections and exclude rejected or superseded proposals.
  3. Explore the codebase as needed to understand the current state of relevant area(s) that the new feature will affect. Direct exploration toward the axis of change imposed by the conversation. Identify any:
  • Relevant bounded contexts and domain language.
  • Established implementation conventions relevant to the feature.
  • Relevant architectural decisions and constraints documented in ADRs or other project documentation.
  • Existing contracts, domain invariants, integration boundaries, and compatibility requirements that the feature must respect.
  1. Validate the finished spec against that extracted context, checking both omissions and unsupported addition:
    • Check that stories and acceptance criteria describe consistently and fully the target behavior.
    • Check that acceptance criteria codes are unique across all stories in the spec, following the template's numbering rules, and any references identify the intended criteria.
    • Check that the spec does not introduces unrequested scope.
    • Resolve inconsistencies using the conversation and codebase. Record unresolved material conflicts under "Clarifications" needed rather than choosing silently.
Important: Follow the instructions in the template closely. Pay special attention to any guidelines, make sure to include all required sections and use the appropriate formatting.
  1. 完整阅读
    SKILL_ROOT/references/spec-template.md
    ,了解规格文档的预期结构和内容。
  2. 使用当前对话上下文中的全部信息理解该功能。提取已达成共识的结果、范围、规则、假设和未解决的问题。遵循明确的更正,并排除被否决或已被取代的提案。
  3. 根据需要探索代码库,了解新功能所影响领域的当前状态。探索应围绕对话所确定的变更主线展开。识别以下内容:
  • 相关的 bounded contexts 和 domain language。
  • 与该功能相关的既有实现约定。
  • ADR 或其他项目文档中记录的相关架构决策和约束。
  • 该功能必须遵守的现有 contracts、domain invariants、integration boundaries 和兼容性要求。
  1. 对照提取出的上下文验证最终规格文档,同时检查遗漏和无依据的新增内容:
  • 检查 stories 和 acceptance criteria 是否一致且完整地描述了目标行为。
  • 检查规格文档中所有 stories 的 acceptance criteria codes 是否按照模板的编号规则保持唯一,并确认任何引用都能准确标识目标标准。
  • 检查规格文档是否引入了未被请求的范围。
  • 使用对话和代码库解决不一致之处。对于仍未解决的实质性冲突,应将其记录在“Clarifications”下,而不是擅自作出选择。
重要提示: 严格遵循模板中的说明。特别注意其中的任何指导原则,确保包含所有必需章节并使用适当格式。

Output

输出

Write the specification document under the location specified by the user, as a file named
<feature-name-slug>.spec.md
.
Follow the structure and content guidelines provided in
references/spec-template.md
.
在用户指定的位置写入规格文档,文件名为
<feature-name-slug>.spec.md
。
遵循
references/spec-template.md
中提供的结构和内容指导。

Guidelines

指南

  • Always use clear, plain and concise language.
  • Align the document with pre-existing bounded contexts and domain language.
  • Focus on user needs, how these are addressed and the value provided.
  • Follow the project's established domain language vocabulary throughout the specification.
  • 始终使用清晰、直白且简洁的语言。
  • 使文档与既有的 bounded contexts 和 domain language 保持一致。
  • 聚焦用户需求、满足这些需求的方式以及所提供的价值。
  • 在整个规格文档中遵循项目既定的 domain language 词汇。