interactive-requirements-gathering

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Interactive Requirements Gathering

交互式需求收集

Structured framework for gathering requirements through interactive questionnaires. Based on the Conductor methodology's proven human-in-the-loop patterns.
这是一个通过交互式问卷收集需求的结构化框架,基于Conductor方法论中经过验证的“人在回路”模式。

When to Use

适用场景

  • Setting up new projects
  • Defining product requirements
  • Gathering feature specifications
  • Onboarding users to new workflows
  • Any task requiring structured user input
  • 新项目启动
  • 产品需求定义
  • 功能规格收集
  • 新工作流程用户入职
  • 任何需要结构化用户输入的任务

Core Principles

核心原则

1. Question Classification

1. 问题分类

Before asking ANY question, classify its type:
TypePurposePhrasingExample
AdditiveBrainstorming, multiple answers valid"Select all that apply""Which features do you need?"
ExclusiveSingle choice requiredNo multi-select phrase"Which framework should we use?"
在提出任何问题之前,先对其类型进行分类:
类型用途表述方式示例
Additive(可多选)头脑风暴,允许多个答案“请选择所有适用选项”“你需要哪些功能?”
Exclusive(单选)仅需一个答案无多选提示语“我们应该使用哪个框架?”

2. Question Structure

2. 问题结构

All questions MUST follow this structure:
[Question text]

A) [Option A - often recommended, marked with "(Recommended)"]
B) [Option B]
C) [Option C]
D) Type your own answer
E) Auto-generate and continue
所有问题必须遵循以下结构:
[问题文本]

A) [选项A - 通常为推荐选项,标注“(Recommended)”]
B) [选项B]
C) [选项C]
D) 输入自定义答案
E) 自动生成并继续

3. Sequential Questioning

3. 循序渐进式提问

CRITICAL: Ask ONE question at a time. Wait for response before next question.
CORRECT:
1. Ask Question 1
2. Wait for response
3. Confirm understanding
4. Ask Question 2

INCORRECT:
1. Ask Questions 1, 2, and 3 together
关键要求:一次只提一个问题。等待用户回复后再提出下一个问题。
正确做法:
1. 提出问题1
2. 等待回复
3. 确认理解
4. 提出问题2

错误做法:
1. 同时提出问题1、2、3

Questionnaire Workflow

问卷工作流程

Step 1: Introduction

步骤1:介绍

Announce the section you're working on:
"I'll now help you define [section name]. I'll ask a few questions to understand your needs."
告知用户当前正在处理的环节:
“我现在将帮你定义[环节名称]。我会提出几个问题来了解你的需求。”

Step 2: Sequential Questions

步骤2:循序渐进式提问

For each question:
  1. Classify: Is this Additive or Exclusive?
  2. Formulate: Create clear question with options
  3. Present: Show options in A/B/C/D/E format
  4. Wait: Do NOT proceed without response
  5. Confirm: Summarize understanding before continuing
针对每个问题:
  1. 分类:确定是可多选(Additive)还是单选(Exclusive)类型?
  2. 设计:创建清晰的问题及选项
  3. 呈现:以A/B/C/D/E格式展示选项
  4. 等待:未收到回复前不要继续
  5. 确认:继续前先总结对用户需求的理解

Step 3: Handle Special Options

步骤3:处理特殊选项

Option D (Type your own):
  • Accept user's custom input
  • Confirm the custom response
  • Continue to next question
Option E (Auto-generate):
  • Stop asking questions for this section
  • Use best judgment based on previous answers
  • Generate content and present for review
选项D(输入自定义答案)
  • 接受用户的自定义输入
  • 确认该自定义回复
  • 继续下一个问题
选项E(自动生成)
  • 停止当前环节的提问
  • 根据之前的回复做出最佳判断
  • 生成内容并提交用户审核

Step 4: Generate Content

步骤4:生成内容

CRITICAL: Use ONLY the user's selected answers as source of truth.
CORRECT:
- User selected "OAuth 2.0" -> Generate OAuth implementation details

INCORRECT:
- Include Option A, B, C text that wasn't selected
- Include question text in generated content
关键要求:仅将用户选择的答案作为事实依据。
正确做法:
- 用户选择了“OAuth 2.0” -> 生成OAuth实现细节

错误做法:
- 包含未被选中的选项A、B、C的文本
- 在生成的内容中包含问题文本

Step 5: User Confirmation Loop

步骤5:用户确认循环

After generating content:
"I've drafted [document name]. Please review:"

[Content preview]

What would you like to do?
A) Approve - proceed to next step
B) Suggest Changes - tell me what to modify

Please respond with A or B.
Loop until approved or user provides alternative direction.
生成内容后:
“我已起草了[文档名称],请审核:”

[内容预览]

你希望进行以下哪项操作?
A) 批准 - 进入下一步
B) 建议修改 - 告诉我需要调整的内容

请回复A或B。
循环此步骤直到用户批准或提供其他方向。

Question Patterns

问题模板

Product Vision Questions (Additive)

产品愿景问题(可多选)

What are the primary goals of this product? (Select all that apply)

A) Improve user productivity
B) Reduce operational costs
C) Enhance customer experience
D) Type your own answer
E) Auto-generate and continue
该产品的主要目标是什么?(请选择所有适用选项)

A) 提升用户生产力
B) 降低运营成本
C) 改善客户体验
D) 输入自定义答案
E) 自动生成并继续

Technology Selection Questions (Exclusive)

技术选型问题(单选)

Which database should we use?

A) PostgreSQL (Recommended) - Best for relational data with complex queries
B) MongoDB - Document store for flexible schemas
C) SQLite - Lightweight for small applications
D) Type your own answer
E) Auto-generate and continue
我们应该使用哪种数据库?

A) PostgreSQL (推荐) - 适用于需复杂查询的关系型数据
B) MongoDB - 用于灵活 schema 的文档型数据库
C) SQLite - 适用于小型应用的轻量级数据库
D) 输入自定义答案
E) 自动生成并继续

Feature Scoping Questions (Additive)

功能范围问题(可多选)

Which authentication methods should be supported? (Select all that apply)

A) Email/Password
B) OAuth (Google, GitHub)
C) Magic Links
D) Type your own answer
E) Auto-generate and continue
应支持哪些认证方式?(请选择所有适用选项)

A) 邮箱/密码
B) OAuth(Google、GitHub)
C) 魔法链接
D) 输入自定义答案
E) 自动生成并继续

Integration with AskUserQuestion Tool

与AskUserQuestion工具的集成

When using the AskUserQuestion tool, map to this framework:
javascript
AskUserQuestion({
  questions: [
    {
      header: 'Database',
      question: 'Which database should we use?',
      multiSelect: false, // Exclusive question
      options: [
        { label: 'PostgreSQL (Recommended)', description: 'Best for relational data' },
        { label: 'MongoDB', description: 'Document store for flexible schemas' },
        { label: 'SQLite', description: 'Lightweight for small apps' },
      ],
    },
  ],
});
使用AskUserQuestion工具时,需按照本框架进行映射:
javascript
AskUserQuestion({
  questions: [
    {
      header: 'Database',
      question: 'Which database should we use?',
      multiSelect: false, // 单选问题
      options: [
        { label: 'PostgreSQL (Recommended)', description: 'Best for relational data' },
        { label: 'MongoDB', description: 'Document store for flexible schemas' },
        { label: 'SQLite', description: 'Lightweight for small apps' },
      ],
    },
  ],
});

State Persistence

状态持久化

For multi-step questionnaires, save progress:
json
{
  "last_successful_step": "2.1_product_guide",
  "answers": {
    "product_type": "SaaS",
    "target_users": ["developers", "teams"]
  }
}
This enables resuming interrupted workflows.
对于多步骤问卷,需保存进度:
json
{
  "last_successful_step": "2.1_product_guide",
  "answers": {
    "product_type": "SaaS",
    "target_users": ["developers", "teams"]
  }
}
这可支持恢复中断的工作流程。

Example Session

示例会话

AGENT: "I'll help you define the product vision. First question:"

"Who are the primary users of this product?"

A) Developers
B) Business users
C) End consumers
D) Type your own answer
E) Auto-generate and continue

USER: A, B

AGENT: "Got it - targeting developers and business users. Next question:"

"What problem does this product solve?"

A) Streamlines workflows
B) Reduces manual work
C) Improves collaboration
D) Type your own answer
E) Auto-generate and continue

USER: D - "Automates code review feedback"

AGENT: "Understood - the product automates code review feedback for developers and business users. Let me generate the product vision..."
AGENT: "我将帮你定义产品愿景。第一个问题:"

"该产品的主要用户是谁?"

A) 开发者
B) 商务用户
C) 终端消费者
D) 输入自定义答案
E) 自动生成并继续

USER: A, B

AGENT: "明白了 - 目标用户是开发者和商务用户。下一个问题:"

"该产品解决什么问题?"

A) 简化工作流程
B) 减少手动工作
C) 提升协作效率
D) 输入自定义答案
E) 自动生成并继续

USER: D - "自动化代码评审反馈"

AGENT: "理解了 - 该产品为开发者和商务用户自动化代码评审反馈。让我生成产品愿景..."

Anti-Patterns

反模式

Do NOT:

请勿:

  • Ask multiple questions at once
  • Include unselected options in generated content
  • Skip confirmation steps
  • Assume answers without asking
  • Use technical jargon in options without explanation
  • 一次提出多个问题
  • 在生成的内容中包含未选中的选项
  • 跳过确认步骤
  • 未询问就假设答案
  • 在选项中使用未经解释的技术术语

Do:

请务必:

  • One question at a time
  • Clear, concise option descriptions
  • Summarize understanding frequently
  • Include escape hatches (D, E options)
  • Respect user's custom inputs
  • 一次只提一个问题
  • 选项描述清晰简洁
  • 频繁总结对需求的理解
  • 提供退出机制(选项D、E)
  • 尊重用户的自定义输入

Related Skills

相关技能

  • project-onboarding
    - Use this framework during project setup
  • context-driven-development
    - Generate context artifacts from answers
  • brainstorming
    - Alternative for open-ended exploration
  • project-onboarding
    - 在项目启动阶段使用本框架
  • context-driven-development
    - 根据回复生成上下文工件
  • brainstorming
    - 用于开放式探索的替代方法

Memory Protocol (MANDATORY)

记忆协议(强制要求)

Before starting: Read
.claude/context/memory/learnings.md
After completing:
  • New pattern discovered ->
    .claude/context/memory/learnings.md
  • Issue encountered ->
    .claude/context/memory/issues.md
  • Decision made ->
    .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
开始前: 阅读
.claude/context/memory/learnings.md
完成后:
  • 发现新模式 -> 写入
    .claude/context/memory/learnings.md
  • 遇到问题 -> 写入
    .claude/context/memory/issues.md
  • 做出决策 -> 写入
    .claude/context/memory/decisions.md
假设会被中断:如果未记录在记忆中,就视为未发生过。