opencode-plugin-mimic 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +138 -38
- package/README.md +70 -61
- package/dist/index.js +3241 -1001
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/README.ko.md
CHANGED
|
@@ -11,22 +11,27 @@ Mimic은 작업 방식을 관찰하고, 세션 간 기억을 유지하며, 반
|
|
|
11
11
|
|
|
12
12
|
## 기능
|
|
13
13
|
|
|
14
|
-
- **패턴 감지**: 반복되는 도구 사용, 파일 편집, git 커밋 메시지 감지
|
|
15
|
-
-
|
|
14
|
+
- **패턴 감지**: 반복되는 도구 사용, 파일 편집, git 커밋 메시지 및 채팅 패턴 감지
|
|
15
|
+
- **본능 학습(Instinct Learning)**: 프로젝트 히스토리로부터 행동 "본능"(휴리스틱)을 학습
|
|
16
|
+
- **아이덴티티 진화(Identity Evolution)**: 사용자에 대해 더 많이 배울수록 플러그인이 자체적인 성격과 통계를 개발
|
|
17
|
+
- **세션 기억**: 장기적인 컨텍스트와 함께 세션 간 관찰 및 마일스톤 보존
|
|
16
18
|
- **여정 기록**: 프로젝트의 진화를 내러티브로 정리
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
19
|
+
- **스킬 생성**: 프로젝트 컨텍스트를 기반으로 선언적 스킬(.agent/skills) 자동 생성
|
|
20
|
+
- **Git & VCS 통합**: 브랜치, 커밋 메시지, 파일 변경 사항 분석
|
|
21
|
+
- **스마트 제안**: 반복 행동에 대한 지름길 생성 또는 기능 진화 제안
|
|
22
|
+
- **프로젝트별 상태**: 프로젝트마다 독립적인 패턴과 본능 저장
|
|
20
23
|
- **설정 가능**: 학습/제안 활성화, 임계치 조정
|
|
21
24
|
- **다국어**: 사용자 설정에 따라 영어/한국어 출력
|
|
22
25
|
|
|
23
26
|
## 동작 방식
|
|
24
27
|
|
|
25
|
-
1. **추적**: 도구
|
|
26
|
-
2. **감지**: 패턴 유형별 분류 (tool
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
28
|
+
1. **추적**: 도구 호출, 파일 편집, git 히스토리, 그리고 사용자 프롬프트까지 추적
|
|
29
|
+
2. **감지**: 패턴 유형별 분류 (tool, file, commit, prompt)
|
|
30
|
+
3. **관찰**: 배경 관찰자(Background Observer)가 행동 패턴을 기록하고 분석
|
|
31
|
+
4. **학습**: 반복되는 행동을 프로젝트별 규칙인 **본능(Instincts)**으로 정립
|
|
32
|
+
5. **적용**: 새로운 세션 시작 시 본능을 자동으로 적용하여 컨텍스트 유지
|
|
33
|
+
6. **진화**: 패턴이 임계치에 도달하면 전용 도구나 스킬로 진화 제안
|
|
34
|
+
7. **아이덴티티**: 작업이 계속됨에 따라 Mimic의 프로젝트 아이덴티티가 성숙해지며 성격을 얻고 "각성"함
|
|
30
35
|
|
|
31
36
|
## 설치
|
|
32
37
|
|
|
@@ -72,31 +77,119 @@ mimic:configure({ minPatternCount: 5 })
|
|
|
72
77
|
|
|
73
78
|
## 사용법
|
|
74
79
|
|
|
80
|
+
### 커스텀 도구
|
|
81
|
+
|
|
75
82
|
Mimic은 다음 도구들을 제공합니다:
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
#### `mimic:init`
|
|
85
|
+
|
|
86
|
+
프로젝트를 위해 Mimic을 초기화하거나 깨웁니다. 세션 통계, 최근 관찰 사항, 그리고 잠재적인 연속성 힌트가 포함된 환영 메시지를 표시합니다.
|
|
87
|
+
|
|
88
|
+
#### `mimic:status`
|
|
89
|
+
|
|
90
|
+
세션 수, 패턴 통계, 최근 수정된 파일, 활성 제안 등을 포함한 현재 상태를 확인합니다.
|
|
91
|
+
|
|
92
|
+
#### `mimic:journey`
|
|
93
|
+
|
|
94
|
+
마일스톤, 최근 관찰 사항, git 활동을 포함하여 프로젝트 진화의 내러티브 이야기를 확인합니다.
|
|
95
|
+
|
|
96
|
+
#### `mimic:patterns`
|
|
97
|
+
|
|
98
|
+
유형 및 빈도별로 정리된 모든 감지된 패턴(도구, 파일, 커밋 등)을 확인합니다.
|
|
99
|
+
|
|
100
|
+
#### `mimic:instincts`
|
|
101
|
+
|
|
102
|
+
학습된 행동 본능을 확인합니다. 본능은 사용자의 작업 스타일로부터 Mimic이 배운 "프로젝트별 규칙"입니다.
|
|
103
|
+
|
|
104
|
+
#### `mimic:apply`
|
|
105
|
+
|
|
106
|
+
최근 도구, 수정된 파일 등을 기반으로 현재 컨텍스트에 어떤 본능이 적용되는지 수동으로 확인합니다.
|
|
107
|
+
|
|
108
|
+
#### `mimic:identity`
|
|
109
|
+
|
|
110
|
+
성격 유형, "각성" 날짜 및 학습 통계를 포함한 Mimic의 프로젝트 아이덴티티를 확인합니다.
|
|
111
|
+
|
|
112
|
+
#### `mimic:sequences`
|
|
113
|
+
|
|
114
|
+
자주 사용되는 도구 시퀀스를 확인하여 일반적인 워크플로 패턴을 파악합니다.
|
|
115
|
+
|
|
116
|
+
#### `mimic:observations`
|
|
117
|
+
|
|
118
|
+
현재 프로젝트의 하위 수준 관찰 로그(도구, 파일, 세션)를 확인합니다.
|
|
119
|
+
|
|
120
|
+
#### `mimic:observe`
|
|
121
|
+
|
|
122
|
+
수동으로 관찰 사항 추가:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
mimic:observe({ observation: "보안 강화를 위해 인증 모듈 리팩터링 완료" })
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### `mimic:milestone`
|
|
129
|
+
|
|
130
|
+
프로젝트 마일스톤 기록:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
mimic:milestone({ milestone: "v1.0.0 릴리스" })
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
#### `mimic:stats`
|
|
137
|
+
|
|
138
|
+
상세 통계 확인: 총 세션, 도구 호출, 패턴/마일스톤 수, 학습 상태 등.
|
|
139
|
+
|
|
140
|
+
#### `mimic:configure`
|
|
141
|
+
|
|
142
|
+
Mimic의 행동 조정:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
mimic:configure({ learningEnabled: false }) # 학습 중지
|
|
146
|
+
mimic:configure({ suggestionEnabled: false }) # 제안 중지
|
|
147
|
+
mimic:configure({ minPatternCount: 5 }) # 최소 반복 횟수를 5회로 설정
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### `mimic:surface`
|
|
151
|
+
|
|
152
|
+
패턴을 인지됨/표면화됨 상태로 표시합니다.
|
|
153
|
+
|
|
154
|
+
#### `mimic:reset`
|
|
155
|
+
|
|
156
|
+
현재 프로젝트의 모든 학습된 데이터를 삭제합니다.
|
|
157
|
+
|
|
158
|
+
#### `mimic:grow`
|
|
159
|
+
|
|
160
|
+
활동 로그를 기반으로 프로젝트의 방향성과 성장 기회를 분석합니다.
|
|
161
|
+
|
|
162
|
+
#### `mimic:evolve`
|
|
163
|
+
|
|
164
|
+
반복된 패턴을 기반으로 새로운 기능(Shortcuts, Hooks, Commands, Agents, MCP) 진화를 제안하고 생성합니다.
|
|
165
|
+
|
|
166
|
+
#### `mimic:generate-skills`
|
|
167
|
+
|
|
168
|
+
프로젝트 컨텍스트를 분석하고 향후 세션의 정확도를 높이기 위한 `.agent/skills`를 자동으로 생성합니다.
|
|
169
|
+
|
|
170
|
+
#### `mimic:export` / `mimic:import`
|
|
171
|
+
|
|
172
|
+
학습된 본능을 JSON 파일로 내보내거나 다른 프로젝트에서 가져옵니다.
|
|
173
|
+
|
|
174
|
+
#### `mimic:session-context`
|
|
175
|
+
|
|
176
|
+
세션 간 컨텍스트 요약 및 연속성 힌트를 확인합니다.
|
|
177
|
+
|
|
178
|
+
#### `mimic:level`
|
|
179
|
+
|
|
180
|
+
숙련도 수준(technical, semi-technical, non-technical, chaotic)을 설정하여 Mimic의 피드백을 개인화합니다.
|
|
181
|
+
|
|
182
|
+
#### `mimic:focus`
|
|
183
|
+
|
|
184
|
+
현재 프로젝트의 집중 분야 또는 기술 스택을 설정합니다.
|
|
185
|
+
|
|
186
|
+
#### `mimic:mcp-search` / `mimic:mcp`
|
|
187
|
+
|
|
188
|
+
MCP 서버를 검색하고 프로젝트 설정에 추가합니다.
|
|
189
|
+
|
|
190
|
+
#### `mimic:capabilities`
|
|
191
|
+
|
|
192
|
+
진화된 모든 기능 목록을 확인합니다.
|
|
100
193
|
|
|
101
194
|
## 패턴 임계치
|
|
102
195
|
|
|
@@ -111,14 +204,21 @@ Mimic은 다음 도구들을 제공합니다:
|
|
|
111
204
|
|
|
112
205
|
## 자동 동작
|
|
113
206
|
|
|
114
|
-
- **세션 시작**: 세션 카운트 증가,
|
|
115
|
-
- **도구 실행**: 도구
|
|
116
|
-
- **파일 편집**: 파일 수정
|
|
117
|
-
-
|
|
118
|
-
-
|
|
207
|
+
- **세션 시작**: 세션 카운트 증가, 최근 세션 이후 시간 분석, 그리고 **학습된 본능을 자동으로 적용**하여 컨텍스트를 설정합니다.
|
|
208
|
+
- **도구 실행**: 패턴 및 시퀀스 감지를 위해 모든 도구 호출을 추적합니다.
|
|
209
|
+
- **파일 편집**: 파일 수정 빈도를 추적합니다.
|
|
210
|
+
- **배경 관찰(Background Observation)**: 주기적으로 관찰자(Observer)를 실행하여 패턴을 행동 본능으로 정립합니다.
|
|
211
|
+
- **자동 진화**: 특정 도메인에서 높은 신뢰도의 패턴이 나타나면 기능을 자동으로 진화시킵니다.
|
|
212
|
+
- **스킬 생성**: 새로운 기능이 진화될 때 자동으로 새로운 스킬을 생성합니다.
|
|
213
|
+
- **세션 유휴**: 패턴을 분석하고 토스트 메시지를 통해 제안을 표시합니다.
|
|
214
|
+
- **세션 종료**: 세션 요약을 기록하고, 다음 세션을 위한 연속성 메모리를 생성하며, 주요 마일스톤을 기록합니다.
|
|
119
215
|
|
|
120
216
|
> Git 기반 기능은 git 저장소가 필요합니다. 저장소가 없으면 관련 섹션이 비어 보일 수 있습니다.
|
|
121
217
|
|
|
218
|
+
## 영감 (Inspiration)
|
|
219
|
+
|
|
220
|
+
이 프로젝트는 [Homunculus](https://github.com/humanplane/homunculus)의 컨셉에서 깊은 영감을 받아 제작되었습니다.
|
|
221
|
+
|
|
122
222
|
## 라이선스
|
|
123
223
|
|
|
124
224
|
MIT
|
package/README.md
CHANGED
|
@@ -11,22 +11,28 @@ Mimic watches how you work, remembers across sessions, and suggests actions base
|
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
|
-
- **Pattern Detection**: Automatically detects repeated tool usage, file edits,
|
|
15
|
-
- **
|
|
14
|
+
- **Pattern Detection**: Automatically detects repeated tool usage, file edits, git commit messages, and chat patterns
|
|
15
|
+
- **Instinct Learning**: Learns behavioral "instincts" (rules of thumb) from your project history
|
|
16
|
+
- **Identity Evolution**: The plugin develops its own personality and stats as it learns more about you
|
|
17
|
+
- **Session Memory**: Remembers observations and milestones across sessions with long-term context
|
|
16
18
|
- **Journey Tracking**: Narrative storytelling of your project's evolution
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
19
|
+
- **Skill Generation**: Automatically creates declarative skills based on project context
|
|
20
|
+
- **Git & VCS Integration**: Analyzes branches, commit messages, and file modifications
|
|
21
|
+
- **Smart Suggestions**: Offers to create shortcuts or evolve capabilities for repeated actions
|
|
22
|
+
- **Per-Project State**: Each project gets its own learned patterns and instincts
|
|
20
23
|
- **Configurable**: Enable/disable learning and suggestions, adjust thresholds
|
|
21
24
|
- **Internationalization**: English or Korean UI based on user config
|
|
22
25
|
|
|
23
26
|
## How It Works
|
|
24
27
|
|
|
25
|
-
1. **Track**: Mimic tracks tool calls, file edits, and
|
|
26
|
-
2. **Detect**: Patterns are categorized by type (tool, file, commit)
|
|
27
|
-
3. **
|
|
28
|
-
4. **
|
|
29
|
-
5. **
|
|
28
|
+
1. **Track**: Mimic tracks tool calls, file edits, git history, and even user prompts
|
|
29
|
+
2. **Detect**: Patterns are categorized by type (tool, file, commit, prompt)
|
|
30
|
+
3. **Observe**: Behavioral patterns are logged and analyzed by a background observer
|
|
31
|
+
4. **Learn**: Recurring behaviors are distilled into **Instincts** - project-specific rules of thumb
|
|
32
|
+
5. **Apply**: Instincts are automatically applied to new sessions to maintain continuity
|
|
33
|
+
6. **Evolve**: When patterns reach thresholds, Mimic can evolve them into dedicated tools or skills
|
|
34
|
+
7. **Identity**: As you work, Mimic's project identity matures, gaining personality and "awakening" over time
|
|
35
|
+
|
|
30
36
|
|
|
31
37
|
## Installation
|
|
32
38
|
|
|
@@ -78,33 +84,39 @@ Mimic adds the following tools to OpenCode:
|
|
|
78
84
|
|
|
79
85
|
#### `mimic:init`
|
|
80
86
|
|
|
81
|
-
Initialize or wake up Mimic for this project. Shows welcome message with session stats and
|
|
87
|
+
Initialize or wake up Mimic for this project. Shows welcome message with session stats, recent observations, and potential continuity hints.
|
|
82
88
|
|
|
83
89
|
#### `mimic:status`
|
|
84
90
|
|
|
85
|
-
Check current status including
|
|
86
|
-
|
|
87
|
-
- Session count and pattern stats
|
|
88
|
-
- Recently modified files (from git)
|
|
89
|
-
- Recent commits
|
|
90
|
-
- Active suggestions
|
|
91
|
+
Check current status including session count, pattern stats, recently modified files, and active suggestions.
|
|
91
92
|
|
|
92
93
|
#### `mimic:journey`
|
|
93
94
|
|
|
94
|
-
View the narrative story of your project's evolution
|
|
95
|
-
|
|
96
|
-
- Milestones achieved
|
|
97
|
-
- Recent observations
|
|
98
|
-
- Git activity timeline
|
|
95
|
+
View the narrative story of your project's evolution, including milestones, recent observations, and git activity.
|
|
99
96
|
|
|
100
97
|
#### `mimic:patterns`
|
|
101
98
|
|
|
102
|
-
View all detected patterns organized by type
|
|
99
|
+
View all detected patterns (Tool, File, Commit, etc.) organized by type and frequency.
|
|
100
|
+
|
|
101
|
+
#### `mimic:instincts`
|
|
102
|
+
|
|
103
|
+
View learned behavioral instincts. Instincts are "rules of thumb" that Mimic has learned from your work style.
|
|
104
|
+
|
|
105
|
+
#### `mimic:apply`
|
|
106
|
+
|
|
107
|
+
Manually check which instincts apply to the current context (recent tools, modified files, etc.).
|
|
103
108
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
#### `mimic:identity`
|
|
110
|
+
|
|
111
|
+
Check Mimic's project identity, including its personality trait, "awakened" date, and learning stats.
|
|
112
|
+
|
|
113
|
+
#### `mimic:sequences`
|
|
114
|
+
|
|
115
|
+
View frequently used tool sequences to understand your common cross-tool workflows.
|
|
116
|
+
|
|
117
|
+
#### `mimic:observations`
|
|
118
|
+
|
|
119
|
+
View low-level observation logs (tools, files, sessions) for the current project.
|
|
108
120
|
|
|
109
121
|
#### `mimic:observe`
|
|
110
122
|
|
|
@@ -124,12 +136,7 @@ mimic:milestone({ milestone: "v1.0.0 released" })
|
|
|
124
136
|
|
|
125
137
|
#### `mimic:stats`
|
|
126
138
|
|
|
127
|
-
View detailed statistics:
|
|
128
|
-
|
|
129
|
-
- Total sessions and tool calls
|
|
130
|
-
- Pattern and milestone counts
|
|
131
|
-
- Session records
|
|
132
|
-
- Configuration status
|
|
139
|
+
View detailed statistics: total sessions, tool calls, pattern/milestone counts, and learning status.
|
|
133
140
|
|
|
134
141
|
#### `mimic:configure`
|
|
135
142
|
|
|
@@ -143,48 +150,43 @@ mimic:configure({ minPatternCount: 5 }) # Require 5 repetitions
|
|
|
143
150
|
|
|
144
151
|
#### `mimic:surface`
|
|
145
152
|
|
|
146
|
-
Mark a pattern as acknowledged
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
mimic:surface({ patternId: "pattern-uuid" })
|
|
150
|
-
```
|
|
153
|
+
Mark a pattern as acknowledged/surfaced.
|
|
151
154
|
|
|
152
155
|
#### `mimic:reset`
|
|
153
156
|
|
|
154
|
-
Clear all learned data
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
mimic:reset({ confirm: true })
|
|
158
|
-
```
|
|
157
|
+
Clear all learned data for the current project.
|
|
159
158
|
|
|
160
159
|
#### `mimic:grow`
|
|
161
160
|
|
|
162
|
-
Analyze project direction and growth opportunities.
|
|
161
|
+
Analyze project direction and growth opportunities based on activity logs.
|
|
163
162
|
|
|
164
163
|
#### `mimic:evolve`
|
|
165
164
|
|
|
166
|
-
Suggest and create new capabilities based on
|
|
165
|
+
Suggest and create new capabilities (Shortcuts, Hooks, Commands, Agents, MCP) based on repeated patterns.
|
|
166
|
+
|
|
167
|
+
#### `mimic:generate-skills`
|
|
168
|
+
|
|
169
|
+
Analyze project context and automatically generate `.agent/skills` to improve accuracy for future sessions.
|
|
167
170
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
#### `mimic:export` / `mimic:import`
|
|
172
|
+
|
|
173
|
+
Export your learned instincts to a JSON file or import them from another project.
|
|
174
|
+
|
|
175
|
+
#### `mimic:session-context`
|
|
176
|
+
|
|
177
|
+
View cross-session context summary and continuity hints.
|
|
172
178
|
|
|
173
179
|
#### `mimic:level`
|
|
174
180
|
|
|
175
|
-
Set your technical level (technical, semi-technical, non-technical, chaotic)
|
|
181
|
+
Set your technical level (technical, semi-technical, non-technical, chaotic) to personalize Mimic's feedback.
|
|
176
182
|
|
|
177
183
|
#### `mimic:focus`
|
|
178
184
|
|
|
179
185
|
Set current project focus or tech stack.
|
|
180
186
|
|
|
181
|
-
#### `mimic:mcp-search`
|
|
182
|
-
|
|
183
|
-
Returns a search link to mcpmarket.com and a list of popular MCP servers.
|
|
187
|
+
#### `mimic:mcp-search` / `mimic:mcp`
|
|
184
188
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
Add an MCP server configuration to the **project-level** `opencode.json`.
|
|
189
|
+
Search for MCP servers and add them to project configuration.
|
|
188
190
|
|
|
189
191
|
#### `mimic:capabilities`
|
|
190
192
|
|
|
@@ -203,11 +205,14 @@ List all evolved capabilities.
|
|
|
203
205
|
|
|
204
206
|
## Automatic Behaviors
|
|
205
207
|
|
|
206
|
-
- **Session Start**: Increments session count,
|
|
207
|
-
- **Tool Execution**: Tracks every tool call for pattern detection
|
|
208
|
-
- **File Edit**: Tracks file modification frequency
|
|
209
|
-
- **
|
|
210
|
-
- **
|
|
208
|
+
- **Session Start**: Increments session count, analyzes time since last session, and **automatically applies learned instincts** to set the context.
|
|
209
|
+
- **Tool Execution**: Tracks every tool call for pattern and sequence detection.
|
|
210
|
+
- **File Edit**: Tracks file modification frequency.
|
|
211
|
+
- **Background Observation**: Periodically runs an observer to distill patterns into behavioral instincts.
|
|
212
|
+
- **Automatic Evolution**: Automatically evolves capabilities when high-confidence patterns emerge in specific domains.
|
|
213
|
+
- **Skill Generation**: Automatically generates new skills when new capabilities are evolved.
|
|
214
|
+
- **Session Idle**: Analyzes patterns and surfaces suggestions via toasts.
|
|
215
|
+
- **Session End**: Records session summary, records continuity memory for next session, and logs major milestones.
|
|
211
216
|
|
|
212
217
|
> Git-based insights require a git repository. If none is available, git sections will be empty.
|
|
213
218
|
|
|
@@ -219,6 +224,10 @@ pnpm run build
|
|
|
219
224
|
pnpm run dev # watch mode
|
|
220
225
|
```
|
|
221
226
|
|
|
227
|
+
## Inspiration
|
|
228
|
+
|
|
229
|
+
Heavily inspired by the concepts of [Homunculus](https://github.com/humanplane/homunculus).
|
|
230
|
+
|
|
222
231
|
## License
|
|
223
232
|
|
|
224
233
|
MIT
|