/lessons — Project Self-Improvement
Cross-platform command for the Compound Learning System. Works everywhere, with or without hooks.
Usage
/lessons → load and show all lessons for this session
/lessons save → extract corrections from this session and write to tasks/lessons.md
/lessons add "<rule>" → add a manual rule immediately
/lessons clear → show lessons and ask which to remove
What This Command Does
/lessons (no args) — Load lessons
- Check if
tasks/lessons.mdexists in the project root - Read all lesson rules (lines starting with
-) - Inject them as PROJECT LESSONS — HARD RULES for this session
- Print a summary of how many rules are active
- Apply them immediately — do not wait for another message
tasks/lessons.md does not exist yet, say:
> "No lessons file found. Corrections you give me this session will build it. Run /lessons save at the end of the session to write them."/lessons save — Capture session corrections
Scan the current conversation for user corrections:
- Phrases matching: "no don't", "use X instead", "stop doing Y", "wrong approach", "we always", "we never", "I told you", "that's not how we", "use X not Y"
- Extract each as a plain-language rule
- Show the extracted rules to the user before writing
- Ask: "Write these N rules to tasks/lessons.md?"
- On confirmation: create
tasks/if needed, append rules with today's date
/lessons add "" — Add a manual rule
Immediately append the rule to tasks/lessons.md:
## 2026-05-06
- <rule>
Confirm: "Rule added. It will be active from the next session (or reload with /lessons)."/lessons clear — Review and prune
Show all current rules numbered. Ask: "Which numbers to remove? (e.g. 1,3,5 or 'all')" Remove selected lines and rewrite the file.
Format of tasks/lessons.md
# Claude LessonsProject: project-name
Auto-generated by Kodelyth ECC. Edit freely — add, remove, reword. These are YOUR rules.
2026-05-06
- use pnpm not npm
- never add try/catch without logging the error first
- we use Zod for validation, not Yup
2026-05-10
- component files go in src/components, not src/app
- always use early returns, never deeply nested if blocks
Platform Notes
| Platform | Auto-load at start | Auto-capture at end | Manual via /lessons |
|---|---|---|---|
| Claude Code | Yes (SessionStart hook) | Yes (Stop hook) | Yes |
| Windsurf | No | No | Yes — run /lessons at start of every session |
| Cursor | No | No | Yes — run /lessons at start of every session |
| Codex CLI | No | No | Yes — run /lessons at start of every session |
| Antigravity | No | No | Yes — run /lessons at start of every session |
| OpenCode | No | No | Yes — run /lessons at start of every session |
Tip for non-Claude-Code platforms: Add /lessons as your first message in every session on this project. Takes 2 seconds and loads all your hard-earned rules instantly.
Arguments
$ARGUMENTS