watchandlearn — learn your codebase while Claude Code writes it

Learn your codebase while Claude Code writes it.

watchandlearn runs in a tmux pane beside Claude Code. While the agent works, it narrates what's changing, checks that you actually followed at the end of each turn, and turns the new code — in your repo — into spaced-repetition flashcards you review during the next wait.

npx watchandlearn init
Free · MIT · Node 22.13+ · everything stays on your machine
demo mock
tmux · ~/dev/your-repo
┌─claude code──────────────────────────────────────────────────────
{{ line.text }}
┌─watchandlearn──────────────────────────────────────────────────────
{{ line.text }}
── card · due now ──────────────────
Q: In cache.ts, why does get() delete and
re-insert the key it just read?
[space] show answer [f] flag card
[0]claude:code*wl:watch14:32
── THE LOOP ──

You've read the diff. Right?

You know the loop. You prompt, the agent works, you check your phone. A few minutes later there's a 300-line diff — you skim it, the tests pass, you ship.

Be honest: could you explain what changed? Could you debug it at 2 a.m. without the agent? The wait time isn't the problem — the agent is doing real work. The problem is what you're doing with it: nothing.

watchandlearn puts that time to work on the one codebase that matters — yours.

── EARLY EVIDENCE ──
Anthropic, Jan 2026
(randomized trial)

Engineers who built with an AI assistant while learning an unfamiliar Python library scored 50% on a comprehension quiz vs 67% for those who hand-coded — the biggest gap was on debugging.

52 mostly-junior engineers; the authors call the results preliminary — and note effects are likely more pronounced with agentic tools.

anthropic.com/research →
METR, 2025
(randomized trial)

16 experienced open-source developers using early-2025 AI tools were 19% slower on their own repos — while believing they'd been 20% faster.

Small sample; METR's 2026 follow-up suggests current tools likely do speed developers up — the durable finding is the gap between felt and measured.

metr.org →
Microsoft Research + CMU, CHI 2025
(survey)

Across 319 knowledge workers, higher confidence in generative AI was associated with less critical-thinking effort.

Self-reported and correlational.

microsoft.com/research →
GitClear, 2025
(code analysis)

Across 211 million changed lines (2020–2024), copy-pasted code exceeded refactored code for the first time in 2024.

Observational, from a vendor that sells code-analysis tooling.

gitclear.com →

None of this says stop using agents. It says understanding doesn't come free anymore — you have to put it back on purpose.

── WHAT IT DOES ──

Watch what's actually changing

While Claude Code works, watchandlearn streams a plain-language feed of the edits: which files, what changed, why it matters. Not a raw diff — a running explanation you can absorb at a glance without breaking the agent's stride.

Prove you followed

At the end of each turn, one comprehension checkpoint about what the agent just did. Answer it and move on. Can't? You get a ready-to-paste steering prompt — so the gap gets closed now, not discovered in review.

mock
── checkpoint ──
Q: Which function now owns eviction?
[can't answer? → copy steering prompt]

Remember it next month

watchandlearn generates spaced-repetition flashcards from the concepts in the code the agent just wrote — your functions, your files, your repo, not canned exercises. Scheduling uses FSRS, the algorithm behind Anki. Cards come due during future wait time, so review costs you nothing.

── HOW IT WORKS ──
claude code hooks ──▶ your repo, on your machine ──▶ feed · checkpoints · cards

Hooks. watchandlearn listens to Claude Code's hook events in your session. Async and passive — it never sits in the agent's way.

Your code. The feed, checkpoints, and cards are generated from the actual changes in your repo.

Cards. Concepts become FSRS-scheduled flashcards, stored locally, due the next time you're waiting anyway.

No servers in the middle. Card generation runs through your own authenticated Claude — the one you're already using.

── PRIVACY ──

Your code stays put.

Everything lives on your machine. Your code and prompts are stored only locally, and sent only through your own authenticated Claude for card generation. No servers. No accounts. No telemetry. No ads. It's MIT-licensed — read the source and check.

no servers · no accounts · no telemetry · no ads
── WHAT YOU NEED ──

Claude Code, tmux, and Node 22.13+. Nothing to sign up for — your existing authenticated Claude does the card generation.

── FAQ ──
Does it slow Claude Code down?

No. It's async and passive — it observes hook events and never blocks the agent.

Does my code leave my machine?

No. Everything is stored locally. The only outbound traffic is card generation through your own authenticated Claude.

Is this an Anthropic product?

No. watchandlearn is an independent, MIT-licensed open-source project that works with Claude Code. It is not affiliated with or endorsed by Anthropic.

What does it cost?

Nothing. Free, MIT, open source.

learn to code by not coding

Star it, break it, PR it.

watchandlearn is built in the open. Issues and pull requests welcome.

npx watchandlearn init
github.com/cjohnson451/watchandlearn ↗