Reflexio Docs
Claude Code Plugin

claude-smart

A Claude Code plugin, powered by Reflexio, that turns your corrections and successful execution paths into rules Claude follows in future sessions.

claude-smart

claude-smart

claude-smart is a Claude Code plugin, powered by Reflexio, that makes Claude Code self-improve as you use it — not by remembering past sessions, but by turning your corrections and successful execution paths into rules it actually follows next time.

It runs entirely on your machine: Claude Code lifecycle hooks capture every user turn, tool call, and assistant response; Reflexio's extractors distill them into profiles and playbook rules; and on every new session those rules are injected back into Claude's system prompt.

Why Learning, Not Memory

Most memory solutions re-inject transcripts or summaries from prior sessions — Claude remembers what happened without necessarily changing what it does next. claude-smart focuses on learning instead.

  • Actionable, not just informative. Corrections become rules Claude can follow. Memory: "user was annoyed about npm test hanging." Learning: "always pass --run to npm test in this repo — default watch mode blocks CI."
  • Optimized paths, not just past events. Successful tool sequences become recipes so Claude reuses what works. Learning: "for this repo, always use pnpm dev:all to start the full local stack — npm run dev only starts the frontend."
  • Project-wide, not session-siloed. Session memory disappears with the conversation. The project playbook persists and improves across every session in that repo.
  • Compact. Distilled, deduplicated rules stay in dozens of tokens — not thousands — even as the project grows.

Two Artifacts

claude-smart produces two artifacts as you work and reinjects them at the start of every new session:

  • User Profile — session-scoped preferences and working style (stack, role, quirks). e.g. "uses pnpm, not npm"; "prefers terse answers."
  • Project Playbook — durable, generalized rules accumulated across every session in the repo. Each rule says when it applies and why. e.g. "always pass --run to npm test — watch mode hangs CI."

Rules self-maintain: correct the same thing twice and they merge; change your mind and the old one is archived.

Key Features

  • Learn, don't just remember — Corrections become structured, deduplicated rules, not transcript replays.
  • Fully automatic — Every user turn, tool call, and assistant response is captured via lifecycle hooks and extracted into rules without you running anything.
  • Compounds with every session — Rules auto-merge, supersede, and archive as your project evolves — the playbook sharpens with use instead of bloating.
  • Two-tier scope — Per-session profiles for the current conversation; cross-session playbooks for the whole project.
  • No external API call — Semantic search runs on an in-process ONNX embedder, and all data is stored locally under ~/.reflexio/ and ~/.claude-smart/.
  • Hybrid search — Playbooks and profiles are indexed with vector + BM25 search for fast, robust retrieval.
  • Offline resilience — If the Reflexio backend is down, hooks buffer to disk; the next successful publish drains them.
  • Manual correction tag/tag flags the last turn as a correction so the extractor weights it heavily.