How the rohitg00/ai-engineering-from-scratch Curriculum Is Organized: A 20‑Phase, 503‑Lesson Breakdown

The rohitg00/ai-engineering-from-scratch curriculum is organized as a linear, 20‑phase, 503‑lesson learning pyramid that progresses from setup and math foundations to production‑grade agent engineering, with every lesson following a rigid three‑part directory structure containing code, documentation, and reusable outputs.

The rohitg00/ai-engineering-from-scratch repository delivers a comprehensive, self‑contained education in AI engineering through a carefully sequenced curriculum. According to the source code, this learning path spans 20 distinct phases and 503 individual lessons, each architected to supply the mathematical and algorithmic foundations required by subsequent stages. The repository’s organization enforces consistency through mandatory folder layouts and artifact generation, ensuring that every lesson is both runnable and portable.

The 20‑Phase Learning Pyramid

The curriculum follows a linear‑stacked design where lower phases supply the mathematical and algorithmic foundations required by later phases. Each phase targets a specific layer of the AI stack:

  • Phase 0 – Setup & Tooling: 12 lessons covering environment configuration
  • Phase 1 – Math Foundations: 22 lessons including linear algebra and calculus
  • Phase 2 – ML Fundamentals: 18 lessons on core machine learning algorithms
  • Phase 3 – Deep Learning Core: 13 lessons covering neural network architectures
  • Phase 4 – Computer Vision: 28 lessons on image processing and CNNs
  • Phase 14 – Agent Engineering: 42 lessons focused on building production‑grade agents
  • Phase 19 – Capstone Projects: Final integration projects

This pyramid structure ensures that Phase 14 (Agent Engineering) implicitly depends on the linear algebra intuition established in Phase 1 and the deep learning concepts from Phase 3.

Rigid Lesson Structure: The Three‑Folder Convention

Every lesson lives in its own folder following the pattern phases/<NN>-<phase-name>/<NN>-<lesson-name>/, and each lesson directory contains three mandatory sub‑directories:

  • code/ – Runnable implementations in Python, TypeScript, Rust, or Julia
  • docs/en.md – Human‑readable narrative that explains the concept
  • outputs/ – Produced artifacts (prompts, skills, agents, or MCP servers)

For example, Phase 1, Lesson 01 – Linear Algebra Intuition resides at phases/01-math-foundations/01-linear-algebra-intuition/ and contains:

This convention guarantees that the curriculum is self‑contained, runnable, and portable across different environments.

The "Build It / Use It" Pedagogical Split

Each lesson employs a "Build It / Use It" split. First, the lesson implements an algorithm from scratch using no external libraries so learners understand the underlying mechanics. Then, the same logic is executed through a production library (e.g., PyTorch or JAX) to demonstrate exactly what the framework abstracts away.

This dual approach appears throughout the codebase, ensuring that learners can trace the connection between raw mathematical implementations in code/ and high‑level framework calls.

Reusable Artifacts and Skill Installation

Every lesson ships a reusable artifact stored in the outputs/ directory. These artifacts include prompts, skills, agents, and MCP servers that can be installed system‑wide using the repository’s installation script:

python3 scripts/install_skills.py

This command installs all generated artifacts from the phases/ directory, making the curriculum’s outputs immediately available for reuse in other projects.

Key Files That Govern the Curriculum

Several canonical files define the architecture, workflow, and delivery mechanics of the curriculum:

  • README.md – High‑level description, phase/lesson table, and quick‑start instructions
  • AGENTS.md – Contributor guidelines, repository layout rules, and hard constraints for lesson creation
  • ROADMAP.md – Phase‑level status tracking (WIP or complete) and lesson‑count metrics
  • glossary/terms.md – Canonical definitions of recurring concepts across all phases

These files serve as the source of truth for the curriculum’s structure and evolution.

Running a Lesson Locally

To execute the "build‑it" version of any lesson, navigate to the specific code file and run it directly:


# Clone the repository

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch

# Execute the Python implementation for Phase 1, Lesson 1

python phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py

The accompanying test suite (python3 -m unittest discover) verifies the correctness of the implementations against the expected outputs.

Summary

  • The rohitg00/ai-engineering-from-scratch curriculum comprises 20 phases and 503 lessons arranged in a linear learning pyramid.
  • Each lesson follows a strict directory layout: code/, docs/en.md, and outputs/ to ensure portability.
  • The "Build It / Use It" approach requires implementing algorithms from scratch before using production frameworks.
  • Generated artifacts in outputs/ can be installed via python3 scripts/install_skills.py.
  • Key governance files include AGENTS.md, ROADMAP.md, and glossary/terms.md.

Frequently Asked Questions

How many phases and lessons are in the ai-engineering-from-scratch curriculum?

The curriculum contains 20 phases and 503 lessons total. Phase 0 covers Setup & Tooling with 12 lessons, while Phase 1 (Math Foundations) contains 22 lessons, and Phase 14 (Agent Engineering) contains 42 lessons. The final Phase 19 is dedicated to Capstone Projects.

What is the "Build It / Use It" teaching method?

The "Build It / Use It" method is a pedagogical pattern where each lesson first implements an algorithm from scratch without external dependencies, then repeats the same logic using a production library like PyTorch or JAX. This demonstrates exactly what the framework abstracts while cementing foundational understanding.

How do I install the skills and artifacts generated by lessons?

Navigate to the repository root and run python3 scripts/install_skills.py. This script collects all artifacts stored in individual lesson outputs/ directories (such as prompts, skills, and MCP servers) and installs them for system‑wide reuse.

Where can I find the contributor guidelines for adding new lessons?

Contributor guidelines and the hard rules for lesson creation are documented in AGENTS.md at the repository root. This file specifies the mandatory directory structure, naming conventions, and quality requirements for all new phases and lessons.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →