mobile-instinct-v2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mobile 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:
  1. Code changes: What was modified
  2. Problem context: What issue was being solved
  3. Solution approach: How it was resolved
  4. Dependencies: What libraries/techniques were used
在会话结束时,V2会分析:
  1. 代码变更:修改了哪些内容
  2. 问题背景:正在解决的问题是什么
  3. 解决方案:如何解决问题
  4. 依赖项:使用了哪些库/技术

Pattern Categories

模式分类

Architectural Patterns

架构模式

PatternDetected ByExample
layer-separation
Consistent data/ui/domain separationRepository + ViewModel + Composable
dependency-injection
Koin module patternsfactoryOf, viewModel
navigation-pattern
Compose Navigation usageNavHost with routes
state-management
MVI/MVVM consistencyStateFlow + sealed classes
模式检测依据示例
layer-separation
一致的数据/UI/领域分层Repository + ViewModel + Composable
dependency-injection
Koin模块模式factoryOf, viewModel
navigation-pattern
Compose Navigation的使用带路由的NavHost
state-management
MVI/MVVM一致性StateFlow + 密封类

Problem-Solution Patterns

问题-解决方案模式

PatternDetected ByExample
error-boundary
Try-catch with UI feedbackError state in Composable
loading-state
isLoading + Content patternBox with progress
pagination
LazyColumn with PagerPaging 3 integration
caching-strategy
Repository layer cachingCached repository pattern
模式检测依据示例
error-boundary
带UI反馈的Try-catchComposable中的错误状态
loading-state
isLoading + 内容模式带进度条的Box
pagination
结合Pager的LazyColumnPaging 3集成
caching-strategy
仓储层缓存缓存仓储模式

Code Organization Patterns

代码组织模式

PatternDetected ByExample
feature-module
Self-contained feature foldersfeature/auth/ structure
shared-UI
Reusable Composablesui/components/
test-mirroring
Test structure matching srcParallel test folders
naming-convention
Consistent naming patternsXxxViewModel, XxxScreen
模式检测依据示例
feature-module
独立的功能文件夹feature/auth/ 结构
shared-UI
可复用的Composablesui/components/
test-mirroring
与src匹配的测试结构平行测试文件夹
naming-convention
一致的命名模式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 patterns
V2使用滑动窗口进行模式检测:
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 patterns

Confidence 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 --observations
Shows:
  • 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:
  1. Session hooks:
    hooks/instinct-hooks.json
    Stop event
  2. Pattern extractor:
    agents/mobile-pattern-extractor.md
  3. Pre-compact preservation: Maintains learning during context compression
V2本能功能通过以下组件实现:
  1. 会话钩子
    hooks/instinct-hooks.json
    停止事件
  2. 模式提取器
    agents/mobile-pattern-extractor.md
  3. 预压缩保留:在上下文压缩过程中保留学习内容

Difference from V1

与V1的区别

AspectV1V2
TriggerCode writeSession observation
ScopeSingle fileCross-file patterns
TimingImmediateEnd of session
FocusCode patternsArchitectural patterns

Remember: V2 needs multiple sessions to build confidence. The more you develop, the smarter it gets.
维度V1V2
触发条件代码写入会话观察
范围单个文件跨文件模式
时机即时会话结束时
重点代码模式架构模式

注意:V2需要多个会话来建立置信度。你的开发活动越多,它就越智能。