secondme-prd
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSecondMe 产品需求定义
SecondMe Product Requirements Definition
通过对话式交互帮助开发者明确产品需求,根据已选功能模块针对性提问。
工具使用: 收集用户输入时使用 工具,支持单选和多选问题。
AskUserQuestionHelp developers clarify product requirements through conversational interactions, and ask targeted questions based on selected functional modules.
Tool Usage: Use the tool to collect user input, which supports single-choice and multiple-choice questions.
AskUserQuestion前置条件检查
Precondition Check
在开始之前,检查项目状态:
-
检查是否存在
.secondme/state.json- 不存在 → 提示:
请先运行 /secondme-init 初始化项目配置 - 存在 → 继续
- 不存在 → 提示:
-
检查 stage 字段
- → 正常继续 PRD 对话
stage == "init" - 或
stage == "prd"→ 询问:"ready"已有 PRD 定义,是否要重新定义需求?- 用户确认 → 继续
- 用户取消 → 退出
Before starting, check the project status:
-
Check ifexists
.secondme/state.json- Does not exist → Prompt:
Please run /secondme-init to initialize project configuration first - Exists → Proceed
- Does not exist → Prompt:
-
Check the stage field
- → Proceed with PRD conversation normally
stage == "init" - or
stage == "prd"→ Ask:"ready"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
读取 中的 字段,根据已选模块展示相关 API 能力:
state.jsonmodulesauth 模块(必有):
- 用户登录和授权
- Access Token 和 Refresh Token 管理
- 用户身份验证
profile 模块(如已选):
- 获取用户基础信息(昵称、头像)
- 获取用户兴趣标签(Shades)
- 获取用户软记忆/知识库
chat 模块(如已选):
- 与 SecondMe AI 进行流式对话
- 获取历史会话列表
- 获取会话消息记录
act 模块(如已选):
- 结构化动作判断:让 AI 输出合法 JSON 对象,用于意图分类、情感分析、条件判断等决策场景
- 通过 actionControl 定义输出的 JSON 结构和判断规则
note 模块(如已选):
- 添加笔记/记忆到用户的 SecondMe
然后询问:
基于以上能力,你想要构建什么类型的应用?
Read the field in , and display relevant API capabilities based on selected modules:
modulesstate.jsonauth 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
提问:
- 应用目标:你的应用主要解决什么问题?
- 目标用户:这个应用是给谁用的?
收集用户回答,形成需求概要。
Ask:
- Application Goal: What problem does your application mainly solve?
- 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
提问:
-
界面风格:你希望什么样的视觉风格?
- 简约现代
- 温馨可爱
- 专业商务
- 其他(请描述)
-
配色偏好:有特别喜欢的颜色吗?(可选)
Ask:
-
Interface Style: What visual style do you prefer?
- Minimalist modern
- Warm and cute
- Professional business
- Other (Please describe)
-
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.jsonjson
{
"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.jsonjson
{
"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 field of
prd, keepstate.jsonasstage"init" - When running next time, you can continue or restart
/secondme-prd
注意事项
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