The smart outsider
Part 4.1 is about setup, but installation is not the point. The goal is to prepare Claude Code so it understands the actual Task Tracker repository rather than a generic FastAPI project. Claude Code works from the terminal: it can read the repository, plan several steps, edit files and run shell commands. That is what makes it useful for CI, Docker, documentation and review, and it is also what makes it risky. One approval can affect several files or run commands that change the repo.
Key ideaA terminal agent without project memory behaves like a smart outsider. Give it accurate repo-specific context, and check that it understands the project, before asking for important changes.
Five concepts you will use
The notes name five Claude Code concepts and how the module uses each one.
| Concept | Meaning | How it is used in the module |
|---|---|---|
| CLAUDE.md | Project memory for the agent. | Stores stack, commands, architecture, business rules, UI states, CORS, and do-not rules. |
| Plan mode | A safety mode where Claude proposes a plan before editing. | Use it before larger changes so you can inspect the intended steps first. |
| Permissions | Approval gates before edits and shell commands. | Reads are generally lower risk; writes and commands require conscious approval. |
| @file references | A way to pull specific files into context. | Use @app/main.py or @app/models.py when asking questions that must be verified against code. |
| Slash commands | Built-in Claude Code actions such as /status and /init. | Use /status to confirm session context and /init to draft CLAUDE.md. |
Read with careCommands and modes as the notes describe them at their date.
CLAUDE.md is project memory, not decoration
Run /init to generate a draft, but do not commit the draft as it stands. Your job is to correct it by hand so it reflects this repository. Every future session reads this file, so a guessed or generic version teaches every future session the wrong project.
| CLAUDE.md section | What to include for Task Tracker |
|---|---|
| Stack | Python 3.11, FastAPI, Pydantic v2, Uvicorn, pytest, httpx, and the vanilla JavaScript frontend. |
| Run and test commands | Use the exact commands from your repo, such as uvicorn app.main:app --reload --port 8000 and pytest -v. |
| Architecture | Where the FastAPI app, models, frontend, tests, and supporting files live. |
| Business rules | Task statuses, allowed transitions, invalid update behavior, missing task behavior, and any rules that should not be guessed. |
| UI states | Task columns and frontend states that matter to app behavior. |
| CORS and local dev notes | What origins or ports are expected in the local setup. |
| Do-not rules | Do not add authentication, a database, unrelated UI changes, deployment steps, or secrets unless explicitly approved. |
Read with carePython 3.11, the uvicorn command and pytest -v are the course’s demo values. Use the versions and commands your own repository actually has.
The setup sequence
The notes give a seven-step hands-on flow. The order matters: context and memory come before any change.
- Install and authenticate Claude Code using the course environment instructions.
- Open the correct Task Tracker repository: not the parent folder, not a nested subfolder.
- Run /status and, if needed, /model to confirm your session context.
- Run /init to generate CLAUDE.md.
- Read the generated CLAUDE.md and correct it by hand.
- Use plan mode for a small proposed change, such as a plan for a /version endpoint, without editing files yet.
- Ask two simple project questions and verify the answers against app/main.py and app/models.py before moving on.
Start safe, then repair the draft
The library’s first prompt turns “set up Claude Code” into a safety checklist: confirm the working directory, name the files it would read first, and do not edit or run tests yet. Its second prompt asks Claude to revise the /init draft from the real files, in a fixed section order, and to show the diff before applying it.
Prompt S1 from the libraryYou generated CLAUDE.md with /init. I want to correct it for the Module 4 Task Tracker. Read these files before proposing changes: - @CLAUDE.md - @app/main.py - @app/models.py - @requirements.txt - @README.md if it exists Task: Revise CLAUDE.md so it includes these sections in this order: 1. Tech stack: Python 3.11, FastAPI, Pydantic v2, Uvicorn, pytest, httpx, and vanilla JavaScript frontend if present. 2. Exact run command used in this course: uvicorn app.main:app --reload --port 8000. 3. Exact test command used in this course: pytest -v. 4. Architecture summary: backend files, frontend files, tests, and where task rules live. 5. Business rules: task status values and transition rules as implemented in the code. Do not guess; mark [VERIFY] if uncertain. 6. UI states and CORS notes if present in the repo. 7. Do-not rules: do not add auth, a database, deployment steps, or major UI changes without asking. Constraints: - Do not change application code. - Do not invent versions or rules. - Show me the diff before applying.
Plan mode and the two verified answers
Plan mode is the safe practice task: ask for a plan for a GET /version endpoint, with no file edits, no new dependencies and no Docker, CI, auth, database or frontend changes, then check that nothing changed. After that, ask two simple questions, such as which endpoints exist with their status codes and which status transitions are enforced, and require Claude to cite the file and function for each claim. Then open those files and confirm at least two claims line by line. Claude’s fluent explanation is not the evidence; the code is.
- Claude Code opened in the repository root, confirmed with /status.
- CLAUDE.md corrected by hand and committed.
- A plan-only request that left every file unchanged.
- Two answers checked against app/main.py and app/models.py.
Key ideaAsk yourself: does CLAUDE.md describe this specific Task Tracker, or could it describe any generic FastAPI app?
Key takeaways
- Claude Code reads, plans, edits and runs commands, so one approval can change a lot.
- Treat the /init output as a draft and correct it by hand before committing.
- Use plan mode to see the steps before any edit happens.
- Verify Claude’s answers against the files it cites, not against how confident it sounds.