staruhub/ClaudeSkills / skills/Geek-skills-xuefeng-method
xuefeng-method
Verified雪峰式AI-Native产品开发方法论。适用于:(1) 用户行为开放、不可穷举的AI-native产品(AI日历、AI助手、AI推荐、对话式产品等),(2) 强模型依赖型场景,AI驱动核心决策而非仅辅助,(3) 多专精Agent架构设计与分工,(4) 上线后快速校准、行为审计与漂移检测,(5) 模型选择和智能路由策略,(6) 概率性输出的质量评估。触发场景包括"AI-native产品怎么做"、"用户行为不可预测怎么办"、"多agent怎么分工"、"模型漂移怎么处理"、"校准到95%太难了"、"唯快不破"、"怎么选模型"、"agent并行分工"、"AI产品上线后怎么迭代"。注意:如果产品是场景明确、边界可定义的+AI类型,请改用 keqian-method skill。即使用户没有明确说"AI-native",但在讨论AI驱动决策、用户行为不可预测、概率性输出等话题时也应触发。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.9 KB |
| evals/routing-evals.json | config | 1.8 KB |
| references/behavioral-clusters.md | markdown | 3.4 KB |
| references/drift-detection.md | markdown | 4.4 KB |
| references/model-routing.md | markdown | 1.1 KB |
| references/operating-playbook.md | markdown | 2.1 KB |
references/behavioral-clusters.md
View on GitHub# 行为模式簇设计方法
## 核心思想
穷举不可行时,用聚类替代枚举。
不试图覆盖每一个用户case,而是识别5-15个典型行为模式,
每个模式对应一套AI响应策略。
---
## 设计流程
### Step 1: 收集原始行为数据
```
来源(按优先级):
1. 真实用户日志(最有价值)
2. 内部团队模拟使用
3. 竞品用户评论分析
4. 领域专家访谈
5. AI生成的模拟场景(最后才用)
```
### Step 2: 行为聚类
将原始行为按以下维度聚类:
| 维度 | 说明 | 示例 |
|------|------|------|
| 意图类型 | 用户想达成什么 | 创建/查询/修改/删除 |
| 交互复杂度 | 单轮 vs 多轮 | "明天下午3点开会" vs "帮我找个大家都有空的时间" |
| 确定性程度 | 用户需求有多明确 | 精确指令 vs 模糊意图 |
| 容错要求 | 出错的后果 | 低风险浏览 vs 高风险交易 |
| 上下文依赖 | 需要多少历史信息 | 无状态 vs 多轮对话 |
### Step 3: 定义模式簇
每个模式簇包含:
```markdown
## 模式簇 #N: [名称]
**典型用户行为**:[描述]
**频率估计**:[高/中/低]
**AI响应策略**:[具体策略]
**置信度要求**:[高/中/低]
**降级方案**:[AI不确定时怎么办]
**验证属性**:[怎么判断AI响应合格]
```
### Step 4: 覆盖度评估
```
目标:5-15个模式簇覆盖80%+的真实用户行为
方法:用真实日志检查每条记录能否归入某个模式簇
缺口:无法归类的行为 → 要么新增模式簇,要么归入"兜底降级"
```
---
## 示例:AI日历管理产品
### 模式簇1: 精确指令
- 行为:"明天下午3点和张三在会议室A开会"
- 策略:直接执行,确认一次
- 置信度:高
- 降级:无需
### 模式簇2: 模糊意图
- 行为:"帮我约个时间和团队开周会"
- 策略:推荐3个可选时间段,等用户选择
- 置信度:中
- 降级:列出所有人的空闲时段,让用户自选
### 模式簇3: 冲突协调
- 行为:"下午的会能不能改?和另一个撞了"
- 策略:分析冲突,提出调整方案
- 置信度:中
- 降级:展示冲突详情,让用户手动调整
### 模式簇4: 习惯推测
- 行为:"老规矩"、"跟上周一样"
- 策略:基于历史模式推测,确认后执行
- 置信度:低(推测可能出错)
- 降级:明确询问具体需求
### 模式簇5: 多人协调
- 行为:"找个大家都有空的时间"
- 策略:多日历交叉查询,推荐最优方案
- 置信度:中
- 降级:列出每人空闲时段交集
### 兜底降级
- 无法归类的行为 → "我不太确定你的需求,你可以试试直接在日历上操作,或者告诉我更多细节?"
---
## 模式簇的迭代
模式簇不是一成不变的:
```
上线后
→ 收集无法归类的行为日志
→ 累积到一定量后聚类分析
→ 发现新模式 → 新增模式簇
→ 发现模式变化 → 更新模式簇策略
→ 每月review一次模式簇覆盖度
```
---
## 与穷举的对比
| 维度 | 穷举(克谦) | 模式簇(雪峰) |
|------|------------|--------------|
| 覆盖度 | 100%(理论上) | 80-90%(实际) |
| 维护成本 | 随case数线性增长 | 随模式数对数增长 |
| 新case处理 | 需要人工添加 | 可能自动归入已有模式 |
| 质量保证 | 每个case有断言 | 每个模式有属性检查 |
| 适用场景 | 输入空间有限 | 输入空间开放 |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |