计划命令¶
此命令调用 planner 代理,在编写任何代码之前创建全面的实施计划。
此命令的作用¶
- 重申需求 - 明确需要构建的内容
- 识别风险 - 提出潜在问题和阻塞
- 创建分阶段计划 - 将实现拆分为阶段
- 等待确认 - 在继续之前必须获得用户批准
何时使用¶
在以下情况下使用 /plan:
- 正在启动一个新功能
- 将进行重大架构变更
- 正在处理复杂重构
- 多个文件/组件将受到影响
- 需求不清晰或存在歧义
工作原理¶
planner 代理将:
- 分析请求 并以清晰方式重申需求
- 拆分为阶段,包含具体且可执行的步骤
- 识别组件之间的依赖关系
- 评估风险 和可能的阻塞
- 估算复杂度(High/Medium/Low)
- 呈现计划 并等待您的明确确认
使用示例¶
User: /plan I need to add real-time notifications when markets resolve
Agent (planner):
# Implementation Plan: Real-Time Market Resolution Notifications
## Requirements Restatement
- Send notifications to users when markets they're watching resolve
- Support multiple notification channels (in-app, email, webhook)
- Ensure notifications are delivered reliably
- Include market outcome and user's position result
## Implementation Phases
### Phase 1: Database Schema
- Add notifications table with columns: id, user_id, market_id, type, status, created_at
- Add user_notification_preferences table for channel preferences
- Create indexes on user_id and market_id for performance
### Phase 2: Notification Service
- Create notification service in lib/notifications.ts
- Implement notification queue using BullMQ/Redis
- Add retry logic for failed deliveries
- Create notification templates
### Phase 3: Integration Points
- Hook into market resolution logic (when status changes to "resolved")
- Query all users with positions in market
- Enqueue notifications for each user
### Phase 4: Frontend Components
- Create NotificationBell component in header
- Add NotificationList modal
- Implement real-time updates via Supabase subscriptions
- Add notification preferences page
## Dependencies
- Redis (for queue)
- Email service (SendGrid/Resend)
- Supabase real-time subscriptions
## Risks
- HIGH: Email deliverability (SPF/DKIM required)
- MEDIUM: Performance with 1000+ users per market
- MEDIUM: Notification spam if markets resolve frequently
- LOW: Real-time subscription overhead
## Estimated Complexity: MEDIUM
- Backend: 4-6 hours
- Frontend: 3-4 hours
- Testing: 2-3 hours
- Total: 9-13 hours
**WAITING FOR CONFIRMATION**: Proceed with this plan? (yes/no/modify)
重要说明¶
关键:在您明确使用 “yes”、“proceed” 或类似肯定答复确认计划之前,planner 代理 不会 编写代码。
如果想修改,请回复: - “修改:[您的修改]” - “不同方法:[替代方案]” - “跳过阶段 2,先做阶段 3”
计划后:
- 使用 /tdd 以测试驱动开发方式实现
- 如果发生构建错误,使用 /build-fix
- 使用 /code-review 审查已完成的实现
相关代理¶
此命令调用由 ECC 提供的 planner 代理。
对于手动安装,源文件位于:
agents/planner.md
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 ev/ECC