Inspiration

I graduated with a CS degree, and I use AI to write a lot of my code. One day I tried to explain a project I had built myself, and I couldn't. The AI wrote big parts of it, I pasted them in, it worked, and I moved on. I never actually learned what it did.

I'm not the only one. New coders now ship working apps without understanding them. AI makes building easy, but it quietly skips the learning part.

So I built Lore: a learning journal for AI-written code. You keep coding with AI the way you already do. Lore keeps track of what changed, explains it, and checks if you really understood it.

What it does

  • Sessions: Run lore start before coding with AI and lore stop after. Lore snapshots your git repo and captures exactly what changed.
  • Goal check: When you stop, you write one line about what you were trying to do. Lore compares the AI's changes against your goal and flags it if the work is "Not done yet" or drifted off-goal.
  • Step-by-step explanations: Every change starts as not understood. Lore walks you through it in plain language, and you can ask follow-up questions under each step.
  • Teach-back: Instead of clicking "I get it," you explain the change in your own words. The AI grades your answer (with partial credit) against key points. After 3 failed tries, it shows the key points so you're never stuck.
  • Spaced review: Changes you learned come back later for review, so the knowledge actually sticks.
  • Concepts page: Tracks which concepts (Flexbox, state, API calls, etc.) you've learned and what's next on your study list.
  • Cost tracking: Shows how much each session cost in AI calls.
  • Local-first: Everything lives on your machine. You bring your own API key.

How I built it

  • Backend: Java 21 + Spring Boot, with picocli for the CLI, so the CLI and web app ship together as one package.
  • Storage: H2 database with Flyway migrations, plus git snapshots to capture diffs.
  • Frontend: React + TypeScript, styled like a study notebook (serif headings, warm paper tones, dark mode).
  • AI: Anthropic API. Claude Sonnet handles the explanations (quality matters most there), and Claude Haiku handles cheaper jobs like summaries and grading. The goal check rides along on the existing summary call, so it adds no extra AI cost.

Fittingly, I built Lore with AI. I wrote planning docs (scope, PRD, spec) first, then built it slice by slice with Claude Code: plan, approve, build, review. I also tried other tools like Cursor and Codex along the way.

Challenges

  • Big sessions broke the summary. Once a session passed about 60 changes, the summary call fell apart. I fixed it by grouping changes per file and adding progress indicators.
  • Splitting code sensibly. Cutting large edits at random line counts made explanations confusing. I switched to splitting at function/method boundaries.
  • "Understood" was self-reported. A checkbox proves nothing. That's why I built teach-back: the user has to show they understand.
  • Keeping costs low. I had to choose which model does which job, so learners aren't paying Sonnet prices for simple grading.
  • Data loss bug. Repeated failed starts could wipe data, so I added a database backup step.
  • Scope vs. time. I had way more ideas than time. I set a feature freeze and cut things like multiple-choice quizzes and accounts to ship something solid.

What I learned

  • Honestly, the biggest lesson is the problem itself: I didn't understand a lot of Lore's own code at first, because AI wrote it. Lore is the tool I needed while building Lore.
  • Planning first (scope → spec → small slices) makes AI-assisted coding way more reliable than one giant prompt.
  • Picking the right model for each task matters for both cost and quality.
  • Self-reported learning isn't learning. Explaining something in your own words is the real test.

What's next

  • Get it into the hands of real beginners: a professor at my university offered to share it with intro CS students.
  • Package it as a single jar so anyone can run it.
  • Add multiple-choice quizzes, project-wide comprehension maps, and support for local open-weight models so it can run free.
  • Open-source it, with users bringing their own AI keys.

Built With

Share this project:

Updates

Submission history