重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/blogic-cz/blogic-marketplace --skill requirements此技能涵盖了一个针对新功能的结构化5阶段需求收集工作流。它将引导您完成初始设置与代码库分析、上下文探索问题、自主上下文收集、专家需求问题以及最终需求文档编制——生成一份可供实施的全面规范。
使用此结构化5阶段流程开始为新功能收集需求。
date "+%Y-%m-%d-%H%M"requirements/[timestamp]-[slug]/00-initial-request.md,包含用户的请求metadata.json,用于状态跟踪requirements/.current-requirement,填入文件夹名称apps/web-app/ - TanStack Start 前端 + TRPC 服务器广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
packages/ - 共享包(db, services, common, logger, agents)生成5个是/否问题以理解问题空间。
项目的关注领域:
问题格式:
## Q1: 此功能将是组织范围的(相对于用户范围)吗?
**未知时的默认值:** 是(大多数项目功能都是组织范围的)
## Q2: 用户将通过新页面/路由与此功能交互吗?
**未知时的默认值:** 是(大多数功能都有专用的 UI)
## Q3: 这需要新的数据库表吗?
**未知时的默认值:** 否(倾向于扩展现有模式)
## Q4: 这将与外部服务/API 集成吗?
**未知时的默认值:** 否(除非明确提及)
## Q5: 此功能应对所有组织成员开放还是仅对管理员开放?
**未知时的默认值:** 所有成员(需进行适当的角色检查)
流程:
01-discovery-questions.md02-discovery-answers.mdmetadata.json在探索问题回答完毕后:
使用可用工具搜索相关代码:
apps/web-app/src/ 中查找类似功能apps/web-app/src/*/trpc/ 中的现有 TRPC 路由器packages/db/src/schema.ts 中审查数据库模式apps/web-app/src/shared/ 中的现有 UI 模式分析类似功能的模式:
将发现记录在 03-context-findings.md 中:
## 代码库分析
### 发现的类似功能
- [功能名称] 位于 [路径] - [相关原因]
### 需要修改/扩展的相关文件
- `apps/web-app/src/[模块]/trpc/[路由器].ts` - [需要添加的内容]
- `packages/db/src/schema.ts` - [如果需要新表]
### 需要遵循的模式
- 来自 [示例] 的 TRPC 路由器模式
- 来自 [示例] 的 TanStack 路由模式
- 来自 [示例] 的表单模式
### 技术限制
- [发现的任何限制]
### 集成点
- [将与之交互的服务/模块]
现在像了解项目代码库的高级开发人员一样提问。
专注于澄清系统行为:
## Q1: 我们应该扩展现有的 [Router]Router 吗(位于 [路径])?
**未知时的默认值:** 是(保持一致性)
## Q2: 对于 UI,我们应该遵循 [类似功能] 的模式吗?
**未知时的默认值:** 是(已建立的模式)
## Q3: 此数据应该缓存在 TanStack Query 中还是每次都重新获取?
**未知时的默认值:** 缓存(大多数数据的标准做法)
## Q4: 我们应该为此流程添加端到端测试吗?
**未知时的默认值:** 是(如果是面向用户的功能)
## Q5: 验证应该在客户端、服务器端还是两端都进行?
**未知时的默认值:** 两端(前端使用 Zod,后端使用 TRPC 输入验证)
流程:
04-detail-questions.md05-detail-answers.md在 06-requirements-spec.md 中生成全面规范:
# 需求规范:[名称]
生成时间:[时间戳]
状态:完成
## 概述
[问题陈述和解决方案摘要]
## 功能需求
### 用户故事
- 作为 [角色],我想要 [操作],以便 [收益]
### 验收标准
- [ ] [可测试的标准]
## 技术要求
### 数据库变更
- 新表:[名称],位于 `packages/db/src/schema.ts`
- 字段:[类型列表]
### TRPC 路由器
- 位置:`apps/web-app/src/[模块]/trpc/[名称].ts`
- 过程:[列表]
- 对组织范围的操作使用 `protectedMemberAccessProcedure`
### 前端路由
- 新路由:`/app/[路径]`
- 组件:[列表]
- 需要遵循的模式:[参考]
### 需要创建/修改的文件
1. `packages/db/src/schema.ts` - 添加表
2. `apps/web-app/src/[模块]/trpc/[名称].ts` - 添加路由器
3. `apps/web-app/src/routes/app/[路径]/route.tsx` - 添加页面
## 实施说明
### 需要遵循的模式
- TRPC:参见 `trpc-patterns` 技能
- 前端:参见 `tanstack-frontend` 技能
### 测试
- 单元测试在 `packages/services/src/__tests__/`
- 端到端测试在 `apps/web-app/e2e/`
## 假设
[任何用于未回答问题时的默认值]
{
"id": "功能-slug",
"started": "ISO-8601-时间戳",
"lastUpdated": "ISO-8601-时间戳",
"status": "active",
"phase": "discovery|context|detail|complete",
"progress": {
"discovery": { "answered": 0, "total": 5 },
"detail": { "answered": 0, "total": 5 }
},
"contextFiles": ["已分析文件的路径"],
"relatedFeatures": ["发现的类似功能"]
}
/requirements-status 检查进度完成当前需求收集会话。
读取 requirements/.current-requirement
如果没有活动需求:
没有活动需求需要结束。
使用 /requirements-list 查看所有需求。
显示当前状态并询问用户意图:
正在结束的需求:[名称]
当前阶段:[阶段] ([X/Y] 已完成)
您想做什么?
1. 使用当前信息生成规范
2. 标记为未完成以便稍后处理
3. 取消并删除
选择 (1/2/3):
根据选择:
06-requirements-spec.mdmetadata.json 状态更新为 "complete"规范格式:
# 需求规范:[名称]
生成时间:[时间戳]
状态:完成,包含 [N] 个假设
## 概述
[来自初始请求的问题陈述]
[基于答案的解决方案摘要]
## 功能需求
[基于已回答的问题]
### 用户故事
- 作为 [角色],我想要 [操作],以便 [收益]
### 验收标准
- [ ] [基于答案的标准]
## 技术要求
### 数据库变更
[如果根据答案适用]
### TRPC 路由器
- 位置:`apps/web-app/src/[模块]/trpc/`
- 需要的过程:[列表]
### 前端路由
- 路径:`/app/[路由]`
- 组件:[列表]
### 需要创建/修改的文件
[项目代码库中的具体路径]
## 实施说明
### 需要遵循的模式
- TRPC:加载技能 `trpc-patterns`
- 前端:加载技能 `tanstack-frontend`
### 验证
- 实施后运行 `bun run check`
- 如果是面向用户的功能,添加端到端测试
## 假设(请审查这些)
[列出任何用于未回答问题的默认值]
- 假设:[问题] -> [使用的默认值] 因为 [原因]
## 后续步骤
1. 审查上述假设
2. 开始实施
3. 在创建 PR 前运行 `/code-review`
更新 metadata.json:
{
"status": "incomplete",
"lastUpdated": "[时间戳]",
"pausedAt": "[阶段]",
"remainingQuestions": [N]
}
创建进度摘要
注明仍需要的内容
输出:
需求已标记为未完成。
进度已保存:
- 阶段:[当前阶段]
- 已回答的问题:[X/Y]
- 最后活动时间:[现在]
稍后恢复:/requirements-status
确认删除:
确定要删除此需求吗?
所有已收集的信息都将丢失。
输入 'yes' 确认:
如果确认:
.current-requirement输出:
需求已取消并删除。
重新开始:/requirements-start [描述]
生成规范后(选项 1):
清空 .current-requirement
显示摘要:
需求收集完成!
规范已保存:requirements/[文件夹]/06-requirements-spec.md
后续步骤:
1. 审查规范,特别是"假设"部分
2. 开始实施
3. 在创建 PR 前使用 /code-review
查看规范:读取 @requirements/[文件夹]/06-requirements-spec.md
显示当前需求收集进度并从最后一个问题继续。
读取 requirements/.current-requirement
如果没有活动需求:
没有活动的需求收集会话。
选项:
- 开始新的:/requirements-start [描述]
- 列出所有:/requirements-list
如果存在活动需求:
metadata.json 读取当前阶段和进度活动需求:[名称]
开始时间:[时间前]
阶段:[探索/上下文/详细/完成]
进度:[X/Y] 个问题已回答
--- 最近进度 ---
[显示最近3个已回答的问题及其回答]
--- 下一个问题 ---
[显示下一个未回答的问题及其默认值]
输入 'yes'、'no' 或 'idk'(使用默认值)
从文件中读取下一个未回答的问题:
01-discovery-questions.md04-detail-questions.md向用户展示问题及默认值
接受响应:
yes / y - 肯定no / n - 否定idk / default / d - 使用默认值暂时不要记录答案 - 等到该阶段所有问题都提出后
该阶段所有问题回答完毕后:
02-discovery-answers.md 或 05-detail-answers.md)metadata.json 进度进入下一个问题或阶段
探索(阶段 2) -> 上下文(阶段 3):
02-discovery-answers.md03-context-findings.md上下文(阶段 3) -> 详细(阶段 4):
04-detail-questions.md详细(阶段 4) -> 完成(阶段 5):
05-detail-answers.md06-requirements-spec.md 中生成最终规范.current-requirement继续:只需回答问题
跳过阶段:/requirements-end(使用当前信息生成规范)
查看全部:/requirements-current
列出所有:/requirements-list
显示活动需求的详细信息。这是只读的——它不会继续收集。
读取 requirements/.current-requirement
如果没有活动需求:
没有活动需求。
最近完成的需求:
[显示最近3个已完成的需求及其日期]
开始新的:/requirements-start [描述]
列出所有:/requirements-list
对于活动需求:
requirements/[时间戳]-[slug]/
├── 00-initial-request.md # 原始用户请求
├── 01-discovery-questions.md # 上下文探索问题
├── 02-discovery-answers.md # 用户的答案(所有问题提出后)
├── 03-context-findings.md # AI 的代码库分析
├── 04-detail-questions.md # 专家需求问题
├── 05-detail-answers.md # 用户的详细答案
├── 06-requirements-spec.md # 最终需求文档
└── metadata.json # 状态跟踪
===========================================
当前需求:[名称]
===========================================
持续时间:[自开始以来的时间]
阶段:[初始设置/探索/上下文/详细/完成]
进度:[已回答总数]/[问题总数]
-------------------------------------------
初始请求
-------------------------------------------
[来自 00-initial-request.md 的内容]
-------------------------------------------
代码库概览(阶段 1)
-------------------------------------------
架构:TanStack Start + TRPC + PostgreSQL + Drizzle
已识别的相关模块:
- [模块 1]:[相关原因]
- [模块 2]:[相关原因]
-------------------------------------------
探索阶段(5/5 完成)
-------------------------------------------
Q1: 这将是组织范围的吗?是
Q2: 用户将通过新页面交互吗?是
Q3: 这需要新的数据库表吗?否
Q4: 这将与外部 API 集成吗?否(默认)
Q5: 这应对所有成员开放吗?是
-------------------------------------------
上下文发现
-------------------------------------------
发现的类似功能:
- [功能] 位于 [路径] - [需要遵循的模式]
需要修改的文件:
- apps/web-app/src/[模块]/trpc/[路由器].ts
- packages/db/src/schema.ts(如果需要)
已识别的模式:
- TRPC:[模式参考]
- 前端:[模式参考]
-------------------------------------------
专家问题(2/5 已回答)
-------------------------------------------
Q1: 扩展现有的 UserRouter?是
Q2: 遵循 ProjectSettings 的模式?是
Q3: 在 TanStack Query 中缓存数据?[待定]
Q4: 添加端到端测试?[待定]
Q5: 在客户端和服务器端都进行验证?[待定]
-------------------------------------------
下一步操作
-------------------------------------------
当前:正在回答专家问题 Q3
选项:
- 继续:/requirements-status
- 提前结束:/requirements-end
- 查看全部:/requirements-list
/requirements-status 继续回答问题显示所有需求及其状态和摘要。
检查 requirements/.current-requirement 以获取活动需求
列出 requirements/ 目录中的所有文件夹
对于每个需求文件夹:
metadata.json排序方式:
需求文档
--- 活动 ---
[名称]
阶段:探索 (3/5) | 开始时间:30分钟前
请求:[00-initial-request.md 的第一行]
下一步:使用 /requirements-status 继续
--- 完成 ---
2025-01-26-0900-dark-mode-toggle
状态:准备实施
已回答问题:10
摘要:[规范概述的第一行]
规范:requirements/2025-01-26-0900-dark-mode-toggle/06-requirements-spec.md
2025-01-25-1400-export-reports
状态:已实施
已回答问题:10
摘要:带过滤功能的 PDF/CSV 导出
--- 未完成 ---
2025-01-24-1100-notification-system
状态:在详细阶段暂停 (2/5)
最后活动时间:2天前
恢复:/requirements-status
--- 统计 ---
总计:4 个需求
- 完成:2
- 活动:1
- 未完成:1
如果未完成 > 7 天,则标记:
2025-01-15-old-feature(陈旧 - 8 天)
考虑:恢复或使用 /requirements-end 取消
对于已完成的需求,检查是否存在:
快捷操作:
- 查看活动详情:/requirements-current
- 恢复未完成:/requirements-status
- 开始新的:/requirements-start [描述]
- 结束/取消活动:/requirements-end
如果没有需求存在:
未找到需求。
开始为新功能收集需求:
/requirements-start [功能描述]
示例:
/requirements-start 在设置中添加深色模式切换
当偏离需求收集规则时的快速纠正。
检查 requirements/.current-requirement
如果没有活动需求:
根据当前上下文显示提醒:
🔔 需求收集提醒
您正在收集需求:活动需求
当前阶段:[初始设置/上下文探索/定向上下文/专家需求]
进度:[X/Y 个问题]
📋 特定阶段规则:
阶段 2 - 上下文探索:
- ✅ 提出5个关于问题空间的是/否问题
- ✅ 面向产品经理的问题(无需代码知识)
- ✅ 专注于用户工作流,而非技术细节
- ✅ 在提出任何问题前写入所有问题
- ✅ 仅在所有问题提出后才记录答案
阶段 3 - 定向上下文(自主):
- ✅ 使用 RepoPrompt 工具搜索和阅读代码
- ✅ 分析类似功能和模式
- ✅ 在上下文文件中记录发现
- ❌ 此阶段无需用户交互
阶段 4 - 专家需求:
- ✅ 提出5个详细的是/否问题
- ✅ 问题应像在与不懂代码的产品经理交谈
- ✅ 澄清预期的系统行为
- ✅ 相关时引用具体文件
- ✅ 仅在所有问题提出后才记录答案
🚫 通用规则:
1. ❌ 不要开始编码或实施
2. ❌ 不要提出开放式问题
3. ❌ 在阶段内所有问题提出前不要记录答案
4. ❌ 每个阶段不要超过5个问题
📍 当前状态:
- 最后一个问题:[显示最后一个问题]
- 用户响应:[待定/已回答]
- 下一步操作:[继续第 X 个问题,共5个]
请继续当前问题或从文件中读取下一个问题。
提出了开放式问题:
"让我重新表述为一个是/否问题..."
提出了多个问题:
"让我一次提出一个问题..."
开始实施:
"抱歉。让我继续需求收集..."
未提供默认值:
"让我为那个问题添加一个默认值..."
这些规则适用于需求收集的所有阶段:
apps/web-app/src/[模块]/trpc/,而非通用占位符每周安装量
55
仓库
GitHub 星标数
3
首次出现
2026年2月28日
安全审计
安装于
opencode55
claude-code53
codex31
gemini-cli30
amp30
cline30
This skill covers a structured 5-phase requirements gathering workflow for new features. It guides you through initial setup and codebase analysis, context discovery questions, autonomous context gathering, expert requirements questions, and final requirements documentation — producing a comprehensive spec ready for implementation.
Begin gathering requirements for a new feature using this structured 5-phase process.
date "+%Y-%m-%d-%H%M"requirements/[timestamp]-[slug]/00-initial-request.md with the user's requestmetadata.json with status trackingrequirements/.current-requirement with folder nameapps/web-app/ - TanStack Start frontend + TRPC serverpackages/ - Shared packages (db, services, common, logger, agents)Generate 5 yes/no questions to understand the problem space.
Focus areas for the project:
Question format:
## Q1: Will this feature be organization-scoped (vs user-scoped)?
**Default if unknown:** Yes (most project features are org-scoped)
## Q2: Will users interact with this through a new page/route?
**Default if unknown:** Yes (most features have dedicated UI)
## Q3: Does this require new database tables?
**Default if unknown:** No (prefer extending existing schema)
## Q4: Will this integrate with external services/APIs?
**Default if unknown:** No (unless explicitly mentioned)
## Q5: Should this be accessible to all org members or only admins?
**Default if unknown:** All members (with appropriate role checks)
Process:
01-discovery-questions.md with smart defaults02-discovery-answers.mdmetadata.jsonAfter discovery questions answered:
Search relevant code using available tools:
apps/web-app/src/apps/web-app/src/*/trpc/packages/db/src/schema.tsapps/web-app/src/shared/Analyze patterns from similar features:
Document findings in 03-context-findings.md:
## Codebase Analysis
### Similar Features Found
- [Feature name] at [path] - [why relevant]
### Relevant Files to Modify/Extend
- `apps/web-app/src/[module]/trpc/[router].ts` - [what to add]
- `packages/db/src/schema.ts` - [new tables if needed]
### Patterns to Follow
- TRPC router pattern from [example]
- TanStack route pattern from [example]
- Form pattern from [example]
### Technical Constraints
- [Any limitations discovered]
### Integration Points
- [Services/modules this will interact with]
Now ask questions like a senior developer who knows the project codebase.
Focus on clarifying system behavior:
## Q1: Should we extend the existing [Router]Router at [path]?
**Default if unknown:** Yes (maintains consistency)
## Q2: For the UI, should we follow the pattern from [similar feature]?
**Default if unknown:** Yes (established pattern)
## Q3: Should this data be cached in TanStack Query or fetched fresh?
**Default if unknown:** Cached (standard for most data)
## Q4: Should we add E2E tests for this flow?
**Default if unknown:** Yes (if user-facing feature)
## Q5: Should validation happen client-side, server-side, or both?
**Default if unknown:** Both (Zod on frontend, TRPC input validation on backend)
Process:
04-detail-questions.md05-detail-answers.md after all askedGenerate comprehensive spec in 06-requirements-spec.md:
# Requirements Specification: [Name]
Generated: [timestamp]
Status: Complete
## Overview
[Problem statement and solution summary]
## Functional Requirements
### User Stories
- As a [role], I want to [action] so that [benefit]
### Acceptance Criteria
- [ ] [Testable criterion]
## Technical Requirements
### Database Changes
- New table: [name] in `packages/db/src/schema.ts`
- Fields: [list with types]
### TRPC Router
- Location: `apps/web-app/src/[module]/trpc/[name].ts`
- Procedures: [list]
- Use `protectedMemberAccessProcedure` for org-scoped operations
### Frontend Routes
- New route: `/app/[path]`
- Components: [list]
- Pattern to follow: [reference]
### Files to Create/Modify
1. `packages/db/src/schema.ts` - Add table
2. `apps/web-app/src/[module]/trpc/[name].ts` - Add router
3. `apps/web-app/src/routes/app/[path]/route.tsx` - Add page
## Implementation Notes
### Patterns to Follow
- TRPC: See `trpc-patterns` skill
- Frontend: See `tanstack-frontend` skill
### Testing
- Unit tests in `packages/services/src/__tests__/`
- E2E tests in `apps/web-app/e2e/`
## Assumptions
[Any defaults used for unanswered questions]
{
"id": "feature-slug",
"started": "ISO-8601-timestamp",
"lastUpdated": "ISO-8601-timestamp",
"status": "active",
"phase": "discovery|context|detail|complete",
"progress": {
"discovery": { "answered": 0, "total": 5 },
"detail": { "answered": 0, "total": 5 }
},
"contextFiles": ["paths/of/files/analyzed"],
"relatedFeatures": ["similar features found"]
}
/requirements-statusFinalize the current requirement gathering session.
Read requirements/.current-requirement
If no active requirement:
No active requirement to end.
Use /requirements-list to see all requirements.
Show current status and ask user intent:
Ending requirement: [name]
Current phase: [phase] ([X/Y] complete)
What would you like to do?
1. Generate spec with current information
2. Mark as incomplete for later
3. Cancel and delete
Choose (1/2/3):
Based on choice:
06-requirements-spec.mdmetadata.json status to "complete"Spec format:
# Requirements Specification: [Name]
Generated: [timestamp]
Status: Complete with [N] assumptions
## Overview
[Problem statement from initial request]
[Solution summary based on answers]
## Functional Requirements
[Based on answered questions]
### User Stories
- As a [role], I want to [action] so that [benefit]
### Acceptance Criteria
- [ ] [Criterion based on answers]
## Technical Requirements
### Database Changes
[If applicable based on answers]
### TRPC Router
- Location: `apps/web-app/src/[module]/trpc/`
- Procedures needed: [list]
### Frontend Routes
- Path: `/app/[route]`
- Components: [list]
### Files to Create/Modify
[Specific paths in project codebase]
## Implementation Notes
### Patterns to Follow
- TRPC: Load skill `trpc-patterns`
- Frontend: Load skill `tanstack-frontend`
### Validation
- Run `bun run check` after implementation
- Add E2E tests if user-facing
## Assumptions (REVIEW THESE)
[List any defaults used for unanswered questions]
- ASSUMED: [Question] -> [Default used] because [reason]
## Next Steps
1. Review assumptions above
2. Start implementation
3. Run `/code-review` before PR
Update metadata.json:
{
"status": "incomplete",
"lastUpdated": "[timestamp]",
"pausedAt": "[phase]",
"remainingQuestions": [N]
}
Create summary of progress
Note what's still needed
Output:
Requirement marked as incomplete.
Progress saved:
- Phase: [current phase]
- Questions answered: [X/Y]
- Last activity: [now]
To resume later: /requirements-status
Confirm deletion:
Are you sure you want to delete this requirement?
All gathered information will be lost.
Type 'yes' to confirm:
If confirmed:
.current-requirementOutput:
Requirement cancelled and deleted.
Start fresh: /requirements-start [description]
After generating spec (Option 1):
Clear .current-requirement
Show summary:
Requirements complete!
Spec saved: requirements/[folder]/06-requirements-spec.md
Next steps:
1. Review the spec, especially ASSUMPTIONS section
2. Start implementation
3. Use /code-review before creating PR
View spec: Read @requirements/[folder]/06-requirements-spec.md
Show current requirement gathering progress and continue from last question.
Read requirements/.current-requirement
If no active requirement:
No active requirement gathering session.
Options:
- Start new: /requirements-start [description]
- List all: /requirements-list
If active requirement exists:
metadata.json for current phase and progressActive Requirement: [name]
Started: [time ago]
Phase: [Discovery/Context/Detail/Complete]
Progress: [X/Y] questions answered
--- Recent Progress ---
[Show last 3 answered questions with responses]
--- Next Question ---
[Show next unanswered question with default]
Type 'yes', 'no', or 'idk' (uses default)
Read next unanswered question from file:
01-discovery-questions.md04-detail-questions.mdPresent to user with default
Accept response:
yes / y - Affirmativeno / n - Negativeidk / default / d - Use default valueDiscovery (Phase 2) - > Context (Phase 3):
02-discovery-answers.md03-context-findings.mdContext (Phase 3) - > Detail (Phase 4):
04-detail-questions.mdDetail (Phase 4) - > Complete (Phase 5):
05-detail-answers.md06-requirements-spec.md.current-requirementContinue: Just respond to the question
Skip phase: /requirements-end (generates spec with current info)
View all: /requirements-current
List all: /requirements-list
Display detailed information about the active requirement. This is view-only — it does not continue gathering.
Read requirements/.current-requirement
If no active requirement:
No active requirement.
Recent completed requirements:
[Show last 3 completed with dates]
Start new: /requirements-start [description]
List all: /requirements-list
For active requirement:
requirements/[timestamp]-[slug]/
├── 00-initial-request.md # Original user request
├── 01-discovery-questions.md # Context discovery questions
├── 02-discovery-answers.md # User's answers (after all asked)
├── 03-context-findings.md # AI's codebase analysis
├── 04-detail-questions.md # Expert requirements questions
├── 05-detail-answers.md # User's detailed answers
├── 06-requirements-spec.md # Final requirements document
└── metadata.json # Status tracking
===========================================
Current Requirement: [name]
===========================================
Duration: [time since start]
Phase: [Initial Setup/Discovery/Context/Detail/Complete]
Progress: [total answered]/[total questions]
-------------------------------------------
INITIAL REQUEST
-------------------------------------------
[Content from 00-initial-request.md]
-------------------------------------------
CODEBASE OVERVIEW (Phase 1)
-------------------------------------------
Architecture: TanStack Start + TRPC + PostgreSQL + Drizzle
Relevant modules identified:
- [module 1]: [why relevant]
- [module 2]: [why relevant]
-------------------------------------------
DISCOVERY PHASE (5/5 complete)
-------------------------------------------
Q1: Will this be organization-scoped? YES
Q2: Will users interact through a new page? YES
Q3: Does this require new database tables? NO
Q4: Will this integrate with external APIs? NO (default)
Q5: Should this be accessible to all members? YES
-------------------------------------------
CONTEXT FINDINGS
-------------------------------------------
Similar Features Found:
- [Feature] at [path] - [pattern to follow]
Files to Modify:
- apps/web-app/src/[module]/trpc/[router].ts
- packages/db/src/schema.ts (if needed)
Patterns Identified:
- TRPC: [pattern reference]
- Frontend: [pattern reference]
-------------------------------------------
EXPERT QUESTIONS (2/5 answered)
-------------------------------------------
Q1: Extend existing UserRouter? YES
Q2: Follow pattern from ProjectSettings? YES
Q3: Cache data in TanStack Query? [PENDING]
Q4: Add E2E tests? [PENDING]
Q5: Validation on both client and server? [PENDING]
-------------------------------------------
NEXT ACTION
-------------------------------------------
Current: Answering expert question Q3
Options:
- Continue: /requirements-status
- End early: /requirements-end
- View all: /requirements-list
/requirements-status to continue answering questionsDisplay all requirements with their status and summaries.
Check requirements/.current-requirement for active requirement
List all folders in requirements/ directory
For each requirement folder:
metadata.jsonSort by:
Requirements Documentation
--- ACTIVE ---
[name]
Phase: Discovery (3/5) | Started: 30m ago
Request: [first line of 00-initial-request.md]
Next: Continue with /requirements-status
--- COMPLETE ---
2025-01-26-0900-dark-mode-toggle
Status: Ready for implementation
Questions answered: 10
Summary: [first line of spec overview]
Spec: requirements/2025-01-26-0900-dark-mode-toggle/06-requirements-spec.md
2025-01-25-1400-export-reports
Status: Implemented
Questions answered: 10
Summary: PDF/CSV export with filtering
--- INCOMPLETE ---
2025-01-24-1100-notification-system
Status: Paused at Detail phase (2/5)
Last activity: 2 days ago
Resume: /requirements-status
--- STATISTICS ---
Total: 4 requirements
- Complete: 2
- Active: 1
- Incomplete: 1
Mark if incomplete > 7 days:
2025-01-15-old-feature (STALE - 8 days)
Consider: Resume or cancel with /requirements-end
For complete requirements, check if there are:
Quick Actions:
- View active detail: /requirements-current
- Resume incomplete: /requirements-status
- Start new: /requirements-start [description]
- End/cancel active: /requirements-end
If no requirements exist:
No requirements found.
Start gathering requirements for a new feature:
/requirements-start [feature description]
Example:
/requirements-start add dark mode toggle to settings
Quick correction when deviating from requirements gathering rules.
Check requirements/.current-requirement
If no active requirement:
Display reminder based on current context:
🔔 Requirements Gathering Reminder
You are gathering requirements for: [active-requirement]
Current phase: [Initial Setup/Context Discovery/Targeted Context/Expert Requirements]
Progress: [X/Y questions]
📋 PHASE-SPECIFIC RULES:
Phase 2 - Context Discovery:
- ✅ Ask 5 yes/no questions about the problem space
- ✅ Questions for product managers (no code knowledge required)
- ✅ Focus on user workflows, not technical details
- ✅ Write ALL questions before asking any
- ✅ Record answers ONLY after all questions asked
Phase 3 - Targeted Context (Autonomous):
- ✅ Use RepoPrompt tools to search and read code
- ✅ Analyze similar features and patterns
- ✅ Document findings in context file
- ❌ No user interaction during this phase
Phase 4 - Expert Requirements:
- ✅ Ask 5 detailed yes/no questions
- ✅ Questions as if speaking to PM who knows no code
- ✅ Clarify expected system behavior
- ✅ Reference specific files when relevant
- ✅ Record answers ONLY after all questions asked
🚫 GENERAL RULES:
1. ❌ Don't start coding or implementing
2. ❌ Don't ask open-ended questions
3. ❌ Don't record answers until ALL questions in phase are asked
4. ❌ Don't exceed 5 questions per phase
📍 CURRENT STATE:
- Last question: [Show last question]
- User response: [pending/answered]
- Next action: [Continue with question X of 5]
Please continue with the current question or read the next one from the file.
Open-ended question asked:
"Let me rephrase as a yes/no question..."
Multiple questions asked:
"Let me ask one question at a time..."
Implementation started:
"I apologize. Let me continue with requirements gathering..."
No default provided:
"Let me add a default for that question..."
These rules apply across all phases of requirements gathering:
apps/web-app/src/[module]/trpc/ not generic placeholdersWeekly Installs
55
Repository
GitHub Stars
3
First Seen
Feb 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode55
claude-code53
codex31
gemini-cli30
amp30
cline30
任务估算指南:敏捷开发故事点、计划扑克、T恤尺码法详解
10,500 周安装
JavaScript/TypeScript应用安全最佳实践:OWASP审计与漏洞检测指南
124 周安装
Java专家技能:精通Java 21+、Spring框架、企业级开发与最佳实践
126 周安装
Three.js开发指南:React Three Fiber最佳实践、性能优化与3D场景管理
124 周安装
演讲幻灯片内容创作指南:掌握陈述式、提问式标题与极简设计原则
123 周安装
Groove Utilities Memory Install:创建和管理.groove内存目录的自动化工具
125 周安装
scikit-learn 机器学习教程:Python分类、回归、聚类、降维与模型评估指南
125 周安装
DO NOT record answer yet - wait until ALL questions in phase are asked
After ALL questions answered:
02-discovery-answers.md or 05-detail-answers.md)metadata.json progressMove to next question or phase