Lesson note: Day 2 — First interactive session (inside a real repository)
Aligned with the ClaudeForge “Lesson 1.2” naming in setup.sh and the generated README.md.
What this lesson is about
You move from isolated prompts to working inside a real codebase: navigating files, loading only the context you need, making a focused change, and proving it with tests and scripts. The “interactive session” is the claude CLI session in sample-repo, using patterns like /add, /status, and accepting a diff—while tests and verify_session.sh confirm the outcome.
Prerequisites
Git 2.40+
Python 3.11+ (3.12 OK)
Claude Code CLI:
npm install -g @anthropic-ai/claude-code→claude --versionFor lesson guards:
ANTHROPIC_API_KEYunset (persetup.sh/verify_session.sh); useSKIP_*only if you know why.
Learning objectives
Work in a git-backed
sample-repowith a normalsrc/layout andpytest.Learn context discipline: use the context inspector to see which paths to load and rough token cost before a session.
Run a verification loop: install deps → run tests → (optional) interactive
claudesession →verify_session.sh.Understand lesson environment rules for early modules:
ANTHROPIC_API_KEYunset (CLI / Pro login flow),claudeCLI available.
Technical objectives (what the scaffold provides)
Reproducible layout via
setup.sh: everything generated underlesson-1-first-session/next to the script (not dependent on arbitrarycwd).Editable install + venv (
sample-repo/.venv) so installs work on PEP 668–style systems.Runnable harness: stdlib metrics HTTP server (
src/server.py), dashboard (dashboard/index.html),start.sh/stop.sh,demo_metrics.shto exercise counters.Makefile shortcuts:
make test,make demo, etc.
Success criteria (as documented in the project)
get_user_by_emailpresent inUserAuthService(and tests green).make test/pytest tests/unit/passes.With
./start.shand./sample-repo/scripts/demo_metrics.sh, dashboard metrics show non-zero demo-related counters.For Modules 1–7 style checks:
echo $ANTHROPIC_API_KEYempty when using lesson verification (unless you intentionally skip guards).
Out of scope (by design)
Production auth (password hashing is illustrative SHA-256; comments say use bcrypt in production).
Heavy frameworks; metrics server is stdlib-only for the lesson harness.