/lessons-learned:lessons:evalfrom lessons-learned
Run the lesson effectiveness eval suite. Asks for focus, auto-generates missing scenarios, runs evals, and generates a report.
Ships in lessons-learned. Installing the plugin adds it to Claude Code.
You are running the /eval command to assess lesson injection effectiveness.
Ask the user: "What's the prime focus for this eval session?" and offer these options:
If the user chose option 3 or 4, check whether scenarios already exist:
ls evals/scenarios/
For lessons without a scenario, generate them:
cd evals && npm run eval:gen -- --ids <slug1,slug2>
Or generate for all missing:
cd evals && npm run eval:gen
Navigate to the evals directory and run:
All scenarios:
cd evals && npm run eval
Specific scenarios (filter by TC-* pattern):
cd evals && npx promptfoo eval --config promptfooconfig.yaml --filter-pattern 'TC-H3|TC-G1' --output results/cache/latest-run.json
Smoke test (fast — TC-H3 + TC-G1 only):
cd evals && npm run eval:smoke
cd evals && npm run eval:report:latest
The report is written to evals/results/reports/report-<timestamp>.md and printed to stdout.
Ask: "Open the web viewer to browse results interactively? (npx promptfoo view)"
If yes:
cd evals && npx promptfoo view
judge.mjs calls the Anthropic SDK directly, so ANTHROPIC_API_KEY (and ANTHROPIC_BASE_URL if routing through a proxy) must be set — it does not use your claude login session. See Using the Eval Framework for this repo's dev setup.maxConcurrency: 1 in config guarantees control transcript files exist before treatment arms call the judge.evals/results/cache/. Treatment arms re-run if the lesson's problem or solution changes. Use npm run eval:clean to clear all caches.npx promptfoo mcp exposes eval history to AI agents (configured in .mcp.json).What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
11 commands in this plugin
/lessons:addInteractively add a new lesson to the store through a short conversation/lessons:backupSnapshot data/lessons.db to an out-of-tree backup, or restore it from an existing snapshot. data/lessons.db is intentionally untracked in git (a full dump would ship unreviewed candidates and personal lessons to every install) — this is the only recovery path if it's ever lost or corrupted./lessons:cancelRetroactively cancel a lesson tag you just emitted — prevents it from being promoted or removes it if already active. Works for lessons in the DB (any status) and for lessons emitted this session but not yet scanned./lessons:configView and edit lessons-learned configuration, with explanations of what each setting does/lessons:doctorAudit the lessons DB for quality issues — dead triggers, misclassified types, truncated summaries, near-duplicates, over-broad guards, over-weighted clusters, and more. Reports findings and offers to fix them./lessons:helpPrint the full command and configuration reference for the lessons-learned plugin — slash commands with descriptions, all config options with current values, and what's been added recently.Other plugins' commands for the same job