-
-
Notifications
You must be signed in to change notification settings - Fork 32
Checkout
Record session learnings and complete the learning cycle.
The /checkout command captures learnings before ending your session, complementing /checkin to implement Golden Rule #6: "Record Learnings Before Ending Session".
/checkoutType /checkout before closing your session to capture session learnings.
The /checkout command orchestrates an 8-step workflow:
- Display Banner - Signal session-end learning recording
- Detect Active Plans - Find any plans you started this session
- Postmortem Prompt - Complete plans with outcome analysis
- Heuristic Discovery - Capture reusable patterns learned
- Failure Documentation - Record unexpected failures
- Quick Notes - Save continuity notes for next session
- Session Summary - Display learning statistics
- Complete - Confirm session learnings recorded
/checkout closes the learning loop:
Session Start
↓
/checkin (load context & golden rules)
↓
[Do work]
↓
/checkout (record learnings & notes)
↓
Session End
Shows the checkout banner to signal session-end learning recording.
If you created plans during this session:
[*] 2 active plan(s) found:
[5] Refactor authentication (domain: backend)
[6] Add analytics feature (domain: frontend)
For each plan, you can complete it with analysis:
Complete postmortem for plan 5 (Refactor authentication)? [Y/n]: y
Actual outcome: Completed 80% of original scope
What diverged from plan? Discovery took longer
What went well? Clean module structure
What went wrong? Underestimated test complexity
Key lessons? Always spike complex integrations first
The postmortem is recorded and linked to the plan for later analysis.
Capture reusable patterns you discovered:
[*] Heuristic Discovery
Did you discover any reusable patterns or rules? [Y/n]: y
Domain: backend
Rule: Always validate auth before database queries
Explanation: Prevents unauthorized data access
Confidence (0.0-1.0) [0.7]: 0.8
Stored in database + markdown for future reference.
Document any unexpected failures:
[*] Failure Documentation
Did anything break or fail unexpectedly? [Y/n]: y
[+] Guidance: Create a failure analysis file at:
~/.claude/emergent-learning/failure-analysis/YYYY-MM-DD-brief.md
Save continuity notes for next session:
[*] Quick Notes for Next Session
> Remember: Add rate limiting to login endpoint
[OK] Notes saved
Retrieved and displayed in next /checkin.
Displays what was recorded:
[=] Session Summary
Postmortems recorded: 1
Heuristics recorded: 2
Failures documented: 0
Notes saved: Yes
Final confirmation:
[OK] Checkout complete. Session learnings recorded!
$ /checkout
[...banner...]
[*] 1 active plan(s) found:
[3] Implement dark mode (domain: frontend)
Complete postmortem for plan 3 (Implement dark mode)? [Y/n]: y
Actual outcome: Completed successfully
What diverged from plan? Required CSS refactoring
What went well? Component API is clean
What went wrong? Color palette took iteration
Key lessons? Design validation early with domain experts
[OK] Postmortem recorded
[*] Heuristic Discovery
Did you discover any reusable patterns? [Y/n]: y
Domain: frontend
Rule: Use CSS variables for consistent theming
Explanation: Simplifies dark mode toggling
Confidence [0.7]: 0.85
[OK] Heuristic recorded
[*] Failure Documentation
Did anything break? [Y/n]: n
[*] Quick Notes for Next Session
> Move avatar colors to theme variables
[OK] Notes saved
[=] Session Summary
Postmortems recorded: 1
Heuristics recorded: 1
Failures documented: 0
Notes saved: Yes
[OK] Checkout complete. Session learnings recorded!$ /checkout
[...banner...]
[*] 0 active plan(s) found
[*] Heuristic Discovery
Did you discover any reusable patterns? [Y/n]: y
Domain: security
Rule: Validate input at system boundaries
Explanation: Prevents injection attacks
Confidence [0.7]: 0.9
[OK] Heuristic recorded
[*] Failure Documentation
Did anything break? [Y/n]: y
[+] Guidance: Create failure-analysis/2026-01-15-cache-invalidation.md
[*] Quick Notes for Next Session
> Research: Redis cluster failover strategies
[OK] Notes saved
[=] Session Summary
Postmortems recorded: 0
Heuristics recorded: 1
Failures documented: 1
Notes saved: Yes
[OK] Checkout complete. Session learnings recorded!- Detects active plans from database
- Completes postmortems and marks plans as done
- Links postmortems to plans for divergence analysis
- Records patterns to database + markdown
- Confidence tracking (0.0-1.0)
- Domain categorization
- Discoverable by
/searchand future sessions
- Guides creation of failure-analysis/*.md files
- Provides template structure
- Captures root causes and lessons
- Stores in ~/.checkout_notes
- Displayed in next
/checkin - Provides continuity across sessions
- Every session end - Record what you learned before closing
- After complex tasks - Capture patterns while they're fresh
- After failures - Document what broke and why
-
When starting work - Review notes from your last
/checkout
- Be honest - Record actual outcomes, not ideal ones
- Capture divergences - These teach the most
- Document patterns - Reusable lessons are gold
- Quick notes - Help future you pick up context
Normal if you didn't create plans at session start. You can still record heuristics, failures, and notes.
If you see "[!] Warning: Could not detect active plans", the database may be unavailable. Continue with heuristics/failures/notes - they'll still be recorded.
Check console output for errors. Ensure record-postmortem.py is accessible in scripts/ directory.
If notes don't save, check file permissions on ~/.checkout_notes. The file will be created automatically on first write.
This command implements the framework's 6th golden rule:
-
/checkinloads context (read) -
/checkoutsaves learnings (write) - Together they close the learning cycle
The learning cycle is fundamental to ELF's effectiveness. Recording learnings is not optional—it's how the framework compounds knowledge over time.
-
/checkin- Load context before starting work -
/search- Find heuristics and learnings -
/swarm- Multi-agent coordination
See CLI Reference for all commands.
- Golden Rules - Learn about Rule #6
- Architecture - How learnings are stored
-
Configuration - Set up hooks to enforce
/checkout