to-spec

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
This skill takes the current conversation context and codebase understanding and produces a spec (you may know this document as a PRD). Do NOT interview the user — just synthesize what you already know.
The issue tracker and triage label vocabulary should have been provided to you — run
$setup-matt-pocock-skills
if not.
该Skill会利用当前对话上下文以及对代码库的理解生成一份规格文档(你可能更熟悉它的另一个名称:PRD)。请勿向用户提问——仅整合你已了解的信息即可。
问题追踪器和分类标签词汇表应该已提供给你——如果未提供,请运行
$setup-matt-pocock-skills

Process

流程

  1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.
  2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
Check with the user that these seams match their expectations.
  1. Write the spec using the template below, then publish it to the project issue tracker. Apply the
    ready-for-agent
    triage label - no need for additional triage.
<spec-template>
  1. 如果你还未了解代码库的当前状态,请浏览仓库。在整个规格文档中使用项目领域术语表中的词汇,并遵守你所涉及领域的所有ADRs。
  2. 勾勒出你将用于测试该功能的衔接点。优先使用现有衔接点而非新增衔接点。尽可能使用最高层级的衔接点。如果需要新增衔接点,请尽可能在最高层级提出。代码库中的衔接点越少越好——理想数量为一个。 请与用户确认这些衔接点符合他们的预期。
  3. 使用下方的模板撰写规格文档,然后发布到项目问题追踪器。添加
    ready-for-agent
    分类标签——无需额外分类。
<spec-template>

Problem Statement

问题陈述

The problem that the user is facing, from the user's perspective.
从用户视角出发,描述用户面临的问题。

Solution

解决方案

The solution to the problem, from the user's perspective.
从用户视角出发,描述解决该问题的方案。

User Stories

用户故事

A LONG, numbered list of user stories. Each user story should be in the format of:
  1. As an <actor>, I want a <feature>, so that <benefit>
<user-story-example> 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending </user-story-example>
This list of user stories should be extremely extensive and cover all aspects of the feature.
一份详尽的编号用户故事列表。每个用户故事需遵循以下格式:
  1. 作为<角色>,我希望拥有<功能>,以便<获益>
<user-story-example> 1. 作为移动银行客户,我希望查看账户余额,以便能更明智地做出消费决策 </user-story-example>
这份用户故事列表应极为详尽,覆盖该功能的所有方面。

Implementation Decisions

实现决策

A list of implementation decisions that were made. This can include:
  • The modules that will be built/modified
  • The interfaces of those modules that will be modified
  • Technical clarifications from the developer
  • Architectural decisions
  • Schema changes
  • API contracts
  • Specific interactions
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
一份已做出的实现决策列表,可包含:
  • 将要构建/修改的模块
  • 将要修改的模块接口
  • 来自开发者的技术说明
  • 架构决策
  • Schema变更
  • API契约
  • 特定交互逻辑
请勿包含具体文件路径或代码片段。这些内容可能会很快过时。
例外情况:如果原型生成的片段比文字描述能更精准地体现决策(状态机、reducer、Schema、类型结构),可将其嵌入相关决策中,并简要说明该片段来自原型。仅保留与决策相关的核心部分——无需完整可运行演示,只保留关键内容。

Testing Decisions

测试决策

A list of testing decisions that were made. Include:
  • A description of what makes a good test (only test external behavior, not implementation details)
  • Which modules will be tested
  • Prior art for the tests (i.e. similar types of tests in the codebase)
一份已做出的测试决策列表,需包含:
  • 优质测试的定义(仅测试外部行为,而非实现细节)
  • 将要测试的模块
  • 测试的参考案例(即代码库中类似类型的测试)

Out of Scope

范围外内容

A description of the things that are out of scope for this spec.
描述本规格文档未涵盖的内容。

Further Notes

补充说明

Any further notes about the feature.
</spec-template>
关于该功能的其他补充说明。
</spec-template>