Setting Up the Environment
Install mise, Python 3.12, uv, and Claude Code. Create a git repository and configure your environment at the right level of abstraction.
TUTOR WITH THEFOCUS.AI
Copy this prompt into Claude, ChatGPT, or any external AI assistant. It points the assistant to the course instructions and links it to your student profile to track your progress and customize observations.
You are not enrolled yet. Enroll to generate a Student ID to track lesson completions and store learning notes.
Setting Up the Environment
Overview
Before writing any code, we set up the tools that will manage everything: mise for runtime versioning, Python for scripting, uv for fast package management, and Claude Code as our AI coding assistant. The setup is designed so everything lives in a single mise.toml config file.
Install mise
mise is a unified runtime version manager. It handles Node, Python, package managers, and tools from one config file.
curl https://mise.run | sh
You may need to restart your terminal after running this command. Verify with:
mise doctor
Install Claude Code and Create the Project
mise use node@latest
mise use npm:@anthropic-ai/claude-code
Create a git repository:
git init
echo emails >> .gitignore
Now you can start Claude Code:
claude
Create a Research Agent
Inside Claude Code, open the agents panel:
> /agents
Select New Agent → Project Agent → Generate with Claude.
Enter this description:
a research agent that searches the internet based upon the current technologies and choices that have been made in the project to find the best techniques or libraries of doing something, and finds the best choice based upon simplicity, popularity, good support. It should output its findings in reports/yyyy-mm-dd-topic.md and it should have front matter saying when it’s appropriate or not to use. It should explain how to use the library or software, the theory behind it and its basic usage philosophy. The first part of the report will give a short explanation of what you’ve found, then it should go into detail on how to use it (including setup and code examples), and finally it should have a caveats section at the bottom saying when it’s not right. It should include a bibliography of sources it used that can be followed for more information, and the report should be annotated where it got information.
Select all tools and Opus (the smartest, thinking model). This agent will now be available whenever you need to research a technology decision.
Teach It to Consult Reports
Save this to project memory so Claude knows to check research reports before building:
> # Consult the front matter in reports/ before a large build to see if we have useful information
Now when you start a new task, Claude will check reports/ for relevant research before making decisions.
Setting Up Python (The Context-Aware Way)
In a new Claude Code session, ask:
whats the best way to setup this environment for running python code? we used mise to install node and claude code do some research and then write the plans down in plans/0-setup-python.md
This is phrased deliberately: it mentions your existing stack (mise, node, claude code) so the agent gives a contextual answer. It also asks for a written plan, which helps the model organize its thinking.
Claude produces a plan like this:
Python Setup with mise
Since you’re already using mise for node and claude-code, the best approach is to extend your existing mise.toml:
[tools] node = "latest" "npm:@anthropic-ai/claude-code" = "latest" python = "3.12" uv = "latest" [env] _.python.venv = { path = ".venv", create = true } [tasks.install] description = "Install Python dependencies" alias = "i" run = "uv pip install -r requirements.txt"Key benefits:
- Precompiled binaries — Python installs in seconds, no build dependencies needed
- Automatic venv — mise creates and activates .venv when you enter the directory
- uv package manager — 10-100x faster than pip
- Single config — Everything managed in one mise.toml
Now execute the plan:
> execute @plans/0-setup-python.md
The @ symbol brings in a file as context. Claude executes each step:
| Step | Status |
|---|---|
| Updated mise.toml with Python 3.12 + uv | Done |
| Installed Python and uv | Done |
| Created .venv automatically | Done |
| Created requirements.txt | Done |
| Installed html2text + beautifulsoup4 | Done |
Final Setup: Document Everything
One last step — ask Claude to document the project so future coding agents will understand it:
do anything else we need to do to set up this project, and then document how it works so that future coding agents will have a better time
Claude updates .gitignore, writes CLAUDE.md with:
- Quick reference for running commands with mise
- Project structure overview
- Environment setup explanation
- Key libraries and their purposes
- Newsletter category patterns with regex examples
- Code snippets for parsing EML and converting HTML to Markdown
The Pattern: Don’t Write Configs, Describe What You Want
Notice what happened: instead of manually editing mise.toml or writing Python setup scripts, you described what you wanted and let the AI handle it. The plan it wrote (plans/0-setup-python.md) captured the reasoning, making it reproducible.
Future coding agents will read CLAUDE.md and immediately understand:
- How to run Python (
mise exec -- python script.py) - Where to find research (
reports/) - The patterns to use for newsletter categories
- Code patterns for EML parsing and HTML conversion
Key insight: The first thing you build with an AI agent should be documentation for the next AI agent. This is the Self-Reinforcing Knowledge pattern — each session makes every future session more effective.