easysdd-feature-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

easysdd-feature-design

easysdd-feature-design

这一阶段的产出是一份方案文件
{slug}-design.md
,加上从中抽出的行动清单
{slug}-checklist.yaml
。这两份东西后面会被两个阶段消费——implement 照着推进、acceptance 照着核对,所以这里写错或写漏,下游就跟着错。
共享路径和命名约定看
easysdd/reference/shared-conventions.md
。本阶段一般 feature 目录已经由 brainstorm 创建好了;没有的话在这一步建。

The output of this phase is a design document
{slug}-design.md
, plus an action checklist
{slug}-checklist.yaml
extracted from it. These two files will be used in the next two phases — implement phase follows the checklist, acceptance phase verifies against it. So any mistakes or omissions here will lead to errors downstream.
See
easysdd/reference/shared-conventions.md
for shared paths and naming conventions. Generally, the feature directory has already been created by brainstorm; if not, create it in this step.

方案文件是给人扫的,不是给人读的

The design document is for skimming, not for reading word-for-word

整个 design 的写作风格都围绕这个原则。读者打开
{slug}-design.md
是想 5 分钟内抓到要点,需要细节时知道去哪查——不是要逐字精读。这条原则推出几条具体做法:
  1. 每节超过 1 屏就该砍或拆。一屏装不下意味着读者会失去定位感。
  2. 术语先锁死。所有新增术语在动笔前做一遍 grep,覆盖代码、架构中心目录、所有 feature 的方案文件。术语冲突的代价是后面别人查代码找错地方——预防的成本远低于事后理顺的成本。
  3. 示例优先于定义。接口行为先用具体示例(API 用输入→输出,组件用 Props→渲染 / Events 示例),复杂时再补正式类型。读者看到具体输入输出比看一段抽象描述更快建立模型。
  4. 推进按"功能可见度"走,不按代码文件顺序。先做最小闭环(一条端到端能跑通的路径),再叠细节。这样每一步都能独立验证,途中发现走偏也只损失一步。
  5. 新逻辑默认放新文件。新增的内聚逻辑单元默认建独立文件,而不是往已有文件追加。改动计划里每条都标"新建文件"或"追加到已有文件(理由)"。原因是文件越大越难分清职责,往老文件加东西会让后人查 git blame 时把不相关的改动也读一遍。
  6. 同一条信息只在最自然的位置出现一次。重复表述会让读者反复确认"这两条是不是同一件事",比缺一条还烦。
  7. 流程归流程,模板归模板。先按下文流程走完再按模板填内容,不要边写边切流程。

The entire writing style of the design revolves around this principle. Readers open
{slug}-design.md
to grasp the key points within 5 minutes, and know where to find details when needed — not to read every word carefully. This principle leads to several specific practices:
  1. Trim or split any section longer than one screen. If a section can't fit on one screen, readers will lose their sense of orientation.
  2. Lock down terms first. Run a grep for all new terms before writing, covering code, architecture directory, and design documents of all features. The cost of term conflicts is that others will look in the wrong place when checking code — the cost of prevention is far lower than sorting it out afterwards.
  3. Examples take precedence over definitions. Describe interface behavior with specific examples first (input→output for APIs, Props→rendering/Events examples for components), then supplement with formal types if complex. Readers build a mental model faster from specific input-output than abstract descriptions.
  4. Progress by "feature visibility" instead of code file order. Start with the minimal closed loop (an end-to-end working path), then add details. This way, each step can be verified independently, and only one step is lost if a deviation is found along the way.
  5. New logic goes into new files by default. Create independent files for new cohesive logic units by default, instead of appending to existing files. Mark each item in the change plan as "New file" or "Append to existing file (reason)". The reason is that larger files make it harder to distinguish responsibilities, and adding to old files forces future maintainers to read irrelevant changes when checking git blame.
  6. Each piece of information appears only once in its most natural position. Repetition makes readers repeatedly confirm "Are these two the same thing?", which is more annoying than missing one.
  7. Separate process from template. Complete the process below first, then fill in the template content — don't switch between writing and process.

起草时的两条判断纪律

Two judgment rules during drafting

写作风格之外还有两条更前置的纪律,决定了这份方案能不能真撑得起 implement / acceptance——不是看起来像方案、实际全是模糊承诺。
Beyond writing style, there are two more fundamental rules that determine whether this design can truly support implement/acceptance — not just look like a design but full of vague commitments.

1. 别替用户做决定,把不确定明着写出来

1. Don't make decisions for the user; explicitly state uncertainties

写方案时碰到"用户没说清的角落",默认动作是停下来问,不是自己挑一个填上去。具体落在几件事上:
  • 声明假设:每条不是用户原话讲过的判断(输入边界、错误处理、边角行为)都写成"假设:……",让用户能精确反驳。
  • 给选项不要自选:发现一个点有 2-3 种合理做法,先把候选都摆出来再讲自己的倾向,让用户在 review 时能换。
  • 顺手提一句更简的可能:用户给的方向看起来能用更轻的方式达到同样目标时,明着说"还有一种更简的做法是 ……,要不要先排除它"。别因为用户已经说了方向就闭嘴。
  • 看不懂就停下来:碰到自己也没把握理解对的需求,直接说"这一段我没把握",不要硬猜着写下去。
代价很具体:偷偷做的决定到了 implement 会变成"AI 自作主张引入的特殊逻辑",到了 acceptance 阶段对不上验收点。design 是把所有"以为大家都懂"的事翻到台面上的最后一道关。
When encountering "ambiguous areas not clarified by the user" while writing the design, the default action is to stop and ask, not to pick one and fill it in yourself. Specifically, this applies to several things:
  • State assumptions: Every judgment not explicitly stated by the user (input boundaries, error handling, edge cases) should be written as "Assumption: ...", allowing the user to refute precisely.
  • Present options instead of choosing: If there are 2-3 reasonable approaches for a point, list all candidates first, then explain your preference, so the user can switch during review.
  • Mention simpler alternatives: If the user's direction can achieve the same goal with a lighter approach, explicitly say "There's a simpler approach: ..., should we rule it out first?" Don't stay silent just because the user has given a direction.
  • Stop if you don't understand: If you're not sure you've understood the requirement correctly, directly say "I'm not sure about this section" instead of guessing and writing.
The cost is concrete: Decisions made secretly will become "special logic introduced by AI on its own" during implementation, and won't match acceptance criteria in the acceptance phase. Design is the final checkpoint to bring all "things we assume everyone understands" to the surface.

2. 目标和约束都写成可验证的

2. Write both goals and constraints in verifiable terms

design 的产出要被 implement 照着推进、被 acceptance 照着核对——所以方案里每一条目标和约束都得能独立验证:
  • 不写"让它能跑"这种弱标准。"完成 X 功能" / "处理好错误" / "用户体验顺畅"这类话本质上是把验证责任推回下游。改写成"输入 A 时返回 B"、"错误 X 时显示提示 Y"。
  • 每一步推进顺序都带退出信号。光写"实现 XX"不够,要写"完成后能通过 {具体测试 / 操作步骤}"。
  • "明确不做"也要可验证。"不做 XX"要具体到能被 grep 或测试反向核对,不能写成"不过度设计"这种空话。
退出条件里"每步可独立验证"、"测试设计按功能点组织"就是这条纪律落实下来的检查项——这两节写虚了,等于这条纪律没落地。

The output of the design will be followed during implementation and verified during acceptance — so every goal and constraint in the design must be independently verifiable:
  • Don't use weak standards like "Make it work". Phrases like "Complete feature X" / "Handle errors properly" / "Smooth user experience" essentially shift the verification responsibility downstream. Rewrite them as "Return B when input is A", "Show prompt Y when error X occurs".
  • Every step in the progress sequence has an exit signal. Just writing "Implement XX" is not enough; write "After completion, pass {specific test / operation steps}".
  • "Explicitly not doing" must also be verifiable. "Not doing XX" should be specific enough to be checked reversely via grep or tests, not empty phrases like "Avoid over-design".
The check items "Each step is independently verifiable" and "Test design is organized by feature points" in the exit conditions are the implementation of this rule — if these sections are written vaguely, this rule hasn't been implemented.

流程:什么时候做什么

Process: What to do when

1. 启动检查

1. Startup check

进入这一阶段先过这几条,没过别动笔:
  1. 是不是接续之前的工作——先 Glob
    easysdd/features/{feature}/{slug}-design.md
    ,看有没有同名方案文件:
    • 没有 → 跳到第 2 条
    • 有,但是空模板或只有 frontmatter → 当新建处理,跳到第 2 条
    • 有,
      status=draft
      且各节基本完整 → 上次写完了还没 review,直接跳到本流程"5. 整体 review"步骤
    • 有,部分节缺失 → 汇报"上次方案写到第 X 节,我补齐剩下的再统一给你 review",只补缺失的,不重写已完成的
    • 有,
      status=approved
      → 不要默默覆盖,问用户是接着改、还是另起一份新 slug
  2. 需求输入是否清晰——确认至少有用户目标、核心行为、成功标准、明确不做这四项。缺了就先补;用户自己也说不清就回退到 brainstorm。
  3. 读前置资料——动笔前必读
    AGENTS.md
    、项目架构总入口、架构索引、与需求相关的现有代码和子系统架构 doc。读这一步是为了让你写的方案和现有代码能接得上,不读直接动手大概率写出脱离实际的方案。
  4. 归档检索——值不值得搜、优先搜哪些目录,规则在
    easysdd/reference/shared-conventions.md
    第 5 节。本阶段至少考虑这两个目录:
    • 沉淀目录(统一搜一次,按需按
      doc_type
      过滤):
      • 一把搜:
        python easysdd/tools/search-yaml.py --dir easysdd/compound --query "{关键词}"
      • 只看决策:追加
        --filter doc_type=decision --filter status=active
      • 只看技巧:追加
        --filter doc_type=trick --filter status=active
      • 只看经验:追加
        --filter doc_type=learning
      • 只看探索:追加
        --filter doc_type=explore
    • 已有 feature 方案:
      python easysdd/tools/search-yaml.py --dir easysdd/features --filter doc_type=feature-design --query "{关键词}"
    命中后优先复用,并在方案文件里记下引用来源——这样后人看到这份方案能顺着引用一路追回去。
Go through these items before starting this phase; don't start writing if any are not met:
  1. Is this a continuation of previous work — First glob
    easysdd/features/{feature}/{slug}-design.md
    to see if there's a design document with the same name:
    • No → Jump to item 2
    • Yes, but it's an empty template or only has frontmatter → Treat as new creation, jump to item 2
    • Yes,
      status=draft
      and all sections are basically complete → Last time you finished writing but didn't get reviewed, directly jump to step "5. Overall review" in this process
    • Yes, some sections are missing → Report "The previous design was written up to section X, I'll complete the rest and send it to you for review uniformly", only fill in the missing sections, don't rewrite completed ones
    • Yes,
      status=approved
      → Don't overwrite silently; ask the user whether to continue modifying or create a new slug
  2. Is the requirement input clear — Confirm at least four items: user goals, core behavior, success criteria, and explicitly excluded scope. Fill in any missing items; if the user can't clarify, go back to brainstorm.
  3. Read prerequisite materials — Before writing, you must read
    AGENTS.md
    , the project architecture entry point, architecture index, existing code related to the requirement, and subsystem architecture docs. This step ensures your design connects with existing code; writing without reading will likely result in a design that's disconnected from reality.
  4. Archive search — Whether it's worth searching and which directories to prioritize are specified in section 5 of
    easysdd/reference/shared-conventions.md
    . At least consider these two directories in this phase:
    • Precipitation directory (search once uniformly, filter by
      doc_type
      as needed):
      • Full search:
        python easysdd/tools/search-yaml.py --dir easysdd/compound --query "{关键词}"
      • Only view decisions: Append
        --filter doc_type=decision --filter status=active
      • Only view tricks: Append
        --filter doc_type=trick --filter status=active
      • Only view learnings: Append
        --filter doc_type=learning
      • Only view explorations: Append
        --filter doc_type=explore
    • Existing feature designs:
      python easysdd/tools/search-yaml.py --dir easysdd/features --filter doc_type=feature-design --query "{关键词}"
    Prioritize reuse when hits are found, and record the reference source in the design document — this way, future maintainers can trace back through the references.

2. 想清楚这功能该放在哪儿

2. Figure out where this feature should fit

动笔写改动计划前,先想清楚一个更根本的问题:这次要加的东西,在项目整体结构里属于哪儿?
具体问几件事:
  • 这件事是某个现有模块本该承担的吗?是的话在那个模块里扩展,别在外面另起一份。
  • 这件事横跨多个模块——是不是该抽出一层公共的东西放在中间,还是让某一方主导、其他方依赖它?
  • 这件事和现有任何模块都不太像?那可能要新建一个独立模块 / 子系统——新模块放哪儿、对外暴露什么、跟别人怎么交互,得提前想清楚。
  • 已经有模块在做类似的事但名字不一样、你没注意到?grep 项目一下,别因为叫法不同就重复造轮子。
错的放置方式代价很具体:放进本不该承担这件事的模块,那个模块慢慢变成"什么都装的筐",职责越来越糊;每次都新建平行实现,几个版本的同一件事在项目里共存,后人维护时得猜用哪个。
结论写进方案文件第 1 节"决策与约束"——至少明确一句"本 feature 放在 {模块/层} 里,原因是 {简述}"。涉及新建模块或跨模块接口时,同步写进第 4 节"与项目级架构文档的关系",并提示要在架构总入口
DESIGN.md
里加指向。
AI 在这一步默认会翻的车是不思考就往眼前最顺手的文件里加——绕过这步直接进步骤 3 就会掉进去。
Before writing the change plan, first think about a more fundamental question: Where does the thing we're adding fit in the overall project structure?
Specifically, ask these questions:
  • Is this something an existing module should be responsible for? If yes, extend that module instead of creating a new one outside.
  • Does this span multiple modules — should we extract a common layer in the middle, or let one party lead and others depend on it?
  • Does this not fit any existing module? Then we may need to create a new independent module/subsystem — we must clarify in advance where to place the new module, what it exposes externally, and how it interacts with others.
  • Is there already a module doing similar things but with a different name that you didn't notice? Grep the project to avoid reinventing the wheel due to different naming.
The cost of wrong placement is concrete: Putting it in a module that shouldn't be responsible for it will make that module gradually become a "catch-all basket" with increasingly blurred responsibilities; creating parallel implementations every time will result in multiple versions of the same thing coexisting in the project, forcing future maintainers to guess which one to use.
Write the conclusion in section 1 "Decisions and Constraints" of the design document — at least explicitly state "This feature is placed in {module/layer} because {brief reason}". When involving new modules or cross-module interfaces, simultaneously write it in section 4 "Relationship with project-level architecture documents", and prompt to add a link in the architecture entry point
DESIGN.md
.
The default mistake AI makes in this step is adding to the most convenient file in front without thinking — skipping this step and going directly to step 3 will lead to this mistake.

3. 扫一眼要改的文件现在什么状况

3. Check the current state of the files to be modified

步骤 2 想清楚了放在哪个模块,动手写改动计划前再下沉一层,看这个文件(或类)现在的状态——能不能干净地接住新代码?
看几个维度:
  • 这个文件现在多长?承担了几件事?新加的东西是已有职责的延伸,还是第 N+1 件事?
  • 这个类有多少方法?新加的方法是同一个职责的自然扩展,还是把这个类推向"什么都能干"?
  • 涉及前端时还要看组件树层级是不是过深、状态归属是不是清晰(本地 state / props 传递 / 全局 store)。
按严重程度分流:
情况处理
状态健康,直接加正常推进,不用额外动作
该先收拾一下(把一个太长的文件拆成几个、把一个太重的函数抽出来)纳入第 3 节"实现提示"里推进顺序子节的第 1 步,范围锁死为"只搬不改行为",退出信号是"搬完后既有功能不变"
结构性问题(职责需要重划、模块需要拆合、接口需要重设计)在第 1 节记为前置依赖,建议拆成独立 feature 先解决;当前 feature 暂缓或标"等前置完成后再推进"
为什么要做这一步?硬塞功能进一个本来就长得不干净的文件,得到的是一个更长更不干净的文件,下一次改动就更难。提前把"该不该先收拾一下"放到台面上,让用户做决定,而不是 AI 偷偷在 PR 里夹带。
结论写进方案文件第 3 节"实现提示"里改动计划子节开头(具体格式见同目录
reference.md
)。"健康,直接加"的情况不用写——只在有动作时才记。
After figuring out which module to place it in step 2, dive deeper to check the current state of the file (or class) before writing the change plan — can it cleanly accept the new code?
Check several dimensions:
  • How long is this file now? How many responsibilities does it take on? Is the new content an extension of existing responsibilities, or the N+1th thing?
  • How many methods does this class have? Is the new method a natural extension of the same responsibility, or does it push the class towards "can do everything"?
  • For frontend-related work, also check if the component tree hierarchy is too deep and if state ownership is clear (local state / props passing / global store).
Handle based on severity:
SituationHandling
Healthy state, can add directlyProceed normally, no additional actions
Needs cleanup first (split an overly long file into several, extract an overly heavy function)Include as step 1 in the progress sequence subsection of section 3 "Implementation Tips", lock the scope to "Move only, no behavior changes", exit signal is "Existing functions remain unchanged after moving"
Structural issues (responsibility needs to be redefined, modules need to be split/merged, interfaces need to be redesigned)Record as prerequisite dependency in section 1, suggest splitting into an independent feature to solve first; suspend the current feature or mark "Proceed after prerequisite is completed"
Why do this step? Forcing features into an already messy file results in an even messier file, making the next change harder. Bring "Should we clean up first" to the surface in advance and let the user decide, instead of AI secretly including it in a PR.
Write the conclusion at the beginning of the change plan subsection in section 3 "Implementation Tips" (specific format see
reference.md
in the same directory). No need to write for "Healthy, add directly" — only record when there are actions.

4. 补齐剩下各节,整稿一次性给 review

4. Complete the remaining sections, submit the full draft for review at once

步骤 2 和 3 已经把第 1 节"决策与约束"、第 3 节"实现提示"的关键结论先写进文件了。这一步把剩下的节(第 0 / 2 / 4 节,以及第 1 / 3 节里步骤 2/3 没覆盖的部分)按下文模板补齐,整稿成型后再交给用户看,不要分批让用户看半成品。初稿的 YAML frontmatter 里
status
draft
注意"一次性"是指给用户的 review 次数,不是指写文件的次数——文件本身可以分几轮写完,但只在整稿都齐了之后才发出去。
为什么不分批 review?分批的问题是用户每次只看到局部,发现不了"第 1 节的范围跟第 3 节的推进步骤对不上"这种跨节问题。只有完整初稿摆出来,用户才能扫到全局一致性。
Step 2 and 3 have already written the key conclusions for section 1 "Decisions and Constraints" and section 3 "Implementation Tips" into the file. In this step, complete the remaining sections (sections 0/2/4, and parts of sections 1/3 not covered in steps 2/3) according to the template below, submit the complete draft to the user for review only after it's fully formed, don't let the user review semi-finished products in batches. Set
status
to
draft
in the YAML frontmatter of the first draft.
Note that "at once" refers to the number of review requests sent to the user, not the number of times you write the file — the file itself can be written in several rounds, but only sent out after it's fully complete.
Why not review in batches? The problem with batches is that the user only sees parts each time and can't spot cross-section issues like "The scope in section 1 doesn't match the progress steps in section 3". Only when the complete first draft is presented can the user check global consistency.

5. 整体 review

5. Overall review

向用户发一次整体 review 提示。用户对任意部分提修改意见,你按意见改完再次确认,反复直到用户明确"方案可以了"。用户放行后把 frontmatter 的
status
draft
改成
approved
Send one overall review prompt to the user. If the user raises modification suggestions for any part, revise according to the suggestions and confirm again, repeating until the user explicitly says "The design is okay". After the user approves, change
status
from
draft
to
approved
in the frontmatter.

6. 生成 {slug}-checklist.yaml

6. Generate {slug}-checklist.yaml

方案确认后,从
{slug}-design.md
里抽出行动清单,落到同目录
{slug}-checklist.yaml
。这份清单的生命周期看
easysdd/reference/shared-conventions.md
:本阶段负责生成,implement 只推进
steps
,acceptance 只核对
checks
。三个阶段各管一段,互不越界——这样每个阶段都能从 yaml 上看出自己的工作进度。
{slug}-design.md
{slug}-checklist.yaml
的完整模板、frontmatter 示例、节锚点、提取格式都在同目录
reference.md
里。本技能只保留提取原则:
  • steps
    :从第 3 节"实现提示"里推进顺序子节逐步抽,一步一条
  • checks
    :从这几处综合抽——
    • 第 1 节"明确不做"的每条 → 范围守护检查项
    • 第 2 节关键接口契约 → 接口一致性检查项
    • 第 3 节"实现提示"里测试设计子节的每条测试约束 → 测试验证检查项
落盘后用
validate-yaml.py --file {slug-checklist.yaml 路径} --yaml-only
校验语法。
After the design is confirmed, extract the action checklist from
{slug}-design.md
and save it as
{slug}-checklist.yaml
in the same directory. See
easysdd/reference/shared-conventions.md
for the lifecycle of this checklist: This phase is responsible for generating it, implement phase only advances
steps
, acceptance phase only verifies
checks
. Each of the three phases manages its own part without crossing boundaries — this way, each phase can see its work progress from the yaml.
The complete templates, frontmatter examples, section anchors, and extraction format for
{slug}-design.md
and
{slug}-checklist.yaml
are in
reference.md
in the same directory. This skill only retains the extraction principles:
  • steps
    : Extract step by step from the progress sequence subsection of section 3 "Implementation Tips", one step per entry
  • checks
    : Extract comprehensively from these places —
    • Each item in section 1 "Explicitly excluded scope" → Scope guard check items
    • Key interface contracts in section 2 → Interface consistency check items
    • Each test constraint in the test design subsection of section 3 "Implementation Tips" → Test verification check items
After saving, validate the syntax with
validate-yaml.py --file {slug-checklist.yaml path} --yaml-only
.

7. 退出

7. Exit

按下文退出条件清单核对完,引导用户进入阶段 2 实现。

After checking all items in the exit condition list below, guide the user to enter phase 2 implementation.

模板和格式

Templates and Format

{slug}-design.md
/
{slug}-checklist.yaml
的完整参考拆到了同目录
reference.md
  • YAML frontmatter 示例
  • 顶层节锚点要求
  • {slug}-checklist.yaml
    完整格式与状态语义
  • 第 0-4 节各自该写什么
本技能只保留流程层面的约束:按那份参考一次性起草完整初稿,不分批吐半成品。
整体 review 的提示词同样在
reference.md
。规则不变:只发一次整体 review,不要逐节拆开确认。

The complete reference for
{slug}-design.md
/
{slug}-checklist.yaml
is split into
reference.md
in the same directory:
  • YAML frontmatter example
  • Top-level section anchor requirements
  • Complete format and status semantics of
    {slug}-checklist.yaml
  • What to write in each section 0-4
This skill only retains process-level constraints: Draft the complete first draft at once according to that reference, don't output semi-finished products in batches.
The prompt for overall review is also in
reference.md
. The rule remains: Send only one overall review, don't confirm section by section.

退出条件

Exit Conditions

用户整体 review 通过,并且下面这些都满足:
  • 做过术语 grep 防冲突并记录结果
  • YAML frontmatter 存在,
    doc_type
    /
    feature
    /
    status
    /
    summary
    /
    tags
    都填了
  • 需求摘要含"不做什么",且后文没有偷偷扩范围
  • 记录了关键决策和被拒方案
  • 每个关键接口有具体示例(API:输入→输出;组件:Props→渲染 / Events),覆盖正常路径和主要错误路径
  • 示例通过注释标了来源位置(文件路径 + 函数 / 组件名)
  • 推进步骤 4-8 步,每步可独立验证
  • 测试设计按功能点组织,每个功能点都有测试约束 / 验证方式 / 关键用例骨架
  • 记录了高风险实现约束
  • 用户确认通过后,frontmatter 的
    status
    改成了
    approved
  • {slug}-checklist.yaml
    已从
    {slug}-design.md
    抽出生成,且通过
    validate-yaml.py
    校验
  • {slug}-checklist.yaml
    的 steps 条目数和第 3 节"实现提示"里推进顺序子节一致
文件路径:方案文件在
easysdd/features/{feature}/
下;feature 目录不存在就在这一步建。命名约定看
easysdd/reference/shared-conventions.md
第 0 节。

The user has approved the overall review, and all the following are met:
  • Ran term grep to prevent conflicts and recorded the results
  • YAML frontmatter exists, with
    doc_type
    /
    feature
    /
    status
    /
    summary
    /
    tags
    all filled in
  • Requirement summary includes "what not to do", and no scope expansion is secretly added later
  • Recorded key decisions and rejected solutions
  • Each key interface has specific examples (API: input→output; component: Props→rendering / Events), covering normal paths and main error paths
  • Examples are marked with source locations (file path + function / component name) via comments
  • 4-8 progress steps, each independently verifiable
  • Test design is organized by feature points, each feature point has test constraints / verification methods / key use case skeleton
  • Recorded high-risk implementation constraints
  • After user confirmation,
    status
    in frontmatter is changed to
    approved
  • {slug}-checklist.yaml
    has been extracted from
    {slug}-design.md
    and passed validation via
    validate-yaml.py
  • The number of steps in
    {slug}-checklist.yaml
    matches the progress sequence subsection in section 3 "Implementation Tips"
File path: The design document is under
easysdd/features/{feature}/
; create the feature directory in this step if it doesn't exist. See section 0 of
easysdd/reference/shared-conventions.md
for naming conventions.

容易踩的坑

Common Pitfalls

下面这些是过去反复出现的反模式,遇到就停一下问自己是不是又掉进去了:
  • 没读
    AGENTS.md
    和相关架构文档就动笔——写出来的方案大概率跟现有代码对不上
  • 术语没做防冲突检查——冲突之后 git blame 找原因要花十倍时间
  • 用散文描述接口行为,没给具体示例——读者建不起模型,review 时没法判断
  • 把契约层写成全字段百科——已经存在且不变的接口别重复抄
  • 强行画图——模块就 ≤ 2 个、调用又是线性的,画图反而模糊重点
  • 推进步骤拆得太细(>8 步)——细到每步都没什么独立价值
  • 只给半份文档让用户先 review——用户看不出全局一致性
  • 在需求摘要或改动计划里偷偷扩范围——后面验收时对不上
These are recurring anti-patterns from the past; stop and ask yourself if you're falling into them:
  • Writing without reading
    AGENTS.md
    and relevant architecture docs — the design will likely not align with existing code
  • Not checking for term conflicts — resolving conflicts later will take ten times longer via git blame
  • Describing interface behavior in prose without giving specific examples — readers can't build a mental model and can't judge during review
  • Writing the contract layer as a full-field encyclopedia — don't copy existing and unchanged interfaces repeatedly
  • Forcing diagrams — if there are ≤2 modules and linear calls, diagrams will blur the focus instead
  • Splitting progress steps too finely (>8 steps) — so fine that each step has no independent value
  • Only giving half the document for user review first — the user can't see global consistency
  • Secretly expanding scope in the requirement summary or change plan — won't match acceptance criteria later ",