Personal Lessons Referential
# Personal cross-project lessons referential
A **personal memory of lessons** that carries across **all your projects** (and machines), so you never repeat the same mistake from scratch. It is yours: claude-base ships the *mechanism*, never your lessons.
> Mechanism: the [`self-improvement`](../../.claude/rules/self-improvement.md) rule (the capture reflex) + the [`/lessons`](../../.claude/commands/lessons.md) command. The lessons themselves live only in your home directory.
## How it works
- **The store** is a single file: `~/.claude/rules/lessons.md`. It is created the first time you confirm a lesson. Each lesson is a one-line `- ` bullet, optionally grouped under a `## Topic` heading so the file stays readable as it grows.
- **Recall is automatic.** Claude Code loads everything under `~/.claude/rules/` into *every* project session, so a lesson you confirm once is in context everywhere — no import, no command.
- **Capture is a human-gated reflex.** After a genuinely instructive moment (a fix that took several attempts, an explicit correction from you, a non-obvious root cause), the assistant proposes **one** short, generalized, sanitized lesson and asks you to keep / edit / discard it. Nothing is stored without your confirmation.
- **Recurring mistakes are counted, not duplicated.** If the same lesson comes up again, you are offered to bump a `(seen N times)` marker on the existing line instead of adding a second copy — so the most-repeated lessons are easy to spot and prioritize.
- **It stays small.** The store is loaded into every session, so it is bounded (~2,000 characters / ~15–20 lessons). When it fills up, you are prompted to prune (`/lessons --prune` reports over-budget, duplicates, and the most-repeated lessons).
## Privacy
- Lessons are **personal**. They are written only to `~/.claude/rules/lessons.md` — **never** into a project repo, the foundation, or any committed file.
- Every lesson is **sanitized** before it is written: project names, file paths, URLs, identifiers, and secrets are stripped. A lesson is a reusable *principle*, not an incident.
- If you sync the store (below), prefer a **private** destination.
## Starting from what you already learned (bootstrap)
If you used Claude Code before this feature, your past lessons already exist as per-project `feedback` memories. A one-time backfill proposes the general, recurring ones for promotion:when to use it
Community prompt sourced from the open-source GitHub repo christopherlouet/claude-base (MIT). A "Personal Lessons Referential" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
christopherlouet/claude-base · MIT