secondme-prd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SecondMe 产品需求定义

SecondMe Product Requirements Definition

通过对话式交互帮助开发者明确产品需求,根据已选功能模块针对性提问。
工具使用: 收集用户输入时使用
AskUserQuestion
工具,支持单选和多选问题。

Help developers clarify product requirements through conversational interactions, and ask targeted questions based on selected functional modules.
Tool Usage: Use the
AskUserQuestion
tool to collect user input, which supports single-choice and multiple-choice questions.

前置条件检查

Precondition Check

在开始之前,检查项目状态:
  1. 检查
    .secondme/state.json
    是否存在
    • 不存在 → 提示:
      请先运行 /secondme-init 初始化项目配置
    • 存在 → 继续
  2. 检查 stage 字段
    • stage == "init"
      → 正常继续 PRD 对话
    • stage == "prd"
      "ready"
      → 询问:
      已有 PRD 定义,是否要重新定义需求?
      • 用户确认 → 继续
      • 用户取消 → 退出

Before starting, check the project status:
  1. Check if
    .secondme/state.json
    exists
    • Does not exist → Prompt:
      Please run /secondme-init to initialize project configuration first
    • Exists → Proceed
  2. Check the stage field
    • stage == "init"
      → Proceed with PRD conversation normally
    • stage == "prd"
      or
      "ready"
      → Ask:
      PRD has already been defined. Do you want to redefine requirements?
      • User confirms → Proceed
      • User cancels → Exit

对话流程

Conversation Flow

第一轮:展示 API 能力

Round 1: Display API Capabilities

读取
state.json
中的
modules
字段,根据已选模块展示相关 API 能力:
auth 模块(必有)
  • 用户登录和授权
  • Access Token 和 Refresh Token 管理
  • 用户身份验证
profile 模块(如已选):
  • 获取用户基础信息(昵称、头像)
  • 获取用户兴趣标签(Shades)
  • 获取用户软记忆/知识库
chat 模块(如已选):
  • 与 SecondMe AI 进行流式对话
  • 获取历史会话列表
  • 获取会话消息记录
act 模块(如已选):
  • 结构化动作判断:让 AI 输出合法 JSON 对象,用于意图分类、情感分析、条件判断等决策场景
  • 通过 actionControl 定义输出的 JSON 结构和判断规则
note 模块(如已选):
  • 添加笔记/记忆到用户的 SecondMe
然后询问:
基于以上能力,你想要构建什么类型的应用?

Read the
modules
field in
state.json
, and display relevant API capabilities based on selected modules:
auth module (mandatory):
  • User login and authorization
  • Access Token and Refresh Token management
  • User authentication
profile module (if selected):
  • Get basic user information (nickname, avatar)
  • Get user interest tags (Shades)
  • Get user soft memory/knowledge base
chat module (if selected):
  • Stream-based conversation with SecondMe AI
  • Get historical conversation list
  • Get conversation message records
act module (if selected):
  • Structured action judgment: Let AI output valid JSON objects for decision scenarios such as intent classification, sentiment analysis, conditional judgment, etc.
  • Define the JSON structure and judgment rules through actionControl
note module (if selected):
  • Add notes/memories to the user's SecondMe
Then ask:
Based on the above capabilities, what type of application do you want to build?

第二轮:收集核心需求

Round 2: Collect Core Requirements

提问:
  1. 应用目标:你的应用主要解决什么问题?
  2. 目标用户:这个应用是给谁用的?
收集用户回答,形成需求概要。

Ask:
  1. Application Goal: What problem does your application mainly solve?
  2. Target Users: Who is this application for?
Collect user responses to form a requirement summary.

第三轮:功能细化

Round 3: Function Refinement

根据已选模块,针对性提问:
如果选了 chat 模块
  • 是否需要保存会话历史到本地数据库?
  • 对话界面有什么偏好?(单轮对话/多轮会话列表)
  • 需要显示 AI 的思考过程吗?
如果选了 act 模块
  • 需要判断哪些动作?(如:用户意图分类、情感倾向、是否满足某个条件)
  • 输出的 JSON 结构是什么?(如:
    {"is_liked": boolean}
    {"intent": "like"|"dislike"|"neutral"}
  • 判断结果会驱动什么业务逻辑?(如:自动点赞/收藏、路由跳转、条件触发)
如果选了 profile 模块
  • 需要展示哪些用户信息?(头像、昵称、兴趣标签、软记忆)
  • 用户信息展示在什么位置?(个人主页/侧边栏/顶部导航)
如果选了 note 模块
  • 什么场景下用户会添加笔记?
  • 添加笔记后需要什么反馈?

Ask targeted questions based on selected modules:
If chat module is selected:
  • Do you need to save conversation history to a local database?
  • What are your preferences for the conversation interface? (Single-round conversation / Multi-round conversation list)
  • Do you need to display the AI's thinking process?
If act module is selected:
  • Which actions need to be judged? (e.g., user intent classification, sentiment tendency, whether a certain condition is met)
  • What is the JSON structure of the output? (e.g.,
    {"is_liked": boolean}
    {"intent": "like"|"dislike"|"neutral"}
    )
  • What business logic will the judgment result drive? (e.g., automatic like/favorite, route jump, conditional trigger)
If profile module is selected:
  • Which user information needs to be displayed? (Avatar, nickname, interest tags, soft memory)
  • Where will the user information be displayed? (Personal homepage / Sidebar / Top navigation)
If note module is selected:
  • In what scenarios will users add notes?
  • What feedback is needed after adding notes?

第四轮:设计偏好

Round 4: Design Preferences

提问:
  1. 界面风格:你希望什么样的视觉风格?
    • 简约现代
    • 温馨可爱
    • 专业商务
    • 其他(请描述)
  2. 配色偏好:有特别喜欢的颜色吗?(可选)

Ask:
  1. Interface Style: What visual style do you prefer?
    • Minimalist modern
    • Warm and cute
    • Professional business
    • Other (Please describe)
  2. Color Preference: Any favorite colors? (Optional)

第五轮:需求确认

Round 5: Requirement Confirmation

汇总收集的信息,展示需求摘要:
📋 产品需求摘要

应用概要:[用户描述的应用目标]

核心功能:
- [功能1]
- [功能2]
- [功能3]

目标用户:[用户描述]

设计偏好:[界面风格]

确认以上需求是否正确?
用户确认后,进入下一步。

Summarize the collected information and display the requirement summary:
📋 Product Requirement Summary

Application Overview: [User-described application goal]

Core Features:
- [Feature 1]
- [Feature 2]
- [Feature 3]

Target Users: [User description]

Design Preference: [Interface style]

Confirm if the above requirements are correct?
Proceed to the next step after user confirmation.

更新 state.json

Update state.json

确认需求后,更新
.secondme/state.json
json
{
  "version": "1.0",
  "stage": "prd",
  "modules": ["auth", "chat"],
  "config": { ... },
  "prd": {
    "summary": "应用概要描述",
    "features": [
      "功能1描述",
      "功能2描述",
      "功能3描述"
    ],
    "target_users": "目标用户描述",
    "design_preference": "简约现代"
  }
}

After confirming requirements, update
.secondme/state.json
:
json
{
  "version": "1.0",
  "stage": "prd",
  "modules": ["auth", "chat"],
  "config": { ... },
  "prd": {
    "summary": "Application overview description",
    "features": [
      "Feature 1 description",
      "Feature 2 description",
      "Feature 3 description"
    ],
    "target_users": "Target user description",
    "design_preference": "Minimalist modern"
  }
}

输出结果

Output Result

✅ 产品需求已定义!

概要:[summary]

功能列表:
- [feature 1]
- [feature 2]

设计偏好:[design_preference]

已保存到 .secondme/state.json

下一步:运行 /secondme-nextjs 生成项目

✅ Product requirements have been defined!

Summary: [summary]

Feature List:
- [feature 1]
- [feature 2]

Design Preference: [design_preference]

Saved to .secondme/state.json

Next Step: Run /secondme-nextjs to generate the project

中断处理

Interruption Handling

如果用户主动要求中止或取消 PRD 定义:
  • 询问是否保存已收集的部分信息
  • 如果保存:写入
    state.json
    prd
    字段,保持
    stage
    "init"
  • 下次运行
    /secondme-prd
    时可以继续或重新开始

If the user actively requests to suspend or cancel PRD definition:
  • Ask whether to save the partially collected information
  • If save: Write to the
    prd
    field of
    state.json
    , keep
    stage
    as
    "init"
  • When running
    /secondme-prd
    next time, you can continue or restart

注意事项

Notes

  • 对话应该自然流畅,不要机械地问答
  • 根据用户回答调整后续问题
  • 如果用户回答模糊,可以追问澄清
  • 最多 5 轮对话,避免过长
  • Conversations should be natural and smooth, not mechanical question-and-answer
  • Adjust subsequent questions based on user responses
  • If user responses are vague, follow up for clarification
  • Maximum 5 rounds of conversation to avoid being too long