关于 release-manager
Release Manager 是帮助团队控制软件变更发布过程的技能,适用于分阶段开放功能。内容涵盖渐进式发布、功能标志、部署策略、监控、沟通与回滚检查。
主要功能
- 01渐进式发布规划
- 02功能标志配置
- 03蓝绿与金丝雀部署策略
- 04发布监控与指标
- 05回滚与发布检查清单
适用场景
- 01先向小范围用户发布功能
- 02监控金丝雀部署
- 03准备回滚方案
- 04协调发布检查与沟通
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ daffy0208/ ai-dev-standards --skill release-manager安装后在 Claude Code 中输入/release-manager确认已加载。
附带文件manifest.yaml
详细介绍
发布经理
通过渐进式发布安全地上线功能。
渐进式发布策略
Phase 1 - Internal (Day 1):
- 100% to internal team
- Test thoroughly
- Fix critical bugs
Phase 2 - Beta (Day 2-3):
- 5% to beta users
- Monitor errors/performance
- Collect feedback
Phase 3 - Gradual (Day 4-7):
- 25% of users
- Watch metrics closely
- 50% of users if good
- 100% if still good
Phase 4 - Full Release:
- 100% of users
- Remove feature flag
- Announce publicly
功能标志
// Feature flag implementation
const featureFlags = {
newDashboard: {
enabled: true,
rollout: 0.25, // 25% of users
userGroups: ['beta-testers'], // Always on for beta
}
}
function isFeatureEnabled(feature, user) {
const flag = featureFlags[feature]
// Check user group
if (user.groups.some(g => flag.userGroups.includes(g))) {
return true
}
// Check rollout percentage
const hash = hashUserId(user.id)
return (hash % 100) < (flag.rollout * 100)
}
// Usage
{isFeatureEnabled('newDashboard', user) ? (
<NewDashboard />
) : (
<OldDashboard />
)}
部署策略
蓝绿部署
Process: 1. Deploy to "green" environment
2. Test green thoroughly
3. Switch traffic to green
4. Keep blue as rollback
Pros: Instant rollback
Cons: 2x infrastructure cost
金丝雀发布
Process: 1. Deploy to 5% of servers
2. Monitor for 1 hour
3. If good, deploy to 25%
4. Monitor for 1 hour
5. If good, deploy to 100%
Pros: Gradual, safe
Cons: Slower rollout
回滚计划
Criteria for Rollback:
- Error rate > 1%
- Performance degradation > 20%
- Critical bug discovered
- Negative user feedback
Rollback Process: 1. Disable feature flag immediately
2. Notify team
3. Investigate issue
4. Fix and redeploy
发布检查清单
发布前
- 代码已审查
- 测试通过
- 已在预发布环境测试
- 已配置功能标志
- 回滚计划已就绪
- 已设置监控告警
发布期间
- 先部署至 5%
- 关注错误率
- 监控性能
- 查看用户反馈
- 逐步扩大范围
发布后
- 监控 24 小时
- 收集反馈
- 移除功能标志
- 记录经验
监控
Key Metrics During Release:
- Error rate
- Response time p95
- CPU/memory usage
- User-reported issues
Alerts:
- Error rate > 1% → Pause rollout
- Response time > 2s → Investigate
- Memory spike > 90% → Rollback
沟通
Internal:
- Slack announcement
- Deploy log updated
- Engineering team notified
External:
- Changelog updated
- Email to power users (if major)
- Blog post (if significant)
总结
安全发布:
- ✅ 从小范围开始(5%)
- ✅ 密切监控
- ✅ 随时回滚
- ✅ 处处使用功能标志
- ✅ 记录流程
评论
支持 Markdown