# Directory Structure for AI Engineering Lessons: Complete Curriculum Layout

> Explore the ai engineering lessons directory structure. This curriculum uses phases, code, docs, and outputs subdirectories for clear organization and easy learning.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: curriculum-layout
- Published: 2026-06-20

---

**The rohitg00/ai-engineering-from-scratch curriculum organizes 20 phases under a top-level `phases/` directory, with each lesson containing standardized `code/`, [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md), and `outputs/` subdirectories to separate implementations, narratives, and generated artifacts.**

The **directory structure for AI engineering lessons** in the rohitg00/ai-engineering-from-scratch repository follows a strict hierarchical schema designed to make the curriculum both machine-readable and human-navigable. This organization supports a "Build It / Use It" pedagogical workflow across 20 distinct phases of AI engineering education, from foundational math to capstone projects.

## Top-Level Organization: The `phases/` Directory

According to the repository's [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) (lines 51-80), all curriculum content lives under a single `phases/` directory at the repository root. Each phase receives a two-digit numeric prefix (00 through 19) followed by a descriptive slug, creating predictable paths like `phases/01-math-foundations/` and `phases/19-capstone-projects/`.

The 20 phases cover distinct competency areas:

- **Phase 0** – Setup & Tooling (`phases/00-setup-and-tooling/`)
- **Phase 1** – Math Foundations (`phases/01-math-foundations/`)
- **Phase 19** – Capstone Projects (`phases/19-capstone-projects/`)

## Individual Lesson Structure

Every lesson within a phase follows an identical three-part layout defined in the [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) "The shape of a lesson" section (lines 89-97).

### The Three Core Subdirectories

Each lesson directory (`phases/<NN>-<phase-name>/<NN>-<lesson-name>/`) contains exactly three elements:

- **`code/`** – Runnable implementations in Python, TypeScript, Rust, or Julia
- **[`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md)** – Human-readable lesson narrative, objectives, and theory with required frontmatter
- **`outputs/`** – Generated artifacts including prompts, skills, agents, or Model-Context-Protocol (MCP) servers

### Naming Conventions

Lessons adopt the same two-digit prefix pattern as phases. For example, the first lesson in Phase 1 resides at `phases/01-math-foundations/01-linear-algebra-intuition/`, while the second lesson occupies `phases/01-math-foundations/02-vectors-matrices-operations/`.

This structure enforces the curriculum's six-beat "Build It / Use It" workflow, ensuring that code is first written from scratch and later executed through production libraries.

## Key Configuration Files

Several root-level files govern the directory structure's behavior and validation:

- **[`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md)** – Contains the canonical lesson directory layout definition (lines 89-97) and the complete phase/lesson table of contents (lines 51-80)
- **[`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md)** – Defines the repository operating manual and enforces the "one commit per lesson" rule, directly shaping how new lessons are added to the hierarchy
- **[`ROADMAP.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/ROADMAP.md)** – Tracks phase and lesson completion status, mirroring the physical directory structure
- **[`scripts/install_skills.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/install_skills.py)** – Demonstrates how to consume artifacts from lesson `outputs/` directories as installed tools

## Working with the Directory Structure

To execute code from any lesson, navigate from the repository root using the predictable path pattern:

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

```

The [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) file in each lesson requires specific frontmatter:

```markdown

# Linear Algebra Intuition

> Building intuition for vectors and matrices

**Type:** Learn
**Languages:** Python, Julia
**Prerequisites:** None
**Time:** ~15 minutes

```

Generated artifacts in `outputs/` typically follow this structured format:

```markdown
---
name: linear-algebra-intuition
description: Prompt that explains basic linear algebra concepts.
phase: 01
lesson: 01
---
You are a tutor explaining linear algebra basics to a beginner.

```

## Summary

- The **directory structure for AI engineering lessons** organizes 20 phases under `phases/`, using two-digit numeric prefixes for both phases and lessons
- Each lesson contains exactly three subdirectories: `code/` for implementations, [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) for narratives, and `outputs/` for generated artifacts
- The layout enforces a "Build It / Use It" workflow and supports multi-language implementations (Python, TypeScript, Rust, Julia)
- Root files including [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md), [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), and [`ROADMAP.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/ROADMAP.md) govern the structure and track progress
- Paths follow predictable patterns like [`phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py)

## Frequently Asked Questions

### How many phases are in the AI engineering curriculum?

The curriculum contains **20 phases** (numbered 0 through 19), ranging from Setup & Tooling to Capstone Projects. Each phase lives under the `phases/` directory with a two-digit prefix format like `phases/00-setup-and-tooling/` or `phases/19-capstone-projects/`.

### What files are required in every lesson directory?

Every lesson must contain three specific items: a `code/` subdirectory with runnable implementations, a [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) file containing the lesson narrative and frontmatter, and an `outputs/` directory for generated artifacts such as prompts, skills, or MCP servers.

### Which programming languages are supported in the code directories?

The `code/` directories support **Python, TypeScript, Rust, and Julia**. This multi-language approach allows learners to implement concepts in their preferred language while maintaining consistent directory structure across the curriculum.

### How does the AGENTS.md file affect the directory structure?

The [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) file defines the repository's operating manual and enforces strict contribution rules, including the "one commit per lesson" policy. This governance file ensures that new lessons adhere to the established directory schema and naming conventions when added to the `phases/` hierarchy.