define
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProduct requirements interview → in living doc → quality gate → glossary (when needed). Pipeline: explore → define → [design] → architect → plan.
## RequirementsPhase: Product. User is non-technical. Never surface schemas, APIs, or code paths. Read codebase silently; present findings as product behavior.
产品需求访谈 → 活文档中的章节 → 质量关卡 → 术语表(按需生成)。流程:探索 → 定义 → [设计] → 架构 → 规划。
## Requirements阶段:产品。用户为非技术人员。绝不要展示 schema、API 或代码路径。静默读取代码库;以产品行为的形式呈现发现结果。
Starting
启动步骤
Before asking anything:
- Detect state in . If multiple
./plans/files found, list them via.mdand ask which feature to work on.AskUserQuestion- with content: this takes priority. Skip steps 2-3, resume only affected domains, clear after resolving.
## Rollback Notes - Living doc with : read for context.
## Scope - Living doc with populated: skip interview → Quality Gate.
## Requirements - Living doc with populated: skip to After Delivering.
### Glossary - No living doc: create one (user skipped explore).
- Explore codebase — product lens: user flows, UI patterns, terminology, conventions.
- Search for existing documentation — user guides, help docs, product specs.
If scope exists: "I've read the scope for [feature]. Problem: [X], stakeholders: [Y], scope: [Z]. Let's start with target users — who specifically will use this?"
No living doc? Start from user's description, beginning with problem/motivation. Derive kebab-case name, confirm, create with marked Skipped — entered pipeline at define.
./plans/<name>.md## Scope在发起任何询问之前:
- 检测目录中的状态。如果找到多个
./plans/文件,通过.md列出它们并询问要处理哪个功能。AskUserQuestion- 若存在带内容的:此内容优先级最高。跳过步骤2-3,仅继续受影响的领域,解决后清除该内容。
## Rollback Notes - 若活文档包含章节:读取以获取上下文信息。
## Scope - 若活文档的章节已填充:跳过访谈 → 进入质量关卡。
## Requirements - 若活文档的章节已填充:直接跳转到交付后环节。
### Glossary - 若无活文档:创建一个(用户跳过了探索阶段)。
- 若存在带内容的
- 以产品视角探索代码库:用户流程、UI模式、术语、约定。
- 搜索现有文档——用户指南、帮助文档、产品规格。
若存在范围定义:“我已阅读[功能名称]的范围说明。问题:[X],利益相关者:[Y],范围:[Z]。我们从目标用户开始——具体是哪些用户会使用这个功能?”
若无活文档?从用户的描述开始,先从问题/动机入手。推导 kebab-case 格式的名称,确认后创建,并标记为已跳过——在定义阶段进入流程。
./plans/<name>.md## ScopeInterview Protocol
访谈协议
Use for every question — header (≤12 chars), 2–4 options, one marked "(Recommended)". When user can't decide: state recommendation, record assumption in Risks & Open Questions, move on.
AskUserQuestionCode-first: explore codebase before asking; present as product behavior. "The app currently [behavior]. Extend or introduce new?"
每个问题都使用——标题(≤12字符),2-4个选项,其中一个标记为“(Recommended)”。当用户无法决定时:给出建议,在“风险与未决问题”中记录假设,继续推进。
AskUserQuestion代码优先:先探索代码库再提问;以产品行为的形式呈现。“当前应用的行为是[具体行为]。需要扩展还是引入新功能?”
Interview: Requirements
访谈:需求
Track whether you've resolved decisions across these 9 domains:
- Problem & motivation — skip if scope exists (already resolved)
- Target users & personas — distinct types, sophistication, frequency
- User stories & JTBD — As a/I want/so that + jobs-to-be-done
- Functional requirements — step through each story: see, click, receive
- Non-functional requirements — performance, accessibility, compliance (relevant only)
- Success metrics — measurable outcomes at 30/60/90 days
- Scope definition — in/out/future with rationale for each
- Dependencies & constraints — business: pricing, legal, timing, content
- Risks & open questions — adoption, competitive, open items needing answers
Exhaust every branch depth-first. Resolve sub-questions before moving on. Only ask what codebase can't answer. No limit on questions; depth from more turns, not longer ones.
No technical implementation (schemas, APIs, architecture, technology selection). Redirect: "Captured for architect phase — let's stay on what users need."
When all domains resolved: "I think we have enough to draft the requirements." Write using template in . Proceed to Quality Gate.
## Requirementsassets/requirements-template.md跟踪是否已解决以下9个领域的决策:
- 问题与动机——若存在范围定义则跳过(已解决)
- 目标用户与用户画像——不同类型、成熟度、使用频率
- 用户故事与JTBD——采用“As a/I want/so that”格式 + 待完成工作(jobs-to-be-done)
- 功能需求——逐个梳理每个故事:查看、点击、接收
- 非功能需求——性能、可访问性、合规性(仅相关项)
- 成功指标——30/60/90天可衡量的成果
- 范围定义——包含/排除/未来规划,每项需说明理由
- 依赖项与约束——业务层面:定价、法律、时间、内容
- 风险与未决问题——采用率、竞争、需要答案的未决事项
深度优先遍历所有分支。解决子问题后再推进。仅提问代码库无法回答的问题。问题数量无限制;通过更多轮次对话挖掘深度,而非单次长对话。
禁止涉及技术实现(schema、API、架构、技术选型)。若用户提及,引导:“已记录该内容,将在架构阶段处理——我们先聚焦用户需求。”
当所有领域的决策都解决后:“我认为我们已具备起草需求的足够信息。”使用中的模板撰写章节。进入质量关卡。
assets/requirements-template.md## RequirementsQuality Gate
质量关卡
Work silently — user sees only the verdict.
Analysis: (1) Read requirements fully — note underspecified, inconsistent, or surprising items. (2) Verify claims against actual code/product behavior. (3) Check scope alignment if exists. (4) Evaluate: problem clarity, user coverage, requirements quality (specific? testable? prescriptions disguised as requirements?), success metrics, scope control, completeness.
## ScopeVerdicts:
- Ready: Solid enough to design from. Minor issues only.
- Revise: Issues to fix before design. Specify what.
- Rethink: Fundamental problems — rollback to .
/explore
Output: Verdict header, Strengths (2-4 bullets), Issues (numbered, severity-ordered), Risks.
静默处理——用户仅会看到最终结论。
分析:(1) 完整读取需求——记录表述模糊、不一致或异常的内容。(2) 对照实际代码/产品行为验证声明。(3) 若存在章节,检查需求与范围的一致性。(4) 评估:问题清晰度、用户覆盖度、需求质量(具体?可测试?是否将规范伪装成需求?)、成功指标、范围控制、完整性。
## Scope结论:
- 就绪:足够用于设计。仅存在次要问题。
- 修订:设计前需修复问题。明确说明需修复的内容。
- 重新思考:存在根本性问题——回退到阶段。
/explore
输出:结论标题,优势(2-4个要点),问题(按严重性排序编号),风险。
On Revise
若结论为修订
"Let's work through these issues." Group by section. Each turn: restate issues, propose concrete resolution, accept/modify/skip. Skipped issues become open items. After all resolved, update in single write. Re-run Quality Gate. Repeat until Ready or Rethink.
## RequirementsGuardrails: don't re-explore codebase, don't expand scope, don't re-interview. Batch aggressively if user accepts unchanged.
“我们来解决这些问题。”按章节分组。每一轮对话:重述问题,提出具体解决方案,接受/修改/跳过。跳过的问题将成为未决事项。解决所有问题后,一次性更新章节。重新运行质量关卡。重复此过程直至结论为就绪或重新思考。
## Requirements约束:不要重新探索代码库,不要扩大范围,不要重新访谈。如果用户接受无变更,批量处理。
On Ready
若结论为就绪
Check glossary conditions: requirements introduce 3+ domain nouns not in codebase, naming conflicts found (PRD says "workspace," code says "org"), or feature crosses bounded-context boundaries. If any → Glossary. If none → After Delivering.
检查术语表生成条件:需求引入了3个以上代码库中不存在的领域名词,发现命名冲突(PRD中称“workspace”,代码中称“org”),或功能跨越了限界上下文边界。若满足任一条件 → 生成术语表。若无 → 进入交付后环节。
Glossary
术语表
Run silently. Extract domain terms from requirements. Check codebase naming (models, APIs, types, UI labels, docs). Detect synonyms and homonyms. Propose canonical terms (favor: user-facing consistency, codebase momentum, precision, simplicity). Write as under .
### Glossary## RequirementsMax 1-2 questions. More needed → re-enter Quality Gate with Revise targeting ambiguous sections.
静默生成。从需求中提取领域术语。检查代码库命名(模型、API、类型、UI标签、文档)。检测同义词和同音异义词。推荐规范术语(优先:面向用户的一致性、代码库延续性、精确性、简洁性)。撰写为下的章节。
## Requirements### Glossary最多提出1-2个问题。若需要更多问题 → 重新进入质量关卡,结论为修订,针对模糊章节。
Rollback
回退
Receiving: Read for trigger, affected domains, decisions to preserve. Resume only affected domains — don't re-interview resolved decisions. After resolving, re-run Quality Gate, clear .
## Rollback Notes## Rollback NotesTriggering to explore: If interview reveals scope is wrong (wrong problem, missing stakeholder, infeasible direction): append with trigger + affected domains + preserved decisions. "This changes the scope, not just requirements. Recommend revisiting ."
## Rollback Notes/explore接收回退:读取中的触发原因、受影响领域、需保留的决策。仅继续受影响的领域——不要重新访谈已解决的决策。解决后,重新运行质量关卡,清除。
## Rollback Notes## Rollback Notes触发探索阶段回退:若访谈发现范围错误(问题错误、遗漏利益相关者、方向不可行):追加,包含触发原因 + 受影响领域 + 需保留的决策。“这会改变范围,而不仅仅是需求。建议重新访问阶段。”
## Rollback Notes/exploreAfter Delivering
交付后
Analyze requirements for UI-facing stories (screens, user flows, visual interactions). If any exist: "Requirements are ready. This feature introduces [N] user-facing stories — I recommend next, then ." If none: "Requirements are ready. This is backend-only — skip and run ." Either way: "Review and tell me what to change first."
/design/architect/design/architectUpdate directly on change requests. Flag conflicts with earlier decisions before updating.
Update and with define row.
## Decisions Log## Pipeline Status分析需求中面向UI的故事(屏幕、用户流程、视觉交互)。若存在此类故事:“需求已就绪。该功能包含[N]个面向用户的故事——我建议接下来进入阶段,然后是阶段。”若无:“需求已就绪。此功能仅涉及后端——跳过阶段,直接运行阶段。”无论哪种情况:“请审核并告诉我首先需要修改什么。”
/design/architect/design/architect针对变更请求直接更新。在更新前标记与早期决策的冲突。
更新和中的“定义”行。
## Decisions Log## Pipeline Status