AgentMind: A Claude Code Plugin That Learns and Applies Your Coding Preferences

✍️ OpenClawRadar📅 Published: March 15, 2026🔗 Source
AgentMind: A Claude Code Plugin That Learns and Applies Your Coding Preferences
Ad

What AgentMind Does

AgentMind is a Claude Code plugin that addresses the problem of having to re-explain coding preferences in every new session. It automatically learns patterns like "use pnpm not npm," "always add types," and "don't use default exports" by observing how you work and injecting that context into future interactions.

How It Works

The system operates on a six-step core loop: Observe → Analyze → Remember → Apply → Validate → Evolve.

Observation hooks run at key lifecycle points:

  • Session start
  • Tool use
  • Errors
  • Compaction

These hooks watch for corrections (like "no, use X instead"), repeated patterns, and error types without storing your actual code.

Technical Implementation

The plugin uses a three-dimensional confidence scoring system to determine when to apply learned preferences:

  • Frequency × 0.35
  • Effectiveness × 0.40
  • Human feedback × 0.25

High-confidence preferences get auto-injected into sessions, while low-confidence ones remain quiet. The system includes decay mechanisms where preferences fade if not reinforced over time.

Ad

Evolution System

AgentMind features a four-level evolution structure:

  • L0: Individual instincts
  • L1: Patterns (clustered from individual instincts)
  • L2: Strategies (abstracted from patterns)

For example, separate preferences like "always use vitest," "always add test files in tests," and "run tests after changes" might evolve into a "TDD workflow" pattern.

Technical Details

  • ~3000 lines TypeScript core
  • ~800 lines shell hooks
  • 115 tests passing
  • Supports multi-agent with isolated preference stores
  • Zero configuration needed — install and it starts learning
  • Observation layer uses pure bash + jq to stay lightweight
  • MIT licensed and free

Development Insights

The creator noted that the hardest challenge wasn't the learning algorithm but knowing when to be quiet. Early versions would inject every learned preference, which polluted the context window. The confidence scoring with decay solved this issue.

Another technical challenge was getting shell hooks and TypeScript to work together without adding heavy dependencies. The solution was a lightweight observation layer using bash and jq.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also