How the rohitg00/ai-engineering Curriculum Handles Cross-Language Prerequisites

The curriculum uses metadata-driven lesson contracts where each lesson declares its languages and prerequisite phases in front-matter, validated by CI against actual source files to ensure cross-language dependencies are explicit and traceable.

The rohitg00/ai-engineering-from-scratch repository structures its curriculum around explicit metadata that tracks cross-language prerequisites across Python, TypeScript, SQL, and Go implementations. By combining front-matter declarations with automated contract enforcement, the curriculum ensures that multi-language lessons clearly specify their dependencies regardless of which programming languages were used in prior phases.

Metadata-Driven Prerequisite Tracking in Lesson Front-Matter

Every lesson in the repository includes a front-matter block that explicitly declares both its implementation languages and its prerequisite phases. This design makes cross-language dependencies immediately visible to learners and build systems alike.

The Languages Field

The **Languages:** field enumerates every programming language that appears in the lesson's code/ directory. According to the lesson contract defined in AGENTS.md, this field must match the actual source files present. For example, the Personal AI Tutor capstone lesson declares:

**Languages:** Python (backend, learner model), TypeScript (web app), SQL (curriculum graph via Postgres + Neo4j)

This metadata is validated against the actual main.* files in phases/19-capstone-projects/17-personal-ai-tutor/code/, ensuring that the lesson truly spans the declared languages.

The Prerequisites Field

The **Prerequisites:** field references earlier phases that may cover concepts implemented in entirely different languages. The Personal AI Tutor lists dependencies across seven distinct phases:

**Prerequisites:** Phase 5 (NLP), Phase 6 (speech), Phase 11 (LLM engineering), Phase 12 (multimodal), Phase 14 (agents), Phase 17 (infrastructure), Phase 18 (safety)

This demonstrates how a single TypeScript-heavy frontend lesson can depend on Python-centric NLP work completed in earlier phases.

Phase-Level Modularity and Contract Enforcement

The curriculum groups lessons into logical phases (e.g., "NLP foundations", "Multimodal AI", "Agents") where each phase builds upon the previous ones. When a lesson mixes languages, it automatically inherits the prerequisites of all listed phases without requiring special plumbing.

The AGENTS.md file defines a strict lesson contract requiring the **Languages:** field to correspond to real main.* files in the lesson's code/ directory. The CI pipeline checks these declarations, ensuring that multi-language lessons cannot claim languages they do not implement.

Cross-Language Tooling and Glue Code Implementation

Lessons that operate across languages include interoperability code as part of the Exercises section rather than treating it as an external dependency. This reinforces the requirement that learners understand how to bridge languages.

For instance, the curriculum demonstrates Python-to-Go communication via gRPC:


# main.py (Python)

import grpc
import tutor_pb2_grpc, tutor_pb2

def ask_go_service(question: str) -> str:
    channel = grpc.insecure_channel("localhost:50051")
    stub = tutor_pb2_grpc.TutorStub(channel)
    resp = stub.Answer(tutor_pb2.Question(text=question))
    return resp.text
// tutor_server.go (Go)
package main

import (
    "context"
    pb "github.com/example/tutor"
)

type server struct{ pb.UnimplementedTutorServer }

func (s *server) Answer(ctx context.Context, q *pb.Question) (*pb.Answer, error) {
    return &pb.Answer{Text: "Generated answer"}, nil
}

Visualizing Cross-Language Dependencies

The repository automatically generates dependency tables in README.md and ROADMAP.md that map each lesson—including its complete language list—to its prerequisite phases. These tables provide learners with a clear visual map of how concepts flow across Python, TypeScript, SQL, and other implementations.

For the Personal AI Tutor capstone located at phases/19-capstone-projects/17-personal-ai-tutor/docs/en.md, this documentation shows how the Python backend, TypeScript frontend, and SQL graph schema relate to prior phases covering speech processing and LLM engineering.

Summary

  • Metadata-driven tracking: Front-matter fields **Languages:** and **Prerequisites:** explicitly declare cross-language dependencies in every lesson.
  • Automated validation: The lesson contract in AGENTS.md and CI checks ensure declared languages match actual source files like main.py and main.ts.
  • Phase inheritance: Lessons automatically pull in prerequisites from declared phases, regardless of the languages used in those earlier lessons.
  • Integrated glue code: Cross-language interoperability examples (such as Python calling Go via gRPC) are embedded directly in lesson exercises.
  • Visual documentation: README.md and ROADMAP.md generate tables mapping lessons to prerequisite phases across language boundaries.

Frequently Asked Questions

How are cross-language prerequisites declared in lesson metadata?

Prerequisites are declared in the front-matter of each lesson's documentation file using the **Prerequisites:** field, which references earlier phase numbers. For example, phases/19-capstone-projects/17-personal-ai-tutor/docs/en.md lists Phase 5 (NLP), Phase 6 (speech), and Phase 11 (LLM engineering) as requirements, even though those phases primarily use Python while the capstone uses TypeScript and SQL.

What prevents a lesson from claiming a language it doesn't use?

The lesson contract defined in AGENTS.md requires that every language listed in the **Languages:** field must have a corresponding main.* implementation file in the lesson's code/ directory. The CI pipeline validates these declarations against the actual filesystem, rejecting any lesson where the metadata claims a language without the supporting source code.

Do learners need to know all languages before starting a multi-language lesson?

No. The phase-based organization ensures that learners encounter concepts incrementally. A lesson like the Personal AI Tutor builds upon knowledge from previous phases (such as NLP and speech processing) without requiring prior expertise in every specific language used, as the curriculum provides the necessary cross-language glue code and context within the lesson itself.

How does the repository visualize cross-language dependencies?

The README.md and ROADMAP.md files contain automatically generated tables that link each lesson to its prerequisite phases and list the languages used in each implementation. This gives learners a clear visual map showing how a TypeScript frontend in Phase 19 depends on Python-based NLP concepts from Phase 5, for example.

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 →