3.3

Documenting Learnings

Capturing knowledge so it compounds

📝 Practice⏱️ ~10 minutes

The compound effect only works if you capture what you learn. This isn't about creating extensive documentation—it's about writing down just enough that future sessions (and future you) benefit.

📝

Session Notes Template

Quick template for documenting what you learned

📄 Preview PDF
Download PDF

🤔 Good vs. Bad Documentation

Let's see the difference:

❌ Not Helpful ✅ Actually Useful
"Fixed bugs" "Fixed: Timer was resetting on page refresh. Added localStorage save in startTimer()"
"Added features" "Added task naming and 7-day history view. Uses array of {name, duration, date} objects"
"Made changes to code" "Switched from setInterval to requestAnimationFrame for smoother timer. Prevents drift over long sessions"
"Updated stuff" "Used localStorage instead of sessionStorage so timer persists across browser closes. 5MB limit noted"

✨ The Difference

Good documentation answers: What changed + Why it matters + How it works. Future you (and future Claude) need all three.

📋 What to Document

At the end of each significant session, capture:

What you built:

"Added user authentication with login and logout functionality."

Decisions you made:

"Used localStorage for session tokens because we don't need a backend yet."

Problems you solved:

"The form wasn't submitting because we forgot to prevent default. Added e.preventDefault()."

What you'd do differently:

"Next time, validate form inputs before submission."

🎯 The End-of-Session Ritual

Make documentation automatic by asking Claude at the end of each session:

"Before we end, let's document this session: 1. What did we accomplish? 2. What decisions did we make and why? 3. What problems did we solve? 4. What should we remember for next time? Update Claude.md and/or README with this information."

This takes 5 minutes but pays dividends in every future session.

📖 Complete Session Documentation Example

Here's what good end-of-session documentation looks like:

Session: October 15, 2025 - Activity Timer Phase 2

What We Built:
• Task naming input field
• 7-day history view showing past tasks
• localStorage persistence for history

Decisions Made:
• Store history as array of objects: {name, duration, date, id}
• Use ISO date strings for easy sorting
• UUID for IDs (not auto-increment) to avoid conflicts
• Limit history to 100 items to prevent localStorage bloat

Problems Solved:
• History wasn't sorted chronologically → Added .sort() by date
• Old entries weren't pruning → Added cleanup function keeping newest 100
• Date display was ugly → Used toLocaleDateString()

What's Next:
• Phase 3: Visual breakdown (pie/bar chart)
• Maybe: Edit past task names
• Maybe: Export to CSV

Patterns Established:
• Always generate UUID for any item that might be edited later
• Keep data cleanup automatic (prune on every add)
• Format dates for display, store as ISO strings

✅ Why This Works

Six months from now, you can read this and understand: what exists, why it's built that way, and what patterns to follow when adding more features.

✏️ Practice: Document a Session

Think about the last thing you built (or will build):

🎯 Your Session Documentation

What you built (be specific):
Not "added features" but "added X which does Y"
List 2-3 specific things that were added or changed.
Key decisions (with reasoning):
What choices did you make? Why that approach over alternatives?
Document 1-2 decisions that future you should know about.
Problems solved:
What didn't work at first? What was the fix?
Capture 1-2 issues and their solutions.
Patterns to remember:
What approach should you follow next time?
Note 1-2 patterns worth repeating.
Write it down:
Actually create the documentation. Use the format above, or ask Claude: "Document this session with what we built, decisions, problems solved, and patterns."

⚡ Pro Tip: Document Immediately

Document at the end of the session while it's fresh. Waiting until "later" means you forget the why behind decisions. Five minutes now saves an hour later.

📍 Where to Put It

  • Claude.md: Project context, patterns, preferences—things Claude should know
  • README.md: User-facing documentation—what the project does, how to use it
  • CHANGELOG.md: Session-by-session log of changes (optional but useful)
  • Comments in code: Explain non-obvious decisions inline

Quick guide:

Type of Info Where It Goes
Project purpose, tech stack, patterns Claude.md - Claude reads this every session
How to use the app, features, setup README.md - For users (including future you)
Session-by-session changes CHANGELOG.md - Timeline of what happened when
Why a specific line of code exists Code comments - Inline explanations

💡 Future You Will Thank Present You

In a week, you won't remember why you did things a certain way. A single sentence explaining "did X because Y" can save an hour of confusion later.

✅ Documentation Checklist

Before ending a session, ask yourself:

  1. If I came back in a month, would I understand what I built?
  2. If I asked Claude to continue this tomorrow, would it have enough context?
  3. Are any non-obvious decisions explained somewhere?
  4. Is the current status clear?

If yes to all, you're good. If not, spend 5 minutes fixing it.

End-of-Session Quick Check

Claude.md is updated with new patterns or decisions
Current status reflects what's working now
Important decisions have "why" explanations
Problems solved are documented (not just "fixed bug")
If you came back in a month, you'd understand what you built

📚 Resources & Further Reading

💭 Pause & Reflect

Before moving on, take a moment to consider:

  • What's your current approach to documentation? Do you do it? Skip it?
  • Can you think of a time when you wished you'd documented something?
  • What would make documentation feel less like a chore and more automatic?

🎯 Documentation Habits Formed

You know what to capture and where. Next: experiencing the compounding effect firsthand.

Topic 3.3 Complete • Up Next: 3.4 – Experiencing Compounding