English | 한국어
An OpenCode plugin that learns from your patterns and adapts to your workflow.
Mimic watches how you work, remembers across sessions, and suggests actions based on what you do repeatedly.
- Pattern Detection: Automatically detects repeated tool usage, file edits, git commit messages, and chat patterns
- Instinct Learning: Learns behavioral "instincts" (rules of thumb) from your project history
- Identity Evolution: The plugin develops its own personality and stats as it learns more about you
- Session Memory: Remembers observations and milestones across sessions with long-term context
- Journey Tracking: Narrative storytelling of your project's evolution
- Skill Generation: Automatically creates declarative skills based on project context
- Git & VCS Integration: Analyzes branches, commit messages, and file modifications
- Smart Suggestions: Offers to create shortcuts or evolve capabilities for repeated actions
- Per-Project State: Each project gets its own learned patterns and instincts
- Configurable: Enable/disable learning and suggestions, adjust thresholds
- Internationalization: English or Korean UI based on user config
- Track: Mimic tracks tool calls, file edits, git history, and even user prompts
- Detect: Patterns are categorized by type (tool, file, commit, prompt)
- Observe: Behavioral patterns are logged and analyzed by a background observer
- Learn: Recurring behaviors are distilled into Instincts - project-specific rules of thumb
- Apply: Instincts are automatically applied to new sessions to maintain continuity
- Evolve: When patterns reach thresholds, Mimic can evolve them into dedicated tools or skills
- Identity: As you work, Mimic's project identity matures, gaining personality and "awakening" over time
npm install -g opencode-plugin-mimicThen add to your ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-plugin-mimic"]
}Mimic reads ~/.config/opencode/mimic.json for user-level settings.
{
"language": "ko-KR"
}Default language is en-US.
Project preferences live in .opencode/mimic/state.json and can be adjusted via mimic_configure:
mimic_configure({ learningEnabled: false })
mimic_configure({ suggestionEnabled: false })
mimic_configure({ minPatternCount: 5 })
- Diagram file:
docs/mimic_flow.drawio - Open it in diagrams.net (draw.io) to view or edit.
Mimic adds the following tools to OpenCode:
Initialize or wake up Mimic for this project. Shows welcome message with session stats, recent observations, and potential continuity hints.
Check current status including session count, pattern stats, recently modified files, and active suggestions.
View the narrative story of your project's evolution, including milestones, recent observations, and git activity.
View all detected patterns (Tool, File, Commit, etc.) organized by type and frequency.
View learned behavioral instincts. Instincts are "rules of thumb" that Mimic has learned from your work style.
Manually check which instincts apply to the current context (recent tools, modified files, etc.).
Check Mimic's project identity, including its personality trait, "awakened" date, and learning stats.
View frequently used tool sequences to understand your common cross-tool workflows.
View low-level observation logs (tools, files, sessions) for the current project.
Manually add an observation:
mimic_observe({ observation: "Refactored auth module for better security" })
Record a project milestone:
mimic_milestone({ milestone: "v1.0.0 released" })
View detailed statistics: total sessions, tool calls, pattern/milestone counts, and learning status.
Adjust Mimic's behavior:
mimic_configure({ learningEnabled: false }) # Stop learning
mimic_configure({ suggestionEnabled: false }) # Stop suggestions
mimic_configure({ minPatternCount: 5 }) # Require 5 repetitions
Mark a pattern as acknowledged/surfaced.
Clear all learned data for the current project.
Analyze project direction and growth opportunities based on activity logs.
Suggest and create new capabilities (Shortcuts, Hooks, Commands, Agents, MCP) based on repeated patterns.
Analyze project context and automatically generate .agent/skills to improve accuracy for future sessions.
Export your learned instincts to a JSON file or import them from another project.
View cross-session context summary and continuity hints.
Set your technical level (technical, semi-technical, non-technical, chaotic) to personalize Mimic's feedback.
Set current project focus or tech stack.
Search for MCP servers and add them to project configuration.
List all evolved capabilities.
| Pattern Type | Threshold | Result |
|---|---|---|
| Tool usage | 3+ times (default) | Suggest action |
| Tool usage | 10+ times | Offer shortcut evolution |
| File modified | 5+ times | Offer hook evolution |
| Commit message | 3+ identical | Offer command evolution |
Note: File/commit patterns are only created after their thresholds. Tool patterns accumulate from the first use.
- Session Start: Increments session count, analyzes time since last session, and automatically applies learned instincts to set the context.
- Tool Execution: Tracks every tool call for pattern and sequence detection.
- File Edit: Tracks file modification frequency.
- Background Observation: Periodically runs an observer to distill patterns into behavioral instincts.
- Automatic Evolution: Automatically evolves capabilities when high-confidence patterns emerge in specific domains.
- Skill Generation: Automatically generates new skills when new capabilities are evolved.
- Session Idle: Analyzes patterns and surfaces suggestions via toasts.
- Session End: Records session summary, records continuity memory for next session, and logs major milestones.
Git-based insights require a git repository. If none is available, git sections will be empty.
bun install
bun run build
bun run dev # watch modeHeavily inspired by the concepts of Homunculus.
MIT