mobile-instinct-v2
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMobile Instinct v2 - Observational Learning
Mobile Instinct v2 - 观察式学习
Cross-session observational learning that extracts patterns from your development workflow over time.
跨会话观察式学习,可从你的长期开发工作流中提取模式。
Overview
概述
V2 instincts observe your sessions and extract patterns that emerge across multiple development activities. Unlike V1's immediate capture, V2 looks for:
- Recurring architectural decisions
- Problem-solving approaches
- Code organization patterns
- Testing strategies
V2本能功能观察你的开发会话,并提取在多个开发活动中出现的模式。与V1的即时捕获不同,V2重点关注:
- 重复出现的架构决策
- 问题解决方法
- 代码组织模式
- 测试策略
Session Analysis
会话分析
At session end, V2 analyzes:
- Code changes: What was modified
- Problem context: What issue was being solved
- Solution approach: How it was resolved
- Dependencies: What libraries/techniques were used
在会话结束时,V2会分析:
- 代码变更:修改了哪些内容
- 问题背景:正在解决的问题是什么
- 解决方案:如何解决问题
- 依赖项:使用了哪些库/技术
Pattern Categories
模式分类
Architectural Patterns
架构模式
| Pattern | Detected By | Example |
|---|---|---|
| Consistent data/ui/domain separation | Repository + ViewModel + Composable |
| Koin module patterns | factoryOf, viewModel |
| Compose Navigation usage | NavHost with routes |
| MVI/MVVM consistency | StateFlow + sealed classes |
| 模式 | 检测依据 | 示例 |
|---|---|---|
| 一致的数据/UI/领域分层 | Repository + ViewModel + Composable |
| Koin模块模式 | factoryOf, viewModel |
| Compose Navigation的使用 | 带路由的NavHost |
| MVI/MVVM一致性 | StateFlow + 密封类 |
Problem-Solution Patterns
问题-解决方案模式
| Pattern | Detected By | Example |
|---|---|---|
| Try-catch with UI feedback | Error state in Composable |
| isLoading + Content pattern | Box with progress |
| LazyColumn with Pager | Paging 3 integration |
| Repository layer caching | Cached repository pattern |
| 模式 | 检测依据 | 示例 |
|---|---|---|
| 带UI反馈的Try-catch | Composable中的错误状态 |
| isLoading + 内容模式 | 带进度条的Box |
| 结合Pager的LazyColumn | Paging 3集成 |
| 仓储层缓存 | 缓存仓储模式 |
Code Organization Patterns
代码组织模式
| Pattern | Detected By | Example |
|---|---|---|
| Self-contained feature folders | feature/auth/ structure |
| Reusable Composables | ui/components/ |
| Test structure matching src | Parallel test folders |
| Consistent naming patterns | XxxViewModel, XxxScreen |
| 模式 | 检测依据 | 示例 |
|---|---|---|
| 独立的功能文件夹 | feature/auth/ 结构 |
| 可复用的Composables | ui/components/ |
| 与src匹配的测试结构 | 平行测试文件夹 |
| 一致的命名模式 | XxxViewModel, XxxScreen |
Observation Windows
观察窗口
V2 uses sliding windows for pattern detection:
Window 1 (Current Session): Immediate patterns
Window 2 (Last 5 Sessions): Emerging patterns
Window 3 (Last 20 Sessions): Established patterns
Window 4 (All Time): Core patternsV2使用滑动窗口进行模式检测:
Window 1 (Current Session): Immediate patterns
Window 2 (Last 5 Sessions): Emerging patterns
Window 3 (Last 20 Sessions): Established patterns
Window 4 (All Time): Core patternsConfidence Evolution
置信度演进
Session 1-3: Experimental (0.1-0.3)
Session 4-10: Validating (0.3-0.6)
Session 11-20: Established (0.6-0.8)
Session 20+: Best Practice (0.8-1.0)Session 1-3: Experimental (0.1-0.3)
Session 4-10: Validating (0.3-0.6)
Session 11-20: Established (0.6-0.8)
Session 20+: Best Practice (0.8-1.0)Commands
命令
View Observations
查看观察结果
/instinct-status --v2
/instinct-status --observationsShows:
- Recent session observations
- Emerging patterns (low confidence)
- Established patterns (high confidence)
- Pattern clusters by domain
/instinct-status --v2
/instinct-status --observations显示:
- 近期会话观察结果
- 新兴模式(低置信度)
- 已确立模式(高置信度)
- 按领域划分的模式集群
Manual Observation
手动观察
/instinct-observe "Used Ktor with retry pattern for API calls"Manually add an observation for pattern learning.
/instinct-observe "Used Ktor with retry pattern for API calls"手动添加观察结果用于模式学习。
Integration
集成
V2 instincts are evaluated by:
- Session hooks: Stop event
hooks/instinct-hooks.json - Pattern extractor:
agents/mobile-pattern-extractor.md - Pre-compact preservation: Maintains learning during context compression
V2本能功能通过以下组件实现:
- 会话钩子:停止事件
hooks/instinct-hooks.json - 模式提取器:
agents/mobile-pattern-extractor.md - 预压缩保留:在上下文压缩过程中保留学习内容
Difference from V1
与V1的区别
| Aspect | V1 | V2 |
|---|---|---|
| Trigger | Code write | Session observation |
| Scope | Single file | Cross-file patterns |
| Timing | Immediate | End of session |
| Focus | Code patterns | Architectural patterns |
Remember: V2 needs multiple sessions to build confidence. The more you develop, the smarter it gets.
| 维度 | V1 | V2 |
|---|---|---|
| 触发条件 | 代码写入 | 会话观察 |
| 范围 | 单个文件 | 跨文件模式 |
| 时机 | 即时 | 会话结束时 |
| 重点 | 代码模式 | 架构模式 |
注意:V2需要多个会话来建立置信度。你的开发活动越多,它就越智能。