Appendices
Glossary, prompt library, self-assessment quiz, troubleshooting guide, and resources. Everything collected in one place.
Appendix A Glossary
Every technical term used in this document. Click a letter to jump, or search to filter.
| Term | Definition | First Used |
|---|---|---|
| A | ||
| Abstraction | Hiding complexity behind a simpler interface. Each programming layer hides the one below it. | Ch 01 |
| Adjacency list | Graph representation using a dict of neighbor lists. | Phase 5 |
| Agent IDE (L2) | Chat interface connected to your codebase. Produces multi-file edits from natural language. | Ch 39 |
| Agent Teams (L8) | Experimental: agents with peer-to-peer coordination via shared mailbox. | Ch 46 |
| API | Application Programming Interface. A contract defining how software components communicate. | Ch 13 |
| Assertion | A statement that verifies a condition is true. Used in tests: assert result == expected. | Ch 08 |
| B | ||
| Backend | The server-side part of a web application — processes requests, enforces business rules, talks to databases. | Ch 01 |
| Backpressure (L6) | Automated feedback (linters, tests, hooks) that lets agents self-correct without human review. | Ch 43 |
| BeautifulSoup | Python library for parsing HTML and extracting data from web pages. | Ch 13 |
| BFS | Breadth-First Search; graph traversal that visits all neighbors before going deeper. | Phase 5 |
| Binary search tree | Ordered tree where left child < parent < right child, enabling O(log n) lookup. | Phase 5 |
| Branch | A parallel line of development. main is the default. Feature branches isolate work. | Ch 11 |
| C | ||
| CI/CD | Continuous Integration / Continuous Deployment. Automated build, test, and deploy pipelines. | Ch 17 |
| Class | A blueprint for creating objects that bundles data (attributes) and behavior (methods) together. | Ch 07 |
| CLAUDE.md | Persistent instruction file read by Claude Code at session start. Project-specific rules and context. | Ch 40 |
| Clone | Create a local copy of a remote repository, including its full history. | Ch 12 |
| Closure | A function that remembers variables from its enclosing scope, even after that scope has finished executing. | Ch 05 |
| Codify | Turn a lesson into a persistent rule (CLAUDE.md, rules file, skill, docs). | Ch 41 |
| Collision | When two different keys hash to the same index in a hash table. | Phase 5 |
| Commit | A snapshot of your project at a point in time. Has a message describing what changed. | Ch 11 |
| Compiler | A program that translates your entire source code into machine code before execution (e.g., Rust, C). | Ch 01 |
| Compounding engineering (L4) | The practice of codifying lessons so each session improves future sessions. | Ch 41 |
| Constraint-based prompting | Telling the model what success looks like (constraints) instead of step-by-step instructions. | Ch 43 |
| Constructor (__init__) | The special method called automatically when a new instance of a class is created. | Ch 07 |
| Container | A running instance of a Docker image; an isolated process with its own filesystem, network, and dependencies. | Ch 16 |
| Context engineering (L3) | Controlling what the model sees so every token does useful work. | Ch 40 |
| Context window | The total amount of text (tokens) a model can process at once. Has a fixed budget. | Ch 40 |
| Control flow | The order in which statements execute: sequential, conditional (if/else), or looping (for/while). | Ch 05 |
| CSS | Cascading Style Sheets; a language for describing the visual presentation of HTML documents. | Ch 14 |
| D | ||
| Data structure | A way of organizing data: list (ordered), dictionary (key-value), set (unique), tuple (immutable). | Ch 06 |
| Data type | A classification of data (integer, string, boolean, etc.) that determines what operations are valid. | Ch 02 |
| Database | Persistent data storage. SQL databases (PostgreSQL, SQLite) use tables with schemas; NoSQL (MongoDB) uses flexible documents. | Ch 15 |
| Decorator | A function that wraps another function to modify its behavior, applied with @ syntax. | Ch 07 |
| DFS | Depth-First Search; graph traversal that explores as far as possible along each branch before backtracking. | Phase 5 |
| Diff | A line-by-line comparison showing what changed between two versions. + = added, - = removed. | Ch 38 |
| Dispatch (L7) | Tool for sending tasks to background agents. Workers execute in fresh contexts. | Ch 44 |
| Docker | A platform that packages applications into containers — lightweight, portable units that run identically everywhere. | Ch 16 |
| docker-compose | A tool for defining and running multi-container Docker applications using a YAML configuration file. | Ch 16 |
| Dockerfile | A text file with instructions for building a Docker image, layer by layer. | Ch 16 |
| E | ||
| Endpoint | A specific URL that an API responds to (e.g., /api/tasks). | Ch 13 |
| Environment variable | A named value available to all processes. Used for configuration and secrets. | Ch 10 |
| Exception | An error that interrupts normal execution. Caught with try/except. | Ch 08 |
| F | ||
| f-string | A formatted string literal prefixed with f that embeds expressions inside braces: f"Hello {name}". | Ch 05 |
| FIFO | First In, First Out; the principle used by queues. | Phase 5 |
| First-class value | An object that can be assigned to variables, passed as an argument, and returned from functions. | Ch 05 |
| Flask | Lightweight Python web framework for building APIs and web apps. | Ch 14 |
| Fork | A personal copy of someone else's repository on GitHub, used for contributing to open-source projects. | Ch 12 |
| Frontend | The user-facing part of a web application — HTML, CSS, JavaScript running in the browser. | Ch 01 |
| Function | A reusable block of code that takes inputs (parameters), does work, and returns an output. | Ch 05 |
| G | ||
| .gitignore | A file listing patterns of files and directories that git should not track (e.g., __pycache__/, .env). | Ch 12 |
| Graph | A data structure with nodes (vertices) and edges representing relationships between them. | Phase 5 |
| H | ||
| Harness | The collection of automated checks surrounding an agent: type checker, linter, tests, CI. | Ch 43 |
| Hash function | A function that converts keys into array indices for O(1) storage and retrieval. | Phase 5 |
| Hash table | A data structure that maps keys to values using hash functions for O(1) average-case lookup. | Phase 5 |
| Higher-order function | A function that takes other functions as arguments or returns a function. | Ch 05 |
| Hook | An automated script that runs at a lifecycle point (pre-commit, post-save, etc.). | Ch 42 |
| HTML | HyperText Markup Language; the standard markup language for creating web pages. | Ch 14 |
| HTTP | Hypertext Transfer Protocol. The request/response protocol of the web. | Ch 13 |
| Hub-and-spoke | Coordination where all workers report to a single orchestrator (Dispatch pattern). | Ch 46 |
| I | ||
| IDE | Integrated Development Environment. Code editor with built-in tools (VS Code, Cursor). | Ch 03 |
| Image | A read-only template containing application code, runtime, and dependencies used to create containers. | Ch 16 |
| Inheritance | A mechanism where a new class derives attributes and methods from an existing parent class. | Ch 07 |
| Insertion sort | A sorting algorithm that builds the sorted list one element at a time by inserting each into its correct position. O(n) best case, O(n²) worst. | Phase 6 |
| Instance | A concrete realization of a class; "object" and "instance" are interchangeable in Python. | Ch 07 |
| Instruction scaffold | A document so precise that a non-deterministic model produces the same correct output nearly every time. | Ch 40, Ch 43 |
| Interpreter | A program that reads your source code and executes it line by line (e.g., Python). Contrast with a compiler. | Ch 01 |
| iTerm2 | A macOS terminal emulator with advanced features like split panes, search, and profiles. | Ch 03 |
| J | ||
| JSON | JavaScript Object Notation. Text format for structured data: {"key": "value"}. | Ch 08 |
| JSON API | An API that accepts and returns data in JSON format, the most common pattern for modern web services. | Ch 14 |
| L | ||
| Lambda | An anonymous (unnamed) function, typically used for short throwaway operations. | Ch 05 |
| Large language model (LLM) | A model that predicts likely next tokens based on context. It generates useful code but does not "understand" your project — output quality depends on context, constraints, and verification. | Ch 38 |
| LIFO | Last In, First Out; the principle used by stacks. | Phase 5 |
| Linked list | A data structure where each node contains data and a pointer to the next node. | Phase 5 |
| List Comprehension | A concise syntax for creating lists from iterables: [x for x in items if condition]. | Ch 06 |
| M | ||
| MCP | Model Context Protocol. Standardized connectors letting Claude Code interact with external tools. | Ch 42 |
| Merge | Combining changes from one branch into another. | Ch 11 |
| Merge conflict | When two branches modify the same lines. Must be resolved manually. | Ch 11 |
| Method | A function defined inside a class that operates on the instance's data. | Ch 07 |
| Module | A Python file that can be imported into other files. Organizes code into reusable units. | Ch 07 |
| Memoization | Caching the results of expensive function calls so repeated calls with the same arguments return instantly. | Phase 6 |
| Multi-model dispatch | Assigning different AI models to different tasks based on their strengths. | Ch 44 |
| N | ||
| Non-deterministic | Producing different outputs from the same input across runs. LLMs are fundamentally non-deterministic — the same prompt can yield different code. | Ch 38 |
| O | ||
| Object | A specific instance of a class, with its own data values but shared behavior from the class blueprint. | Ch 07 |
| ORM | Object-Relational Mapper. Translates between Python objects and database rows (e.g., SQLAlchemy). | Ch 15 |
| P | ||
| Package manager | Tool for installing/managing software: pip (Python), npm (Node.js), brew (macOS). | Ch 03 |
| Parameter | A variable in a function definition that receives a value when the function is called. | Ch 05 |
| PATH | Environment variable listing directories where the shell looks for executables. | Ch 03 |
| Peer-to-peer | Coordination where agents communicate directly with each other (Agent Teams pattern). | Ch 46 |
| Pipe ( | ) | Shell operator that sends one command's output as the next command's input. | Ch 10 |
| Pre-commit hook | A script that runs automatically before each git commit. Catches issues early. | Ch 43 |
| Pull | Download commits from a remote repository and merge them into your local branch. | Ch 12 |
| Pull Request | A proposal to merge changes from one branch into another, with code review and discussion. | Ch 12 |
| Push | Upload your local commits to a remote repository so others can access them. | Ch 12 |
| Q | ||
| Queue | A FIFO (First In, First Out) data structure where items are added at the back and removed from the front. | Phase 5 |
| Quicksort | A divide-and-conquer sorting algorithm that picks a pivot, partitions elements around it, and recurses. O(n log n) average. | Phase 6 |
| R | ||
| Ralph Loop | Autonomous agent loop: run until PRD complete, each iteration starts with fresh context to avoid window exhaustion. | Ch 44 |
| Remote | A version of your repository hosted on a server (e.g., GitHub) that you push to and pull from. | Ch 12 |
| REPL | Read-Eval-Print Loop. An interactive prompt where you type code and see results immediately (python3 → >>>). | Ch 03 |
| Repository (repo) | A project tracked by git. Contains all files and their complete history. | Ch 11 |
| REST | Representational State Transfer. API style using HTTP methods (GET, POST, PUT, DELETE). | Ch 13 |
| REST API | An API that follows REST conventions: resources identified by URLs, manipulated with HTTP methods. | Ch 14 |
| Return value | The output a function sends back to whoever called it. | Ch 05 |
| Route | A URL pattern mapped to a handler function in a web framework; defines what code runs for each URL. | Ch 14 |
| S | ||
| Scope | Where a variable is visible. Local scope = inside a function. Global scope = everywhere. | Ch 05 |
| self | The first parameter of every method in a Python class, referring to the current instance. | Ch 07 |
| Skill | A reusable instruction set (.claude/skills/[name]/SKILL.md) loaded on demand. | Ch 42 |
| Specification (spec) | A written document defining what a system should do, its inputs, outputs, and constraints. | Ch 41 |
| SQL | Structured Query Language. The standard language for creating, reading, updating, and deleting data in relational databases. | Ch 15 |
| SQLite | A lightweight, file-based SQL database engine that requires no server — ideal for small applications and prototyping. | Ch 15 |
| SSH Key | A cryptographic key pair used for passwordless authentication with remote git servers. | Ch 12 |
| Stack | A LIFO (Last In, First Out) data structure where items are added and removed from the top. | Phase 5 |
| Standard library | Built-in modules that ship with Python (json, os, sys, pathlib, etc.). | Ch 07 |
| Status code | HTTP response number: 200 = OK, 404 = Not Found, 500 = Server Error. | Ch 13 |
| Subagent | A specialized agent (.claude/agents/*.md) with restricted tools and a focused role. | Ch 42 |
| T | ||
| Tab complete (L1) | Inline code suggestions as you type. Press Tab to accept. | Ch 39 |
| Terminal / Shell | Text-based interface for running commands. The shell interprets your commands (bash, zsh). | Ch 03 |
| Test-driven development (TDD) | Write tests first, then write code to make them pass. Red → green → refactor. | Ch 08 |
| Topological sort | An ordering of directed graph nodes such that every edge points forward; used for dependency resolution. | Phase 6 |
| V | ||
| Variable | A named container for a value. The name points to a location in memory. | Ch 02 |
| Virtual Environment | An isolated Python installation that keeps project dependencies separate from the system Python. | Ch 03 |
| Volume (Docker) | A persistent storage mechanism that survives container restarts, used for databases and user data. | Ch 16 |
| W | ||
| Web scraping | The practice of programmatically fetching web pages and extracting structured data from their HTML. | Ch 13 |
| Worktree | A separate working directory linked to the same repo. Enables parallel work without stashing. | Ch 11 |
Appendix B Prompt Library
All prompts, patterns, and templates from the document, organized by phase. Copy-paste ready. Use these as starting points—modify them for your specific project. The best prompts are specific to your context, not generic.
Phase 1 — Foundations
Ch 3: Environment Verification
python3 --version
node --version
git --version
code --versionCh 4: Three-Pass Code Reading
# Pass 1: Structure — What are the functions? What does each do?
# Pass 2: Flow — Where does execution start? What calls what?
# Pass 3: Data — What goes in? What comes out? What transforms happen?Ch 4: Analyze This Code Template
Analyze this code using the three-pass method:
```python
[paste code here]
```
Pass 1 — Structure:
- List every function/class and its purpose in one sentence.
Pass 2 — Flow:
- Where does execution begin?
- Trace the call chain from entry point to output.
Pass 3 — Data:
- What are the inputs (types, formats)?
- What transformations happen?
- What is the final output?
Summary: What does this program do in one paragraph?Phase 2 — Python
Ch 5: Function Template
def function_name(param1: type, param2: type) -> return_type:
"""One-line description of what this function does."""
# logic here
return resultCh 09: Test-Driven Development Pattern
# 1. Write the test first
def test_feature():
result = my_function(input)
assert result == expected
# 2. Run: python3 -m pytest (watch it fail — RED)
# 3. Write minimum code to pass
# 4. Run: python3 -m pytest (watch it pass — GREEN)
# 5. Refactor if neededCh 08: JSON File Manipulation
import json
from pathlib import Path
def load_data(filepath: str) -> list[dict]:
"""Load JSON data from file. Return empty list if file missing."""
path = Path(filepath)
if not path.exists():
return []
return json.loads(path.read_text())
def save_data(filepath: str, data: list[dict]) -> None:
"""Write data to JSON file with pretty formatting."""
Path(filepath).write_text(json.dumps(data, indent=2))
# Usage
tasks = load_data("tasks.json")
tasks.append({"id": len(tasks) + 1, "title": "New task", "status": "todo"})
save_data("tasks.json", tasks)Ch 6: String Processing Pattern
# Common string operations for data cleaning
def clean_and_parse(raw: str) -> dict:
"""Strip whitespace, split on delimiter, return structured data."""
line = raw.strip()
parts = line.split(",")
return {
"name": parts[0].strip().title(),
"email": parts[1].strip().lower(),
"role": parts[2].strip() if len(parts) > 2 else "unknown",
}
# f-string formatting
summary = f"{task['title']} ({task['status']}) — due {task['due_date']}"
# String methods chain
normalized = user_input.strip().lower().replace(" ", "_")Ch 09: TaskForge Test Example
def test_filter_tasks_by_status():
tasks = [
{"id": 1, "title": "Buy milk", "status": "todo"},
{"id": 2, "title": "Walk dog", "status": "done"},
]
result = filter_tasks(tasks, status="done")
assert len(result) == 1
assert result[0]["title"] == "Walk dog"Phase 3 — Development Tools
Ch 10: Pipe Composition
# Find Python files containing "TODO" and count them
grep -r "TODO" --include="*.py" . | wc -l
# List the 5 largest files in src/
du -sh src/* | sort -rh | head -5Ch 11: Git Workflow
git checkout -b feature/add-tags
# ... make changes ...
git add src/taskforge/models.py tests/test_tags.py
git commit -m "feat: add tag support with filtering"
git checkout main
git merge feature/add-tagsCh 12: Git Remote Workflow
# Set up remote and push
git remote add origin git@github.com:username/taskforge.git
git push -u origin main
# Feature branch workflow with remote
git checkout -b feature/api-endpoints
# ... make changes, commit locally ...
git push -u origin feature/api-endpoints
# Create pull request (using GitHub CLI)
gh pr create --title "Add API endpoints" --body "Implements REST API for tasks"
# After PR review and merge, update local main
git checkout main
git pull origin main
git branch -d feature/api-endpointsPhase 4 — Building & Deploying
Ch 13: API Testing with curl
# GET request — retrieve data
curl -s https://httpbin.org/get | python3 -m json.tool
# POST request — send JSON data
curl -s -X POST https://httpbin.org/post \
-H "Content-Type: application/json" \
-d '{"title": "New task", "status": "todo"}'
# Test your local API
curl -s http://localhost:5000/api/tasks | python3 -m json.tool
# POST to your local API
curl -s -X POST http://localhost:5000/api/tasks \
-H "Content-Type: application/json" \
-d '{"title": "Test task", "status": "todo"}'
# Check response headers
curl -I http://localhost:5000/api/tasksCh 13: API Request Pattern
import requests
response = requests.get(
"https://api.github.com/repos/owner/repo",
headers={"Accept": "application/vnd.github.v3+json"}
)
if response.status_code == 200:
data = response.json()
print(data["description"])
else:
print(f"Error: {response.status_code}")Ch 14: Flask API Endpoint
from flask import Flask, jsonify, request
app = Flask(__name__)
tasks = []
@app.route("/api/tasks", methods=["GET"])
def get_tasks():
"""Return all tasks, optionally filtered by status."""
status = request.args.get("status")
if status:
filtered = [t for t in tasks if t["status"] == status]
return jsonify(filtered)
return jsonify(tasks)
@app.route("/api/tasks", methods=["POST"])
def create_task():
"""Create a new task from JSON body."""
data = request.get_json()
if not data or "title" not in data:
return jsonify({"error": "title is required"}), 400
task = {
"id": len(tasks) + 1,
"title": data["title"],
"status": data.get("status", "todo"),
}
tasks.append(task)
return jsonify(task), 201
if __name__ == "__main__":
app.run(debug=True)Ch 16: Docker Build Pattern
# Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python3", "-m", "flask", "run", "--host=0.0.0.0"]# docker-compose.yml
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- ./data:/app/data
environment:
- FLASK_ENV=development# Build and run
docker build -t taskforge .
docker run -p 5000:5000 taskforge
# Or use docker-compose
docker compose up --buildPhase 9 — AI-Assisted Development
Ch 38: Implementation Spec Template
**What:** [Feature name and one-sentence description]
**Inputs:** [Parameters with types]
**Outputs:** [Return value and format]
**Constraints:** [Limits, validation rules, security requirements]
**Edge cases:** [Empty input, invalid data, boundary conditions]
**Acceptance criteria:** [Specific, testable conditions]Ch 39: First Claude Code Interaction
# Navigate to your project
cd ~/projects/taskforge
# Start Claude Code
claude
# Try Plan Mode first
> Add a delete_task(task_id) function that removes a task by ID.
> Plan first, then implement after I approve.Ch 40: CLAUDE.md Template
# ProjectName
One-line description.
## Commands
- `python3 -m pytest` — run tests
- `python3 -m flask run` — start server
## Architecture
- src/ — core logic
- tests/ — test files
- data/ — persistent storage (gitignored)
## Code Style
- Type hints on all function signatures
- Docstrings on all public functions
- No bare try/except
## Gotchas
- [Specific thing Claude gets wrong]
- [Another specific gotcha]Ch 42: Skill Template
# .claude/skills/[name]/SKILL.md
---
name: skill-name
description: One-line description of what this skill does.
tools: Read, Glob, Grep, Bash
model: opus
---
You are a [role]. Your job is to [task].
## Steps
1. [First step]
2. [Second step]
## Output Format
[What the output should look like]Ch 42: Subagent Template
# .claude/agents/[name].md
---
name: agent-name
description: One-line description.
tools: Read, Glob, Write
model: sonnet
---
[Instructions for the subagent]Phase 10 — AI Orchestration
Ch 43: Constraint-Based Prompt
Add [feature] to [project].
Requirements:
- [Constraint 1]
- [Constraint 2]
Acceptance criteria:
- All existing tests pass
- New tests cover: [cases]
Run: Work until `python3 -m pytest` passes cleanly.
Fix failures yourself. Don't ask me unless genuinely stuck.Ch 43: Pre-commit Config
# .pre-commit-config.yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
- id: ruff-format
- repo: local
hooks:
- id: pytest
name: pytest
entry: python3 -m pytest
language: system
pass_filenames: false
always_run: trueCh 44: Dispatch Pattern
/dispatch [description]:
1) [task 1] — use [model], worktree
2) [task 2] — use [model]
3) [task 3] — use [model]Ch 46: Agent Decision Tree Template
# Agent Decision Tree
## Simple, one-file task
- **Pattern:** Single session
- **Prerequisites:** None
- **When:** Bug fix, small feature, config change
## Needs exploration
- **Pattern:** Subagents
- **Prerequisites:** Level 3+ (context management)
- **When:** Understanding unfamiliar code, research tasks
## Multiple independent features
- **Pattern:** Dispatch (Level 7)
- **Prerequisites:** Level 6 (harness for backpressure)
- **When:** Sprint of independent work items
## Implementation + QA
- **Pattern:** Builder-Validator (different models)
- **Prerequisites:** Level 5+ (subagent configuration)
- **When:** Any feature that needs quality assurance
## Very large project
- **Pattern:** Agent Teams (Level 8, experimental)
- **Prerequisites:** Level 7, strong CI, clear architecture
- **When:** Multi-system changes requiring coordinationAppendix C Self-Assessment Quiz
Find your current level. Check the highest level where you can do all items confidently. Your level is the highest fully-checked level.
Level 1 — Tab Complete
- I use inline code suggestions (Copilot, Codeium, Supermaven)
- I can accept, reject, or modify suggestions
- I understand that suggestions are probabilistic, not guaranteed correct
Next step: Install Claude Code or Cursor. Start using chat-based AI editing.
Level 2 — Agent IDE
- I use chat-based AI (Claude Code, Cursor) for multi-file edits
- I can describe features in natural language and review the output
- I use Plan Mode before letting the AI implement
- I review diffs before accepting changes
Next step: Create a CLAUDE.md for your main project. Start managing context deliberately.
Level 3 — Context Engineering
- I maintain a CLAUDE.md under 200 lines with actionable instructions
- I use
/compactto manage context window usage - I selectively include relevant files rather than entire codebases
- I understand the context window budget and place critical info at start/end
Next step: Start the codify loop. After each session, update CLAUDE.md with lessons learned.
Level 4 — Compounding Engineering
- I update CLAUDE.md or rules after every session where something went wrong
- I maintain architecture docs that Claude discovers on demand
- I use
.claude/rules/*.mdfor domain-specific instructions - Each session with Claude is measurably better than the last
Next step: Create your first skill and subagent. Set up an MCP for a tool you use daily.
Level 5 — MCP, Skills, and Capabilities
- I have at least one custom skill in
.claude/skills/ - I have at least one custom subagent in
.claude/agents/ - I've configured at least one MCP (database, GitHub, browser, etc.)
- I understand the CLI vs MCP tradeoff for token efficiency
Next step: Set up pre-commit hooks and a test suite. Let Claude self-correct through backpressure.
Level 6 — Harness Engineering
- I have pre-commit hooks running linter + tests on every commit
- I use constraint-based prompts instead of step-by-step instructions
- I can delegate a feature and have Claude complete it without my intervention
- My CI pipeline catches integration failures automatically
Next step: Install Dispatch. Start sending tasks to background agents.
Level 7 — Background Agents
- I dispatch 2+ tasks to background agents simultaneously
- I use different models for different tasks (Opus for architecture, Sonnet for implementation)
- I never let the same model implement and review
- I can review and merge agent output, resolving conflicts
Next step: Explore Agent Teams for large projects. Contribute skills to your team's registry.
Level 8 — Autonomous Agent Teams
- I use or have tested Agent Teams with peer-to-peer coordination
- I can articulate when teams are appropriate vs overkill
- I maintain a team skills registry with PR-reviewed skills
- I pull my team up by sharing and standardizing AI workflows
Next step: You're at the frontier. Focus on making your team effective, not just yourself.
Scoring
Your level = the highest level where you checked every box. If you check 3/4 at Level 5 but all 4 at Level 4, you're Level 4. Partial credit means you know what to work on next.
Levels are not ranks—they're capabilities. Most professional work happens at Levels 3-6. Level 7+ is for projects that justify the coordination overhead. Being effective at Level 5 is more valuable than being superficial at Level 8.
"The computer programmer is a creator of universes for which he alone is the lawgiver. No playwright, no combiner of things ever fashioned universes complete with their own laws."
—Joseph Weizenbaum, Computer Power and Human Reason
Appendix C.5 Common Mistakes by Level
A quick-reference table of the most common mistakes at each level, how to catch them, and where the curriculum covers them. Consult this when you hit a problem and want to know if it's a known pattern.
| Level | Common Mistake | How to Catch | Chapter |
|---|---|---|---|
| 0 (Foundations) | Using = instead of == | Python raises SyntaxError in conditionals | Ch05 |
| 0 | Indentation errors after if/for | Read the traceback—it points to the exact line | Ch02 |
| 1 (Tab Complete) | Accepting suggestions without reading them | Predict the output before running; if you can't, you didn't read it | Ch38 |
| 2 (Agent IDE) | Giving vague prompts ("make it better") | If the prompt doesn't specify inputs, outputs, and constraints, it's too vague | Ch39 |
| 3 (Context) | No CLAUDE.md or stale CLAUDE.md | Agent produces code that violates project conventions | Ch40 |
| 3 | Overloading a single prompt with multiple unrelated tasks | If the prompt has "and" more than twice, split it | Ch40 |
| 4 (Compounding) | No tests before asking AI to modify code | AI change breaks something and you have no way to detect it | Ch41 |
| 4 | Bare except: clauses hiding real errors | Linter or flake8 --select=E722 | Ch09 |
| 5 (MCP/Skills) | Hallucinated package names in AI output | pip install fails with 404 | Ch38 |
| 5 | Over-engineered AI solutions | Ask: "Could this be done in half the lines?" | Ch38 |
| 6 (Harness) | Constraints too loose (agent makes sweeping changes) | Review git diff --stat—if it touches >10 files, constraints were too broad | Ch43 |
| 7 (Background) | No iteration limit on agent loops | Agent runs indefinitely; always set max_iterations | Ch44 |
| 8 (Teams) | Using multi-agent for tasks a single agent handles fine | If there are no independent subtasks, use one agent | Ch46 |
When something goes wrong, find your current level in the left column. The most likely mistake is listed next to it. If the fix isn't clear, follow the chapter reference for the full explanation.
Appendix D Troubleshooting
Common issues organized by phase. Each entry includes what you see (symptom), what went wrong (cause), and how to fix it.
Phase 1 Issues
Python not found
▶- Symptom
python3: command not foundor'python3' is not recognizedin the terminal.- Cause
- Python is not installed, or the install directory is not in your system PATH.
- Fix
- Reinstall Python from python.org and ensure "Add to PATH" is checked. On macOS, run
brew install python3. Verify withwhich python3.
"command not found" errors
▶- Symptom
- Any tool (
git,node,code) returns "command not found" after installation. - Cause
- The executable's directory is not in your shell's PATH, or the shell session has not been restarted.
- Fix
- Close and reopen your terminal. If still broken, add the install path to your
~/.zshrcor~/.bashrcand runsource ~/.zshrc.
REPL won't start
▶- Symptom
- Typing
python3hangs or shows an unexpected version. - Cause
- Multiple Python installations are conflicting, or an alias is pointing to the wrong version.
- Fix
- Run
which python3to see which binary runs. Use the full path (e.g.,/usr/local/bin/python3) or fix your PATH order in your shell config.
VS Code can't find Python
▶- Symptom
- VS Code shows "No Python interpreter selected" or linting fails.
- Cause
- VS Code's Python extension doesn't know where your Python is installed.
- Fix
- Open the command palette (Cmd+Shift+P), type "Python: Select Interpreter", and choose the correct Python 3 installation.
Phase 2 Issues
IndentationError
▶- Symptom
IndentationError: unexpected indentorunindent does not match.- Cause
- Your file mixes tabs and spaces for indentation, or indentation levels are inconsistent.
- Fix
- Configure your editor to use 4 spaces (not tabs). In VS Code: Settings → "Editor: Tab Size" = 4, "Editor: Insert Spaces" = checked. Re-indent the affected file.
ModuleNotFoundError
▶- Symptom
ModuleNotFoundError: No module named 'requests'(or any third-party package).- Cause
- The package is not installed in the Python environment you are using, or you have multiple Python installations.
- Fix
- Run
python3 -m pip install requests(usingpython3 -m pipensures you install to the correct Python). Use a virtual environment to isolate dependencies.
json.decoder.JSONDecodeError
▶- Symptom
json.decoder.JSONDecodeError: Expecting valuewhen reading a JSON file.- Cause
- The file is empty, contains invalid JSON, or has a trailing comma or single quotes instead of double quotes.
- Fix
- Validate your JSON at jsonlint.com. Ensure the file is not empty. Use
json.dumps()to write JSON instead of hand-editing it.
pytest not found
▶- Symptom
No module named pytestwhen runningpython3 -m pytest.- Cause
- pytest is not installed in your current Python environment.
- Fix
- Run
python3 -m pip install pytest. If using a virtual environment, make sure it is activated first (source venv/bin/activate).
Phase 3 Issues
Permission denied (file/SSH)
▶- Symptom
Permission deniedwhen reading a file or connecting to a git remote via SSH.- Cause
- File permissions are too restrictive, or your SSH key is not added to the SSH agent or GitHub.
- Fix
- For files:
chmod 644 filename. For SSH: runssh-add ~/.ssh/id_ed25519and verify your key is added to GitHub under Settings → SSH Keys.
Git "detached HEAD"
▶- Symptom
- Git says
HEAD detached at abc1234and commits seem to disappear. - Cause
- You checked out a specific commit or tag instead of a branch, so there is no branch to track your new commits.
- Fix
- Create a branch from your current position:
git checkout -b my-branch. Your commits are safe once they are on a named branch.
Merge conflict
▶- Symptom
- Files show
<<<<<<<markers and git won't complete the merge. - Cause
- Two branches edited the same lines. Git cannot automatically decide which version to keep.
- Fix
- Open each conflicted file, choose the correct code between the markers, remove all
<<<<<<</=======/>>>>>>>lines, thengit addandgit commit.
Phase 4 & 5 Issues
"Port already in use"
▶- Symptom
OSError: [Errno 48] Address already in usewhen starting Flask or another server.- Cause
- Another process is already listening on that port (often a previous server you forgot to stop).
- Fix
- Find the process:
lsof -i :5000. Kill it:kill -9 <PID>. Or start your server on a different port:flask run --port 5001.
Claude Code won't install
▶- Symptom
npm install -g @anthropic-ai/claude-codefails with engine or version errors.- Cause
- Your Node.js version is too old. Claude Code requires Node.js 18 or later.
- Fix
- Run
node --versionto check. Install the latest LTS from nodejs.org or usenvm install --lts.
CLAUDE.md not being read
▶- Symptom
- Claude Code ignores your CLAUDE.md rules; behavior does not match instructions.
- Cause
- The CLAUDE.md file is not in the project root directory, or you started Claude Code from a different directory.
- Fix
- Run
pwdto check your current directory. Ensure CLAUDE.md is in the same directory where you runclaude. Usels CLAUDE.mdto verify.
API key errors
▶- Symptom
AuthenticationErroror "invalid API key" when Claude Code starts.- Cause
- Your API key is missing, expired, or set in the wrong environment variable.
- Fix
- Run
claudeand follow the authentication prompts. If using an API key directly, verifyANTHROPIC_API_KEYis set correctly in your shell config.
MCP server connection failures
▶- Symptom
- Claude Code reports "MCP server failed to connect" or tools are unavailable.
- Cause
- The MCP server process crashed, the config file has a typo, or required dependencies are missing.
- Fix
- Check
.claude/mcp.jsonfor syntax errors. Run the MCP server command manually to see error output. Ensure all dependencies are installed.
Rate limit errors
▶- Symptom
429 Too Many RequestsorRateLimitErrorwhen using Claude Code.- Cause
- You've exceeded your API rate limit or your plan's usage cap.
- Fix
- Wait 60 seconds and retry. If persistent, check your usage at console.anthropic.com. Claude Max subscribers have higher limits than API-key users. If you hit limits during exercises, start a new conversation — shorter context uses fewer tokens.
Network / Firewall blocking
▶- Symptom
ECONNREFUSED,ETIMEDOUT, orfetch failedwhen Claude Code tries to connect.- Cause
- Your network is blocking outbound HTTPS connections to api.anthropic.com, or you're behind a corporate firewall/VPN.
- Fix
- Test connectivity with
curl https://api.anthropic.com/v1/messages -I. If blocked, check your firewall settings or try from a different network. If you're behind a corporate proxy, set theHTTPS_PROXYenvironment variable:export HTTPS_PROXY=http://your-proxy:port.
Proxy configuration
▶- Symptom
- Claude Code installs but cannot reach the API;
npm installitself fails with network errors. - Cause
- npm and Claude Code need proxy configuration separately.
- Fix
- For npm:
npm config set proxy http://your-proxy:portandnpm config set https-proxy http://your-proxy:port. For Claude Code: setHTTPS_PROXYin your shell config file (~/.zshrcor~/.bashrc), then runsource ~/.zshrc.
Phase 9 Issues
Dispatch not found
▶- Symptom
dispatch: command not foundor the/dispatchcommand is not recognized.- Cause
- The Dispatch tool is not installed, or it is not available in your Claude Code version.
- Fix
- Update Claude Code to the latest version:
npm update -g @anthropic-ai/claude-code. Verify Dispatch availability in your plan's feature set.
Background agents failing silently
▶- Symptom
- Dispatched tasks show "completed" but produce no output or incorrect results.
- Cause
- The agent's context was insufficient, or the harness (tests/linter) did not catch the failure.
- Fix
- Check the agent's output log for errors. Ensure your harness has adequate test coverage. Add constraints to the dispatch prompt so failures surface explicitly.
Merge conflicts from parallel agents
▶- Symptom
- Multiple agent branches conflict when merging back to main.
- Cause
- Two or more agents modified the same files, which is expected when dispatching parallel tasks.
- Fix
- Use worktrees to isolate each agent. Assign agents to non-overlapping files when possible. Merge one branch at a time and resolve conflicts incrementally.
Docker permission denied
▶- Symptom
permission denied while trying to connect to the Docker daemon socket.- Cause
- Your user is not in the
dockergroup, or Docker Desktop is not running. - Fix
- On macOS: start Docker Desktop. On Linux: run
sudo usermod -aG docker $USERand log out/in. Verify withdocker ps.
Phase 10 Issues
Agent teams producing conflicting file changes
▶- Symptom
- Two agents edit the same file simultaneously; one overwrites the other’s changes.
- Cause
- No file-locking or coordination between parallel agents.
- Fix
- Use the hub-and-spoke pattern from Ch 46. Assign each agent a separate file or section. If agents must share a file, serialize their writes through the orchestrator.
Background agent timeout or hang
▶- Symptom
- A background agent stops producing output and never completes.
- Cause
- Agent entered an infinite retry loop, hit a rate limit, or is waiting for user input it can’t receive.
- Fix
- Set
max_iterationsin your agent config. Monitor agent output logs. If stuck, kill the process and dispatch a fresh agent with a narrower task.
Appendix E Resources and Further Reading
Curated resources for deepening your skills. Organized by topic, with brief descriptions of what each offers.
Structured Reading Path
These books deepen the foundations this curriculum introduces. Read them in order, at the pace suggested.
| When to Start | Book | What It Gives You | How to Read It |
|---|---|---|---|
| After Phase 2 | Composing Programs (free online) | Deep understanding of functions, data abstraction, recursion, and interpreters. | Read Ch 1-2. Do all exercises. |
| After Phase 2 | Code: The Hidden Language of Computer Hardware and Software — Charles Petzold | How computers actually work, from telegraph relays to CPUs. | Read cover to cover. No exercises — just read and absorb. |
| After Phase 4 | The Algorithm Design Manual — Steven Skiena | Practical algorithm thinking. Complements Phase 6: Algorithms. | Read Part I (Ch 1-8). Skip Part II on first pass. |
| After Phase 4 | Computer Systems: A Programmer's Perspective (CS:APP) | How programs actually run on hardware. Memory, processes, networking. | Read Ch 1-6. One chapter per week is fine. |
| After Phase 9 | Designing Data-Intensive Applications (DDIA) — Martin Kleppmann | How real systems handle data at scale. | Read Ch 1-2 first, then Ch 3-9 when building systems. |
| After Phase 10 | Crafting Interpreters (free online) — Robert Nystrom | Build a programming language from scratch. | Read Ch 1-4 first. Build the full interpreter when you have time. |
Every book on this list makes you a better AI supervisor. Composing Programs teaches you to read any code AI generates. The Algorithm Design Manual teaches you to evaluate its efficiency. DDIA teaches you to question its architecture. The deeper your understanding, the better your judgment.
Python
- Python Official Docs — The definitive reference for the language, standard library, and built-in functions.
- The Python Tutorial — The official beginner-friendly walkthrough of Python fundamentals, written by the core team.
- Real Python — In-depth tutorials and articles covering Python from beginner to advanced topics.
Git
- Pro Git (free online) — The comprehensive, freely available book covering everything from basics to internals.
- GitHub Docs — Official documentation for GitHub features: pull requests, actions, issues, and collaboration workflows.
- Atlassian Git Tutorials — Visual, well-structured tutorials explaining git concepts and workflows.
Web & APIs
- MDN Web Docs — The authoritative reference for HTML, CSS, JavaScript, and web APIs, maintained by Mozilla.
- Flask Documentation — Official docs for the Flask web framework, including quickstart, tutorial, and API reference.
- httpbin.org — A free HTTP request and response testing service, useful for experimenting with API calls.
Claude Code
- Anthropic Documentation — Official documentation for Claude models, API reference, and best practices.
- Claude Code CLI Docs — Setup, configuration, CLAUDE.md format, MCP integration, and advanced usage.
- Sankalp's Claude Code Guide — Practical tips from heavy daily use: how to structure prompts, manage context, and get consistently good output.
- The Missing Manual for Claude Code — Comprehensive reference covering features, workflows, and patterns not in the official docs.
- Harper Reed: LLM Codegen Workflow — The spec-driven workflow (brainstorm → spec → plan → execute) that defines modern AI-assisted development.
Docker
- Docker Official Docs — Complete reference for Docker Engine, Compose, Dockerfile syntax, and networking.
- Docker Getting Started Guide — A hands-on tutorial that walks through building, running, and deploying your first container.
Databases
- SQLite Documentation — Official docs for the lightweight, file-based database used throughout this guide.
- SQLAlchemy Tutorial — Step-by-step guide to the most popular Python ORM, covering both Core and ORM patterns.
Practice Platforms
Reading and exercises aren't enough — you need volume. These platforms give you hundreds of problems to build fluency.
- NeetCode — Curated algorithm and data structure problems organized by category and difficulty. Start with the "NeetCode 150" roadmap.
- LeetCode — The largest collection of algorithm problems. Focus on Easy and Medium.
- Learn Git Branching — Interactive visual tutorial for Git branching, merging, and remote operations.
- Select Star SQL — Free interactive SQL tutorial using real data. Complete alongside Ch15.
General Learning
- exercism.org — Free coding exercises in 70+ languages with mentor feedback. Excellent for building fluency.
- Advent of Code — Annual programming puzzle competition (December). Great for practicing problem-solving in any language.
- Project Euler — Math-heavy programming challenges that build algorithmic thinking and number theory skills.