用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Changhochien/oh-my-pi --skill plan命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | plan |
| description | Strategic planning with task breakdown and risk assessment. Use before starting complex work. |
| argument-hint | <task or feature to plan> |
| level | 3 |
Create a structured implementation plan with task breakdown and risk assessment.
/skill:plan "add real-time notifications"
/skill:plan "migrate to microservices"
/skill:plan "implement payment processing"
Explorer (haiku): Map relevant codebase areas
Architect (opus): Propose architecture
Planner (sonnet): Decompose into actionable tasks
Planner (sonnet): Identify risks and mitigations
Create ADR if significant choice:
## ADR-001: Use WebSocket for Real-time Notifications
**Status:** Accepted
**Date:** 2024-01-15
**Decision:** Use WebSocket (Socket.io) for real-time notifications.
**Context:**
- Need push notifications to clients
- Low latency required (< 100ms)
- Client is web browser
**Options Considered:**
| Option | Pros | Cons | Decision |
|--------|------|------|----------|
| WebSocket | Low latency, full duplex | Browser support varies | **Chosen** |
| Server-Sent Events | Simple, HTTP/2 | No client→server | Rejected |
| Polling | Simple | High latency, wasteful | Rejected |
**Consequences:**
- Need WebSocket server (can reuse existing Express server)
- Need reconnection handling on client
- Consider Redis adapter for scaling
# Implementation Plan: Real-time Notifications
**Created:** 2024-01-15
**Estimated Duration:** 3 days
**Stakeholders:** Backend team
## Goal
Add real-time notifications so users receive instant updates without refreshing.
## Technical Approach
### Architecture
Client ←→ WebSocket Server ←→ Redis Pub/Sub ←→ Notification Service ↓ PostgreSQL (persist)
### Components
| Component | Responsibility |
|-----------|---------------|
| WebSocket Server | Manage connections, broadcast |
| Redis | Pub/Sub for scaling |
| Notification Service | Create, store notifications |
| Client SDK | Handle reconnection, display |
## Tasks
### Day 1: Foundation
| Task | Owner | Hours | Dependencies |
|------|-------|-------|-------------|
| Set up Socket.io server | executor | 2 | None |
| Add Redis adapter | executor | 1 | Socket.io |
| Design notification schema | architect | 1 | None |
| Create notification model | executor | 2 | Schema |
### Day 2: Backend
| Task | Owner | Hours | Dependencies |
|------|-------|-------|-------------|
| Implement notification service | executor | 4 | Model |
| Add subscription handling | executor | 2 | Socket.io |
| Write service tests | tester | 3 | Service |
### Day 3: Frontend + Integration
| Task | Owner | Hours | Dependencies |
|------|-------|-------|-------------|
| Integrate Socket.io client | executor | 3 | Server |
| Build notification UI | executor | 2 | Client |
| E2E tests | tester | 2 | UI |
| Documentation | writer | 1 | All |
## Critical Path
Socket.io → Redis → Service → Client Integration → E2E 3h 2h 4h 3h 2h Total: 14h (3 days)
## Risks
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| WebSocket scaling | Medium | High | Use Redis adapter, horizontal scaling plan |
| Browser compatibility | Low | Medium | Test on Chrome, Firefox, Safari |
| Reconnection complexity | Medium | Low | Implement exponential backoff |
| Stale connections | Low | Medium | Heartbeat mechanism |
## Parallel Opportunities
- Backend (Day 2) and client planning can happen in parallel after Day 1
- Tests can run alongside implementation
## Definition of Done
### Functional
- [ ] User receives notification in < 500ms
- [ ] Notifications persist across page reloads
- [ ] Reconnection works after network loss
### Technical
- [ ] 80%+ test coverage on backend
- [ ] E2E tests for critical paths
- [ ] TypeScript strict mode
- [ ] No console errors
### Non-functional
- [ ] Works on Chrome, Firefox, Safari
- [ ] Handles 1000 concurrent connections
- [ ] Graceful degradation if WebSocket unavailable
## Next Steps
1. [ ] Review this plan
2. [ ] Approve or request changes
3. [ ] Execute: `/skill:team 3:executor "implement notifications"`
4. [ ] Or: `/skill:ralph "implement notifications"`
基于 SOC 职业分类